[Rd] upgrading an R installation to next versoin
ggrothendieck at gmail.com
Thu Jun 30 21:16:57 CEST 2005
On 6/30/05, J. Hosking <jh910 at juno.com> wrote:
> 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....).
That's a good idea -- always using the same folder name for R.
> 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.
Do you mean your R_LIBS has two components: one to look in
..\R\rcurrent\library and a second to look in ..\R\library? What does
it look like exactly?
When you do install.packages(whatever) does it install to the
..\R\library rather than ..\R\rcurrent\library ? Also, does
updates.packages() work as expected for you?
> My miktex.ini file specifies ...\R\rcurrent\share\texmf as a place
> to look for input files.
I think its necessary to rebuild the name data base in miktex too
although ignoring that step may work as long as the filenames
have not changed. I was hoping to continue using a vanilla
miktex installation as I do now rather than having a custom miktex.ini
file. At any rate my batch file would continue to work even with your setup
so I think I should be ok here.
> 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
It occurs to me in reading this that I could keep the *.site files in
..\R and then have my miktex update batch file also copy them
to the appropriate etc folder. Thus keeping an R\library folder
and running the batch file after each new installation would
address 1, 2 and 4 even without using the same name for the
rw... folder. This still does not handle the shortcut key which
I would have to handle manually or determine if there is a way
I could also add that to my batch file.
More information about the R-devel