[R-pkg-devel] Downloading software as part of package installation
David B. Dahl
d@hl @ending from @t@t@byu@edu
Tue Sep 4 04:18:21 CEST 2018
I would like advise and help in interpreting a part of the CRAN
Repository Policy. It states, "Downloads of additional software or
data as part of package installation or startup should only use secure
download mechanisms (e.g., ‘https’ or ‘ftps’)."
>From this, I take that it is permissible for a package to use its
.onLoad function to download and install files in the package's
subdirectory. E.g., for the package 'foo', the .onLoad function could
place items in a subdirectory of 'system.file(package="foo")'. Since
package installation called the .onLoad function when "testing if
installed package can be loaded," this would work (assuming the
computer has internet access at the time, otherwise the download could
be skipped). Once downloaded, the package wouldn't need to download
it ever again.
The benefit of this approach is that the additional software is
automatically downloaded when the package is installed, rather than
the user knowing they having to manually call a special function to
download the software (to another location) after package
Does this seem like a valid approach for CRAN?
And, does the answer change when I get R CMD check says:
checking installed package size ... NOTE
installed size is 182.1Mb
This is just a NOTE, so my understanding is that is permissible.
Any thoughts? Thanks!!
More information about the R-package-devel