[R] newly install old and present R versions

Uwe Ligges ligges at statistik.tu-dortmund.de
Sat Feb 4 18:09:08 CET 2012

On 03.02.2012 13:34, Thomas Mang wrote:
> Hi,
> Moving to a new computer (Windows 7) but for reasons of reproduceability
> I would seriously like to also install my present R 2.8.1 along with all
> extension packages on that machine as well (that is besides R 2.14.1).
> What's the best way of doing so?
> My idea is:
> Get the setup for 2.8.1 and install it; during install neither select
> 'save version number in registry' nor 'associate Rdata files' to keep
> the registry clean.
> Manually Copy the extenxion packages from my present machine to the lib
> folder of 2.8.1
> That should mean 2.8.1 should run.
> Then install 2.14.1 and download most up-to-date versions of packages.
> How do i detect if packages were e.g. renamed or merged? Also manually
> copying my old packages to the lib dir and then running
> update.packages(checkBuilt=TRUE, ask=FALSE)? Will that work under these
> circumstances as well?

Yes. But you should not overwrite base packages.

> To make things more complicated I am also using Rtools. Is it possible
> to have two parallel versions of Rtools? Sure I can install it but I
> suppose as it sets some PATH variables only one can actually only be
> active at a time. Hence it might be smarter to avoid installing Rtools
> for 2.8.1 alltogether, that is live without it (having enough troubles
> with running Rtools for one version alongside with MinGW as also the
> path to g++ can conflict ...)

You could write simple batch files that set the PATHS you need. E.g. 
wehn moving to the Windows shell, start with

R-2.8.1-settings.bat which contains code that sets the environment 
variables such as PATH appropriately.

Uwe Ligges

> thanks,
> Thomas
> ______________________________________________
> 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