[R-pkg-devel] Scripts to generate data objects

Kirill Müller kirill.mueller at ivt.baug.ethz.ch
Thu Mar 31 14:14:19 CEST 2016


The devtools::use_data_raw() function creates a "data-raw" directory for 
this purpose, and adds it to .Rbuildignore so that it's not included in 
the built package. Your scripts can then write the data to the proper 
place using devtools::use_data().


-Kirill


On 30.03.2016 14:03, Iago Mosqueira wrote:
> Hello,
>
> What is the best way of keeping R scripts that are used to generate the data files in the data/ folder? These are not meant to be available to the user, but I would like to keep them in the package itself. Right now I am storing them inside data/, for example PKG/data/datasetone.R to create PKG/data/dataseton.RData, and then adding those R files to .Rbuildignore.
>
> Are there any other sensible ways of doing this?
>
> Thanks,
>
>
> Iago
>
>
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list