Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R Package with Large Size External Assets

Tags:

package

r

This is a followup to a question I posted earlier. To summarize, I am writing an R Package called Slidify, which makes use of several external non-R based libraries. My earlier question was about how to manage dependencies.

Several solutions were proposed, of which the most attractive solution was to package the external libraries as a different R package, and make it a dependency for Slidify. This is the strategy followed by the package xlsx, which packages the java dependencies as a different package xlsxjars.

An alterative is for me to provide the external libraries as a download and package a install_libraries function within Slidify, which would automatically fetch the required files and download it into the package directory. I can also add an update_libraries function which would update if things change.

My question is, are there any specific advantages to doing the CRAN dance for external libraries which are not R based. Am I missing something here?

like image 877
Ramnath Avatar asked Oct 23 '22 03:10

Ramnath


1 Answers

As discussed in the comment-thread, for a package like slidify with a number of large, (mostly) fixed, and portable files, a "resource" package makes more sense:

  • you will know the path where it installed (as the package itself will tell you)
  • users can't accidentally put it somewhere else
  • you get CRAN tests
  • you get CRAN distribution, mirrors, ...
  • users already know install.packages() etc
  • the more nimble development of your package using these fixed parts is not held back by the large support files
like image 124
Dirk Eddelbuettel Avatar answered Oct 27 '22 11:10

Dirk Eddelbuettel