[R-pkg-devel] R CMD INSTALL -l /path/lib

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Wed Aug 19 15:00:15 CEST 2020


On 19 August 2020 at 13:01, Gábor Csárdi wrote:
| >From https://cran.r-project.org/doc/manuals/R-exts.html:
| 
| > The script is run in a separate R environment containing the following
| variables: R_PACKAGE_NAME (the name of the package), R_PACKAGE_SOURCE (the
| path to the source directory of the package), R_PACKAGE_DIR (the path of
| the target installation directory of the package), R_ARCH (the
| arch-dependent part of the path, often empty), SHLIB_EXT (the extension of
| shared objects) and WINDOWS (TRUE on Windows, FALSE elsewhere).
| 
| This is for `install.libs.R`, but AFAIR it is also true for `configure`. So
| you need the `R_PACKAGE_DIR` env var.

Nice. An alternate approach I have used is to call

    $(R_HOME)/bin/Rscript -e 'cat(.libPaths()[1])'

from configure but Gabor's approach saves a process.

Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-package-devel mailing list