Skip to content

how to update installed packages to a new version of R?

8 messages · Michael Friendly, Christian Schulz, John Fox +3 more

#
I've just installed R 1.6.1 and would like to install all the 
contributed packages I had used in 1.5.1.
It's not too hard to do this manually from Rgui, but I wondered if there 
is an easier way,
something like writing the results of installed.packages() from 1.5.1 to 
a file and
using that with install.packages() in 1.6.1, or just having 1.6.1 read 
what's in rw151/library.
#
Michael L Friendly <friendly at yorku.ca> writes:
I don't have a windows version handy, but how about

z <- installed.packages("path/to/rw1051/library")
zz <- z[!(z[,"Priority"] %in% c("base","recommended")]),1]
install.packages(zz,lib=...)

??
#
..in windows it is possible copy the package folders in your
new library folder and type
link.html.help()

regards,christian


----- Original Message -----
From: "Michael L Friendly" <friendly at yorku.ca>
To: "r-help" <r-help at stat.math.ethz.ch>
Sent: Wednesday, November 06, 2002 2:07 PM
Subject: [R] how to update installed packages to a new version of R?
-.-.-
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Dear Mike,
At 08:07 AM 11/6/2002 -0500, Michael L Friendly wrote:
What I do is set the environment variable R_LIBS to c:\R\Local (of course, 
you can adjust this to reflect where you want the packages to reside on 
your system). That way, all packages (beyond those in the R distribution) 
get installed in this location. When I install a new version of R, all I 
have to do is update the installed packages (via update.packages on the 
Packages menu in Rgui).

For a start, you could copy all of your current contributed packages to a 
local library directory and proceed as I suggested.

I hope that this help,
  John
____________________________
John Fox
Department of Sociology
McMaster University
email: jfox at mcmaster.ca
web: http://www.socsci.mcmaster.ca/jfox
____________________________

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
This is covered in the rw-FAQ, questions 2.4 and 2.5.

I think I would uninstall rw1051, install rw1061, move the remaining files
in rw1051/library to some suitable place, set R_LIBS in .Renviron,
then fire up 1.6.1 and update the packages.

If you use a separate library for installed packages upgrading is very
easy.
On Wed, 6 Nov 2002, Michael L Friendly wrote:

            

  
    
#
How about just copying the library directory from your 1.5.1 directory to
your 1.6.1 directory?  Then run update.packages() from R.

-roger
_______________________________
UCLA Department of Statistics
rpeng at stat.ucla.edu
http://www.stat.ucla.edu/~rpeng
On Wed, 6 Nov 2002, Michael L Friendly wrote:

            
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Roger Peng <rpeng at stat.ucla.edu> writes:
You'd better avoid copying the base packages, or interesting things
will happen...
#
Dear Roger and Mike,

I used to do it this way, but it helps to keep the base and recommended 
packages, which are part of the R distribution, separate from the 
"contributed" packages.

John
At 09:54 AM 11/6/2002 -0800, Roger Peng wrote:
____________________________
John Fox
Department of Sociology
McMaster University
email: jfox at mcmaster.ca
web: http://www.socsci.mcmaster.ca/jfox
____________________________

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._