Skip to content
Prev 4534 / 12125 Next

[R-pkg-devel] R package which creates a directory in the user home dir

On Thu, 2019-10-17 at 14:29 +0200, Sigbert Klinke wrote:
To be sure, you'd need to ask the CRAN staff, but probably not.

You could probably add an option that defaults to FALSE to persist the
data.  Then wrap that in a check.  if persist=TRUE, check to see if the
file exists.  if it exists in the subdirectory of the working
directory, then load it.  otherwise create the subdirectory of the
current working directory, load from the internet, and save the data
locally.

In this way you've had the user explicitly direct the function to save
data to disk, which is (usually) OK.

Regards,

Brian