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

Gorjanc Gregor Gregor.Gorjanc at bfro.uni-lj.si
Fri Jul 18 11:50:18 CEST 2008


>> 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



More information about the R-devel mailing list