-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example dat
needed
#8
Comments
From @Bai-Li-NOAA on PR #13 Here are some thoughts on the data: We can use data from the SS3 test models, which I’ve integrated with ASAR. You can modify the code here to add some SS3 data to the satf repository for examples and integration tests. |
I converted the SS3 simple example output file, resulting in a 10mb file. Do we think it needs to be reduced further? My other thought is that we could subset the data frame to show 1990-2011 (~11 years) as the example. Would this work or are there other options you think would be better? Here is the inital converted output from the simple example. |
Maybe save the csv file as an .rda file in the /data folder? After loading the CSV into R and converting it to .rda format (see code below), the file size decreased from 10 MB to 221 KB. data <- read.csv("C:\\Downloads\\simple_ss3_example_convert.csv")
save(asar, file = "C:\\Downloads\\data.rda") |
Now that I am thinking about it, we can probably just upload it as a rdata object since we are changing the functions to read in an object rather than a csv, so this might solve the issue and we can use the simple example |
Standard practice is to create an R script that creates the .rdata object by first reading in the raw data or performing functions and then using usethis::use_data() to save the data in the right format to the right place. 10 MB is the package size limit for the entire package if wanting to submit to CRAN, which is the standard that I try to adhere to even if I am not going to submit. |
Oh that's good to know. I will see what the size ends up being when we provide 10 years of data. I might also be able to take out some of the unnecessary labels/data. |
If it's helpful, the SS3 "simple_small" model available in https://github.com/r4ss/r4ss/tree/main/inst/extdata/simple_small was modified from the original "simple" to reduce the number of years and ages in order to provide a smaller set of files to fit within CRAN limits (although the r4ss package was never subsequently submitted to CRAN). |
It would be great if an example
dat
object were loaded to the package. This object would help developers contribute because I would not have to load my own data set and it would help facilitate testing because there would be a standard object to test that things work. The object could be created programmatically in an .R script in the dataraw folder, using {usethis}, and stored in the data folder.The text was updated successfully, but these errors were encountered: