Skip to content
Prev 14502 / 63424 Next

Version names

On Nov 28, 2004, at 11:58 PM, Gabor Grothendieck wrote:

            
Batch scripts are also quite dependent on the system and settings used. 
Moreover what are you trying to do? The rwXXX scheme is just a 
suggestion, every user is free to change the name during the 
installation, so there is no way to know by folder name which version 
you're dealing with... The only half-way sensible solution I can think 
of is looking for Rterm.exe and running each one to get the 
corresponding R version - I suppose you can do that with a batch script 
;).

If all you want to do is to determine the current (most recently 
installed) R version, then all it takes is two lines of C code [just 
read one registry entry] - and it's at least as portable across Windows 
systems as a batch script, but far more flexible. (There may even be a 
way to get that info w/o coding at all - I'm not sure whether regedit 
has any batch mode or something ...).

Cheers,
Simon