[R] How to updating R to the newest version conveniently
Tom.Mulholland at dpi.wa.gov.au
Fri Nov 12 04:50:40 CET 2004
I've seen various answers to this question and there does not seem to be a single best way.
I use a separate library for downloaded packages. In windows I set the R_LIBS environment variable. See the usual suspects such as the appropriate FAQ and the r-admin pdf file. On the exisitng installation I run code like this
myPackages <- .packages(all.available = TRUE,lib.loc = "c:/progs/mylib")
save(myPackages,file = "f:\backup\settings\myPackages.rdata",compress = T)
This stores a list of all the packages in "mylib" so that when a new install comes I can just retrieve my backup and do a new install. When everything is working well a new version can be downloaded in the old directory (having cleaned it out first) and the update from CRAN option in windows can be used. However with R2.0 there was a need to recompile packages so those that did not have a new version did not update, but didn't work with the new version.
install.packages(myPackages,lib = "c:/progs/mylib",
"CRAN = http://cran.au.r-project.org/")
I can't guarantee the code as I have just put it together from what I recall (this is how I did it at home) I don't have that sort of access to the work PC so I have to get a tech support person to do it all for me and they have to do it manually because they don't understand the process.
From: Yong Wang [mailto:wang at galton.uchicago.edu]
Sent: Friday, 12 November 2004 10:25 AM
To: r-help at stat.math.ethz.ch
Subject: [R] How to updating R to the newest version conveniently
Dear R users
I have been using R for a while. However, I don't know what is the
convenient way to update R to the newest version while keep all packages
I previously downloaded and installed from CRAN, if updating all those
packages the same will be even better.
for the time being, I reinstall all those package evrytime after updating
R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help