[ESS] Release of ESS 5.3.5
Phillip Lord
phillip.lord at newcastle.ac.uk
Thu Aug 23 12:50:38 CEST 2007
>>>>> "FAT" == Frede Aakmann Tøgersen <FredeA.Togersen at agrsci.dk> writes:
>> Well, finding all the versions of R is going to be heuristic, so there is
>> nothing to stop you from doing both. I would suggest the following:
>>
>> 1) Check a variable set by the user -- they can always
>> override things.
>> 2) Check c:/Program Files as this is the canonical and
>> default location for storing programs on windows.
FAT> Yes, for the english version of Windows XP. For instance in the danish
FAT> version it is
FAT> c:/Programmer
FAT> How many language-specific versions of Windoze are there?
Ah. I didn't know that windows internationalised that.
For me (getenv "ProgramFiles") returns the right location though. So
(directory-files
(concat (getenv "ProgramFiles")
"\\R"))
Should return all the R directories in the standard place. For me that is...
("." ".." "R-2.5.1")
Failing that
(executable-find "R.exe")
which is...
"c:/Program Files/R/R-2.5.1/bin/R.exe"
will work iff R is in the path. After that,
HKEY_LOCAL_MACHINE\Software\R-core\R\Current Version
gives the current version
HKEY_LOCAL_MACHINE\Software\R-core\R\[version]\InstallPath
gives it's location. w32-regdat gives access to these values, although this
also requires an external executable.
If I get the time, I'll try and write some lisp to get this to work.
Phil
More information about the ESS-help
mailing list