Jeffrey Wood
2007-May-02 21:12 UTC
[R] How to install previous packages after upgrading to R 2.5.0?
Hello, I have just upgraded from R-2.4.1 to R-2.5.0 for Windows. I had installed a large number of add-on packages under 2.4.1. Is there an easy way to install (or load, if that's the easier way) those packages under 2.5.0, without having to install each package by hand? Thanks, Jeff
Duncan Murdoch
2007-May-02 21:39 UTC
[R] How to install previous packages after upgrading to R 2.5.0?
On 02/05/2007 5:12 PM, Jeffrey Wood wrote:> Hello, > > > > > I have just upgraded from R-2.4.1 to R-2.5.0 for Windows. > > I had installed a large number of add-on packages under 2.4.1. Is there an easy way to install (or load, if that's the easier way) those packages under 2.5.0, without having to install each package by hand?I'm not sure if this counts as installing "by hand", but (assuming you have a network connection) you can use the menu system to see the list of CRAN packages, and install the ones you want from there. If you have some of your own non-CRAN packages, "Install package from local .zip file" allows multiple files to be selected and installed. The only combination that's not so easy is installing from source .tar.gz files, but a shell command to loop over *.tar.gz could probably be written. Duncan Murdoch
John C Frain
2007-May-02 22:54 UTC
[R] How to install previous packages after upgrading to R 2.5.0?
Rename the library subdirectory in your new installation to something like library.new. Copy the library subdirectory in the old distribution to the new installation. Copy the contents of the renamed library.new to the the directory copied from the old distribution. You should then start your new R and update packages from the menu. Check and ensure that you have not enabled automatic loading of packages in /etc/Rprofile.site (eg to run Sciviews or similar) For further information see the Windows FAQ. Regards John Frain On 02/05/07, Jeffrey Wood <jephwood at yahoo.com> wrote:> Hello, > > > > > I have just upgraded from R-2.4.1 to R-2.5.0 for Windows. > > I had installed a large number of add-on packages under 2.4.1. Is there an easy way to install (or load, if that's the easier way) those packages under 2.5.0, without having to install each package by hand? > > Thanks, > Jeff > > ______________________________________________ > 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. >-- John C Frain Trinity College Dublin Dublin 2 Ireland www.tcd.ie/Economics/staff/frainj/home.html mailto:frainj at tcd.ie mailto:frainj at gmail.com
Gabor Grothendieck
2007-May-03 00:08 UTC
[R] How to install previous packages after upgrading to R 2.5.0?
On 5/2/07, Jeffrey Wood <jephwood at yahoo.com> wrote:> Hello, > > > > > I have just upgraded from R-2.4.1 to R-2.5.0 for Windows. > > I had installed a large number of add-on packages under 2.4.1. Is there an easy way to install (or load, if that's the easier way) those packages under 2.5.0, without having to install each package by hand?This was just discussed in another thread but batchfiles on CRAN (which is a collection of Windows XP batch files, not an R package) contains movedir.bat and copydir.bat that will move or copy your packages from one version of R to another. See the home page: http://code.google.com/p/batchfiles/ which gives links to the README where its explained and to the CRAN download area from where you can download it. movedir.bat is very fast (only a few seconds) but your packages will then only reside in the new version of R. copydir.bat is slower but makes copies rather than moving the packages. Neither will overwrite anything so they are both pretty safe to use.
Don MacQueen
2007-May-03 14:45 UTC
[R] How to install previous packages after upgrading to R 2.5.0?
I use a script, i.e., place a few lines of R code in a file: ## create a vector of package names my.packages <- c('pkgname1','pkgname2','pkgname3') ## install them (check whether other args to install.packages() need to be specified) install.packages(pkgs=my.packages) and then source the script. Keep the script around, then on every upgrade to R, just source it again. -Don At 2:12 PM -0700 5/2/07, Jeffrey Wood wrote:>Hello, > > > > >I have just upgraded from R-2.4.1 to R-2.5.0 for Windows. > >I had installed a large number of add-on packages under 2.4.1. Is >there an easy way to install (or load, if that's the easier way) >those packages under 2.5.0, without having to install each package >by hand? > >Thanks, >Jeff > >______________________________________________ >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.-- -------------------------------------- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA