[R] install packages automatically

john seers (IFR) john.seers at bbsrc.ac.uk
Tue Sep 11 10:45:53 CEST 2007


 


Hi 

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
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Wensui Liu
Sent: 11 September 2007 02:45
To: r-help 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.

______________________________________________
R-help at stat.math.ethz.ch 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