I've just stumbled on the possibility to store internal package data in /R/sysdata.rda
. However, I don't get how I should store multiple objects?
I can store one single object, but I would like to make many more available through sysdata.rda
. I know it to be possible by looking at the Dichromats
package, as shown on Hadley R packages website http://r-pkgs.had.co.nz/data.html.
I've tried the code below.
> devtools::use_data(data, data, internal = TRUE)
Saving data, data as sysdata.rda to C:\Users\USER\Documents\R\package/R
> devtools::use_data(data2, data2, internal = TRUE)
Error: sysdata.rda already exists in C:/Users/User/Documents/R/package/R. Use overwrite = TRUE to overwrite
In addition: Warning message: Saving duplicates only once: data2
It is as simple as seperating the different object by a comma.
For example
> devtools::use_data(data.frame1, data.frame2, internal = TRUE)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With