[Rd] upgrading an R installation to next versoin

J. Hosking jh910 at juno.com
Thu Jun 30 18:14:49 CEST 2005

Gabor Grothendieck wrote:
> When I install a new version of R (Windows XP) I have to:
> 1. copy my rw....\etc\Rprofile.site file to the new installation
> 2. copy the rw....\share\texmf files to the tex subfolder of the 
>    miktex root directory and then refresh the miktex name database
>    (I have a batch file that does this for me which I run
>    whenever I install a new version of R.)
> 3. setup the shortcut key using 'properties' on my R desktop icon so 
>    that ctrl-alt-R brings up the new rather than the old R.  (This one
>    really had me confused once since I did not realize I was still
>    using the old version of R after installing the new one.)
> 4. reinstall the packages I use or else setup etc\Renviron.site with 
>    an R_LIBS to point to include the old library or perhaps one can
>    copy the libraries over being careful not to overwrite new versions
>    of the standard libraries.
> Many other windows program automatically transfer the settings when 
> you upgrade them.
> I wonder if the installation process could optionally transfer
> such settings from an old installation to a new one to make it
> easier to install R.

I install each new version of R to a directory ...\R\rcurrent (first
renaming the previous rcurrent directory to its "official" name rw....).
Having set up the shortcut key one time, on subsequent installations
I tick the installer's checkbox "Don't create a Start Menu folder".

I keep a separate directory ...\R\library for nonstandard packages,
with environment variable R_LIBS set to the directory name.

My miktex.ini file specifies ...\R\rcurrent\share\texmf as a place
to look for input files.

That should take care of your points 3, 4, and 2, respectively.
Duncan's suggestion of an R_ENVIRON environment variable (which
I didn't know about; thanks, Duncan) should take care of point 1.

Jon Hosking

More information about the R-devel mailing list