[R] Local install of a contributed package under Linux
Martin Maechler
maechler at stat.math.ethz.ch
Mon Oct 3 09:49:38 CEST 2005
>>>>> "Jon" == Jonathan Baron <baron at psych.upenn.edu>
>>>>> on Sun, 2 Oct 2005 21:00:41 -0400 writes:
Jon> Try
Jon> R CMD INSTALL -l lib pkgs
Jon> The help file is in the utils package. I'm sure this is
Jon> documented in the manual too.
yes, and yes.
The other thing people like the original poster often "forget" is
to subsequently *use* the local library {remember: a library is
directory (aka "folder") of installed packages}:
Either use
library("mvtnorm", lib.loc = <path.to.local.library>)
every time you use the locally installed package, or rather
add the local library to the libraries that are always searched
through. There are several ways to do so in unix-alikes:
- Setting R_LIBS in (one of) the Renviron files;
- Calling .libPaths() in (one of) your Rprofile (files) or in
other startup code
- <<more ways, but these are less recommended>>
Read ?Startup , ?.libPaths (and ?library) for more info.
Regards,
Martin Maechler
More information about the R-help
mailing list