From Gregor.Gorjanc at bfro.uni-lj.si  Fri Jul 18 11:50:18 2008
From: Gregor.Gorjanc at bfro.uni-lj.si (Gorjanc Gregor)
Date: Fri, 18 Jul 2008 11:50:18 +0200
Subject: [Rd] Windows: adding R/bin folder to the PATH variable
In-Reply-To: <alpine.LFD.1.10.0807180911220.13340@gannet.stats.ox.ac.uk>
References: <F189E18BBAA8B6479F618B9044CF4E9C686C1337BB@owa.bfro.uni-lj.si>,
	<alpine.LFD.1.10.0807180911220.13340@gannet.stats.ox.ac.uk>
Message-ID: <F189E18BBAA8B6479F618B9044CF4E9C686C1337BD@owa.bfro.uni-lj.si>

>> Under Windows R is installed, but its bin folder is not added to the
>> system PATH variable. I know that this is handled properly under *nix
>> like systems and I wonder, why this is not the default also for the MS
>> Windows? I guess that for most users a shortcut on the desktop or
>> anywhere else is sufficient, but there are occasions when one expects to
>> able to lunch R from anywhere - say the Command prompt.
>
> This is the normal behaviour of Windows applications.  There are several
> reasons, including length limits on the Windows PATH (which are
> version-specific) and that shells are not normally used -- most Unix
> shells hash the path contents so lookup is (almost) independent of the
> number of applications on the path.
>
> Finally, those Windows installers that do add to the PATH frequently fail
> to uninstall correctly.

I was not aware about this relevant issues. I understand now why changing the
PATH variable is not so common. Perhaps, the following scheme might work
better

1. Set the R_BIN variable - something like R_BIN=.../R/R-*/bin
2. Add the R_BIN variable to PATH variable - something like PATH=...;%R_BIN%

Though I can see problems with multiple versions etc.

Regards, Gregor



[Rd] Windows: adding R/bin folder to the PATH variable
Gorjanc Gregor