[R-pkg-devel] Optional library dependencies for compiled code

Guido Kraemer gkr@emer @end|ng |rom bgc-jen@@mpg@de
Wed Jan 29 15:11:00 CET 2020


I am developing an R package that can make (optional, but strongly 
recommended) use of a number of external compression algorithms. What is 
the best strategy if I want to distribute this as an R package? Because 
the package is for reading large external data sets, the package will 
probably not be very useful without compression.

- Make a hard dependency on all external libraries and make user 
manually disable it if they cannot install a library for some reason?

- Make no dependency on external libraries and have the user compile it 
manually if they want compression?

- Look for installed libraries and use only these? (If so: How would I 
do this during the installation of an R package?)

- How does this work on Windows?

The possible compressions are: blosc, zlib, bzip2, lz4, xz

Cheers,

Guido



More information about the R-package-devel mailing list