[Rd] Changes to Windows registry in R-2.2.0

From: Len Thomas <len_at_mcs.st-and.ac.uk>
Date: Thu 24 Nov 2005 - 10:37:14 GMT


I note from the CHANGES log accompanying the Windows version of R-2.2.0 that the behaviour with respect to the Windows registry has changed. It says:

"If the user chooses to register R during installation, a registry entry HKEY_LOCAL_MACHINE\Software\R-core\R\{version}\InstallPath will be added. Users require administrative privileges to create this key. For others, the same key will be put under the HKEY_CURRENT_USER root."

The old behaviour was to add or modify the registry entry at HKEY_LOCAL_MACHINE\Software\R-core\R\InstallPath
(ie the same entry, but without the extra {version} key). Having installed
R-2.2.0, I notice that the entry at this location, which used to say C:\Program Files\R\R-2.1.1
now says
C:\Program Files\R\R-2.2.0
I also tried deleting the \R-core\R key, and re-installing R, and it added both the
HKEY_LOCAL_MACHINE\Software\R-core\R\R-2.2.0\InstallPath and
HKEY_LOCAL_MACHINE\Software\R-core\R\InstallPath entries

In other words, the new behaviour seems to be to *both* modify/add an entry under
HKEY_LOCAL_MACHINE\Software\R-core\R\InstallPath *and*

I note also that it adds another entry
HKEY_LOCAL_MACHINE\Software\R-core\R\Current Version

My questions are:

(1) Am I correct that this is the new behaviour?

(2) Can the appropriate developer confirm that this behaviour will be
continued in future versions (at least for a while)? I ask, because I distribute software that uses R, and it uses the HKEY_LOCAL_MACHINE\Software\R-core\R\InstallPath to find R. (It will also now look under HKEY_CURRENT_USER, as documented in CHANGES.) If future versions will not update this entry, then I'll switch the behaviour of my software.

(3) Might it be worth documenting this behaviour somewhere? I've searched
all the files in the R-2.2.0 distribution and didn't find it, as well as looking in the recent r-devel and r-help archives.

There is one out-of-date entry: in R-2.2.0\doc\manual\R-exts.html it says: [...]
Find and set the R home directory and the user's home directory. The former may be available from the Windows Registry: it will normally be in <code>HKEY_LOCAL_MACHINE\Software\R-core\R\InstallPath</code> and can be set there by running the program <span class="file">R_HOME\bin\RSetReg.exe </span>

Perhaps I missed it elsewhere?

Thanks for any help,

Len Thomas   len_at_mcs.st-and.ac.uk    http://www.creem.st-and.ac.uk/len/
Centre for Research into Ecological and Environmental Modelling
The Observatory, University of St Andrews, Scotland KY16 9LZ
Tel. (0)1334-461801  Fax. (0)1334-461800  Secretary (0)1334-461842

R-devel@r-project.org mailing list
Received on Thu Nov 24 21:43:34 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:34 GMT