Skip to content
Prev 751 / 12125 Next

[R-pkg-devel] Data-generating scripts in R packages

You can leave them in R/ (and write them as functions) but use
.Rbuildignore to exclude them from the distributed package. People can use
the source, eg github, to regenerate the package and all its data if they
wish. This way, R CMD check and tests can cover them easily while
developing.

However, if the source data is small, I would think including it in the
distributed source package may be a good idea for reproducibility, without
actually invoking the reconstruction of the data on install (or CRAN
check). Or you can pull the data from the Internet as needed, and leave the
source data out of the package, and just include the pre-processing
function, which you need not export in the namespace.

On Tue, Mar 22, 2016 at 9:15 AM, Brian G. Peterson <brian at braverock.com
<javascript:;>> wrote: