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

Dirk Eddelbuettel edd at debian.org
Wed Mar 30 14:23:19 CEST 2016


On 30 March 2016 at 14:03, Iago Mosqueira wrote:
| 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?

For gunsales we keep it simple:
    https://github.com/NYTimes/gunsales/blob/master/R/data.R

It is both a convenience for us (when more data gets released) and
documentation for the user.  

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



More information about the R-package-devel mailing list