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

Simon Urbanek simon.urbanek at r-project.org
Wed May 4 05:41:50 CEST 2011

On May 3, 2011, at 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?

Yes, of course. It's the safest way and really easy if you use a decent manager (I hope you're not typing your packages tar ball names by hand, either). Adding things to PATH on Windows (unlike unix) has the unwanted consequence that all hell breaks loose due to PATH overriding DLL locations so you really don't want to mess with it.

> 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.
> 2. Under most circumstances I just keep the latest version of R. To
> maintain R code with old R versions will be more and more difficult
> with new features and changes coming in. Disk space is cheap, but time
> is not.
> I'm talking about the default installation directory here and I'm only
> wishing that the version string could be removed by default.

It can be already now, so I really have no idea what you're complaining about. If that's what you want, drop the the version and keep the one unversioned directory in your PATH and Bob's your uncle.


> Anyway, I think I will go to the batch files approach if these
> suggestions are going to be turned down. I just don't want to tell
> other people to run Rscript.bat under Windows and Rscript under *nix.
> I hope they can be consistent.
> Regards,
> Yihui
> --
> Yihui Xie <xieyihui at gmail.com>
> Phone: 515-294-2465 Web: http://yihui.name
> Department of Statistics, Iowa State University
> 2215 Snedecor Hall, Ames, IA
> On Tue, May 3, 2011 at 8:14 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
>> On 03/05/2011 7:44 PM, Yihui Xie wrote:
>>> Hi,
>>> I guess this issue must have been brought forward long time ago, but I
>>> still hope you can consider under Windows (during installation):
>>> 1. put R's bin path in the PATH variable of the system so that we can
>>> use the commands "R" and "Rscript" more easily;
>> Few Windows users use those commands.  The ones who do are generally exactly
>> the ones who know how to edit the PATH variable themselves.
>> For most users (the ones who start R from the shortcut), there's no need to
>> mess with the PATH variable.  Personally, I hate programs that do that.  And
>> with R, it's now complicated, because there are 2 different directories
>> holding executables:  bin/i386 and bin/x64.  (The bin directory also holds
>> some, but that's just for back  compatibility.)
>> How could the installer know which of those to put in the PATH?  At
>> installation time, a user isn't going to know which one he/she needs.
>>> 2. remove the version string like R-2.13.0 in the default installation
>>> directory, e.g. only use a directory like C:/Program Files/R/ instead
>>> of C:/Program Files/R/R-2.13.0/; I know many people just follow the
>>> default setting when installing R, and this version string will often
>>> lead to many (unnecessary) copies of R in the system and brings
>>> difficulty to the first issue (several possible bin directories);
>> Multiple installs give you the possibility of reproducing things that don't
>> work in the latest R version.  I think it's a good practice to keep multiple
>> installs on your system if you have the space, and since disk space is cheap
>> these days, that's not so uncommon.
>> Duncan Murdoch
>>> I'm aware of some existing efforts in overcoming the difficulty of
>>> calling R under Windows like the R batch files project
>>> (http://code.google.com/p/batchfiles/), but I believe this is better
>>> to be solved in R directly.
>>> Thanks!
>>> Regards,
>>> Yihui
>>> --
>>> Yihui Xie<xieyihui at gmail.com>
>>> Phone: 515-294-2465 Web: http://yihui.name
>>> Department of Statistics, Iowa State University
>>> 2215 Snedecor Hall, Ames, IA
>>> ______________________________________________
>>> R-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

More information about the R-devel mailing list