large files in R package - add to .Rbuildignore?

220 Views Asked by At

I have a function that takes a while to run in one of my packages. It only gets called when building vignettes, so to save on build time I stored the output to the package's internal data with usethis::use_data(). The file saved to R/sysdata.rda and is about 10Mb, so now I get a warning when checking:

sub-directories of 1Mb or more: R 9.7Mb

Would adding `^R/sysdata.rda$ to my .Rbuildignore alleviate this? Or is there a better alternative?

1

There are 1 best solutions below

2
On

Put together a data-only package that hosts the files on github. Since it is only needed for the vignette, read in the .rds file from github rather than re-creating it in the vignette everytime devtools::check() is run