Skip to content
Prev 4784 / 12125 Next

[R-pkg-devel] Large Data Package CRAN Preferences

The R.cache package on CRAN provides can be used for this purpose. It
works on all platforms.  Per CRAN Policies, it will prompt the user
(in an interactive session) whether they wish to use a persistent
cache folder, or to fall back to temporary one.  For example,
The R.cache package needs to create a directory that will hold cache
files. It is convenient to use  '/home/hb/.cache/R/R.cache' because it
follows the standard on your operating system and it remains also
after restarting R. Do you wish to create the
'/home/hb/.cache/R/R.cache' directory? If not, a temporary directory
(/tmp/hb/RtmpvEgWIr/.Rcache) that is specific to this R session will
be used. [Y/n]:
[1] "/home/hb/.cache/R/R.cache/MyDataPkg"
Once the user have accepted this, this folder is created and will be
available in all future R session. That is, next time they start R
there will be no prompt:
[1] "/home/hb/.cache/R/R.cache/MyDataPkg"

This will also be the case in non-interactive session.  If that folder
does not exists in non-interactive session, then a temporary folder
will be used (= effectively making the cache lifetime equal to the
session lifetime).   'R CMD check' will always use a temporary cache
such that there is no memory between checks.

/Henrik
(disclaimer: I'm the author)
On Sun, Dec 15, 2019 at 9:27 AM <bill at denney.ws> wrote: