From ggrothendieck at gmail.com  Wed May  4 16:34:37 2011
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Wed, 4 May 2011 10:34:37 -0400
Subject: [Rd] Wishlist: write R's bin path to the PATH variable and
 remove the version string in the installation dir under Windows
In-Reply-To: <4DC1427B.40507@gmail.com>
References: <BANLkTikkAsmfmyspnVF_8kXPb-4WuB4now@mail.gmail.com>
	<4DC0A88A.4070908@gmail.com>
	<BANLkTikqoxO9+5iPH9_1D0-HKVxsQG15Hw@mail.gmail.com>
	<4DC1427B.40507@gmail.com>
Message-ID: <BANLkTikeShcjDpy+tV487Ci0ocD8QhK-Kw@mail.gmail.com>

On Wed, May 4, 2011 at 8:11 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> On 11-05-03 11:25 PM, Yihui Xie wrote:
>>
>> 1. "Few Windows users use these commands" does not imply they are not
>> useful, and I have no idea how many Windows users really use them. How
>> do you run "R CMD build" when you build R packages under Windows? You
>> don't write "C:/Program Files/R/R-2.13.0/bin/i386/R.exe CMD build", do
>> you?
>
> I have unusual needs, because I use 2 or 3 different versions of R every
> day. ?But if you're interested, the way I do it is to set up shell commands
> that reset the PATH appropriate to the version of R I want to use.
>
> A more usual user who always wants to use just one version from the command
> line could modify the PATH appropriately. ?I don't object to that, I just
> object to having R do it to unsuspecting users, because as Simon said,
> messing with the PATH can cause problems, and it's difficult for the R
> installer to know if messing with yours will cause trouble for you.
>
> In another message you asked about using Sweave. ?I almost never use
> Sweave() in R or "R CMD Sweave" at the command line; I have an appropriate
> command configured into my editors, and I run it from there. ?The PATH does
> not need to be involved.
>
>
>> I think the reason we have to mess with the PATH variable for each
>> single software package is that Windows is Not Unix, so you may hate
>> Windows instead of a package that modifies your PATH variable.
>>
>> For the choice of i386 and x64, you can let the user decide which bin
>> path to use. I believe the number of users who frequently switch back
>> and forth is fairly small.
>
> I already pointed out why that is inappropriate for a lot of users.

The batchfiles handle this using Rversions.bat.  Without arguments it
lists the available R versions and with an argument it makes that the
current version of R so that Rgui.bat, R.bat, invoke that version.
Rversions.bat works by running the appropriate RSetReg.exe utility
(which is a utility that is included in every R distribution).

Of course if you just want to run a specific version of Rgui each
version has a separate icon on the desktop so one can select the
version of interest that way too.

I personally keep about half a dozen back versions of R for the
reasons others have mentioned and these would include one R-13.x
version, one R-12.x version, etc.  I literally use x in the name since
only the most recent version in any such series is stored. That is,
when a new R-2.13.x comes out I just install it over the existing
R-2.13.x:

 Directory of C:\Program Files\R

31/03/2010  02:37 PM    <DIR>          R-2.10.x
01/06/2010  01:03 PM    <DIR>          R-2.11.x
22/03/2011  03:25 PM    <DIR>          R-2.12.x
26/04/2011  01:45 PM    <DIR>          R-2.13.x



-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



[Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows
Gabor Grothendieck