[Rd] How to let 'R CMD check' see local libraries

Seth Falcon sfalcon at fhcrc.org
Sun Aug 20 22:31:41 CEST 2006


"Sebastian P. Luque" <spluque at gmail.com> writes:
> Perhaps one way to get around it is to add my local library to
> ${R_HOME}/etc/.Renviron, but I'd rather not do that, as I would need to
> add it everytime R is upgraded.  Any ideas on other solutions would be
> appreciated.  Thanks.

You can export an R_LIBS environment variable from your shell.  Since
I often have at least two versions of R and like to keep the packages
separate, I create a wrapper for each R that looks something like:

#!/bin/bash

export R_LIBS=/Users/seth/RLIB-2.3
/Users/seth/proj/builds/R-2.3/bin/R "$@"

Then R-2.3 CMD INSTALL/check/REMOVE all act on the appropriate
library.

+ seth



More information about the R-devel mailing list