benmarwick / smps

time series colour contour plots of data from Scanning Mobility Particle Sizer (SMPS) data
Other
7 stars 6 forks source link

example not working #2

Closed ti-vo closed 7 years ago

ti-vo commented 7 years ago

Hello benmarwick, first off, it is so great that finally someone is taking care of plotting smps data in R. Thanks for all the work you have invested into this project! I installed the package following your guide and successfully loaded the example data (my_data). However, running prepared_data <- prepare_data(my_data) throws the following error:

Error in [<-.data.frame(*tmp*, , names(dat_interp_log_df) == "Time", : replacement has 0 items, need 28468

When cropping the example data to only the first few columns (prepared_data = prepare_data(my_data[,1:5])) , the function runs and finishes without error - however, the result can't be plotted with smps_plot.

On my colleague's computer who installed an older version of the smps package, the example runs smoothly. I don't know if I did something wrong during the installation process or if something was changed in the prepare_data function since he installed the package. Let me know if I can provide any additional information on the problem.

benmarwick commented 7 years ago

Thanks for the comment, are you able to share some of the data you are working with? That will help me to identify the problem, and hopefully make it work for you.

ti-vo commented 7 years ago

I'm using the example dataset that comes with the package. I just try to follow the steps you describe in the documentation, but the example does not compile: library(smps) data("my_data") prepare_data(my_data) and I get the error message I pasted above.

Nufinka commented 7 years ago

Hi, your package for SMPS data is very useful, but when I use my own data I get Error in can_take_these_rows$starts[i]:can_take_these_rows$ends[i] : NA/NaN argument, My SMPS has other size of bins(size categiries) and for my reaseach is inpossible to change it please can you modify your code to more options of size bins resolution? or help me how can I change it?

benmarwick commented 7 years ago

The example is working again. If you would like help with your data, please share some of it with me so I can diagnose.