[R] install packages automatically

john seers (IFR) john.seers at bbsrc.ac.uk
Tue Sep 11 13:48:08 CEST 2007


 
Hi Vladimir

You may well be right and it is better, or at least better practice. But
I have a feeling I tried it and it was not as successful, but I cannot
remember why. Perhaps it was because when installing new packages they
were not installed in that (USER) directory? 

JS

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Vladimir Eremeev
Sent: 11 September 2007 10:10
To: r-help at stat.math.ethz.ch
Subject: Re: [R] install packages automatically


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#a126
10798
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at 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.



More information about the R-help mailing list