[R] install packages automatically

Vladimir Eremeev wl2776 at gmail.com
Tue Sep 11 11:10:23 CEST 2007


I think using R_LIBS_USER is better.

>From ?.libPaths:

The library search path is initialized at startup from the environment
variable R_LIBS (which 
should be a semicolon-separated list of directories at which R library trees
are rooted) followed by those in environment variable R_LIBS_USER.


john seers (IFR) wrote:
> 
> I use the following method which works well for me.
> 
> I create a directory to hold the installed packages e.g. C:\Program
> Files\R\mylibrary
> 
> Then in my C:\Program Files\R\R-2.5.1\.Renviron file I have a line as
> follows:
> 
> R_LIBS=C:/PROGRA~1/R/mylibrary
> 
> (I think you have to use Windows short names in this file.)
> 
> Thus whenever I install a new package it is installed in this directory.
> If I install a new version of R just update the .Renviron file and run
> Packages->Update packages ...
> 
> This keeps the R base packages separate from the optional packages.
> JS
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> Subject: [R] install packages automatically
> 
> Dear Listers,
> I am a little tired of installing all packages I want every time when I
> instill a new version of R.
> Say, if I have a list of packages I need to use, is it possible to tell
> R to install them all for me automatically rather than I install them
> one by one?
> Thx.
> 
> 

-- 
View this message in context: http://www.nabble.com/install-packages-automatically-tf4419780.html#a12610798
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list