[R-pkg-devel] Downloading software as part of package installation

Uwe Ligges ligge@ @ending from @t@ti@tik@tu-dortmund@de
Tue Sep 4 17:02:33 CEST 2018



On 04.09.2018 04:18, David B. Dahl wrote:
> 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
> installation.
> 
> 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

Think about license issues:
A binary CRAN package (e.g. for Mac or Windows) will contain that other 
software while the source package does not. Hence it may be a license 
violation depoending on the license of the software you download.

Best,
Uwe Ligges


> This is just a NOTE, so my understanding is that is permissible.
> 
> Any thoughts?  Thanks!!
> 
> -- David
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>



More information about the R-package-devel mailing list