[Rd] Version names

Simon Urbanek simon.urbanek at math.uni-augsburg.de
Mon Nov 29 00:51:15 CET 2004


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

> Quite so but unfortunately if I want to produce a script
> that has no dependencies then I need to use what is provided
> in Windows and Windows batch commands seem to be the best
> way to do that.

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



More information about the R-devel mailing list