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

Hong Ooi hongoo| @end|ng |rom m|cro@o|t@com
Thu Oct 17 15:11:34 CEST 2019


Also, consider using the rappdirs package to write to a location that follows standard practice on each platform.


-----Original Message-----
From: R-package-devel <r-package-devel-bounces using r-project.org> On Behalf Of Martin Maechler
Sent: Thursday, 17 October 2019 11:44 PM
To: Sigbert Klinke <sigbert using wiwi.hu-berlin.de>
Cc: r-package-devel using r-project.org
Subject: Re: [R-pkg-devel] R package which creates a directory in the user home dir

>>>>> Sigbert Klinke 
>>>>>     on Thu, 17 Oct 2019 14:29:54 +0200 writes:

    > Hi,
    > I'am developing a package that circumvents the R package size limitation 
    > for data sets. For this I store the data set in the internet (currently 
    > GitHub) and download if it is requested.

    > To avoid unnecessary downloads and internet connections I create a 
    > directory in the users home directory to store the data there. However, 
    > this violates the "CRAN Repository Policy" which says

    > - Packages should not write in the user’s home filespace (including 
    > clipboards), nor anywhere else on the file system apart from the R 
    > session’s temporary directory (or during installation in the location 
    > pointed to by TMPDIR: and such usage should be cleaned up).

    > Do I have any chance to get the package to CRAN, if I submit it?

    > Best Sigbert

    > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhu.berlin%2Fsk&data=02%7C01%7Chongooi%40microsoft.com%7Cb0df7ca628c34c80856d08d752ffd245%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637069131007127544&sdata=1AVL8mEcu40nIo5XsWpAMooftEGX8V4W5armhNaFsGM%3D&reserved=0
    > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhu.berlin%2Fmmstat3&data=02%7C01%7Chongooi%40microsoft.com%7Cb0df7ca628c34c80856d08d752ffd245%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637069131007127544&sdata=sUfd89zI27LMfqUps7Hfhv%2BCvreUX4ZQJhTW1%2FGkcaY%3D&reserved=0


I you *prompt* the user about writing, i.e., ask them explicitly if <directory> is fine and only if "yes", you write there, otherwise try to write to tempdir()  then your package is fine, otherwise it is not, i.e, "not okay" according to many, even if *not* on CRAN..

Best,
Martin

______________________________________________
R-package-devel using r-project.org mailing list
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-package-devel&data=02%7C01%7Chongooi%40microsoft.com%7Cb0df7ca628c34c80856d08d752ffd245%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637069131007127544&sdata=UwCk8xz15BVi1OCwKpyZ7usO4nYnT4KtCZm7bHEP9Kc%3D&reserved=0


More information about the R-package-devel mailing list