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: [EMAIL PROTECTED] > 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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.