Yihui Xie
2011-May-03 23:44 UTC
[Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows
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; 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); 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
Gabor Grothendieck
2011-May-04 00:16 UTC
[Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows
On Tue, May 3, 2011 at 7:44 PM, Yihui Xie <xie at yihui.name> 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; > > 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); > > 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. >The above seems very awkward. If you want to do it temporarily each time you use R its going to be MUCH slower than using batch files since you will have to start up R and then run an R program. To do it permanently implies mucking with your system settings and leaving it in a changed state and that seems worse than the batch file approach which requires no such permanent change. Your (2) is unnecessary using the batch files since they automatically find R regardless of what you name the directory. In other situations if you want to set the path using R you already need to know the path to R in order to run R in the first place and if you know the path to R in order to run it why do you need to set the path? -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
Duncan Murdoch
2011-May-04 01:14 UTC
[Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows
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
Gabor Grothendieck
2011-May-04 04:41 UTC
[Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows
On Tue, May 3, 2011 at 7:44 PM, Yihui Xie <xie at yihui.name> 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; > > 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); > > 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. >Although I have some misgivings about this just to be sure we have all based covered I have placed an R package called cmd in the batchfiles download area (go to http://batchfiles.googlecode.com and click on download tab). Install the package and then every time you wish to use R.exe, Rscript.exe, etc. start up R and run library(cmd) cmd32() # or cmd64() and it will spawn a Windows console session with the appropriate path variable set. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
Sharpie
2011-May-04 19:17 UTC
[Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows
Yihui Xie-2 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; >On one hand it certainly would be nice to have this as an option similar to what the RTools installer does. For the 32/64 bit decision, perhaps RHOME/bin could be placed on the PATH and bin/R.exe turned into a bin/R.bat that calls bin/i386/R.exe, bin/x64/R.exe depending on the Windows architecture. On the other hand, the grizzled developer in me is saying "this is a teaching moment. If someone is using a programming language they should know what an environment variable is and how to set it". Admittingly, setting environment variables is a PITA on Windows compared to UNIX. Here's a great freeware tool I have found that makes it so much easier: http://www.rapidee.com Another issue is that many Windows machines are locked down in such a way that environment variables cannot be set permanently. To deal with this, I carry a USB stick that has R installed on it and a batch script that `setx`es environment variables for me. Combined with an `autorun.inf` script, this basically lets me plug my USB stick into a Windows machine and get to work without worrying about how careful the sysadmin was when they set up the tools I like to use (or if they even bothered to include the tools I like to use). A good video tutorial for setting up autorun.inf from Tinkernut.com: http://www.youtube.com/watch?v=lFlgddjOPpw Some of the things in that video are outdated and the overall goal is to show how they could be used for nefarious purposes, but the part about converting a `.bat` script to a `.exe` binary and setting up an autorun.inf to execute the result is solid. Combine with MikTeX Portable and you should be able to Sweave from anywhere. Yihui Xie-2 wrote:> > 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); > > 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. >As a package developer I rather like this---I can have multiple versions of R installed and easily set up my testsuite such that it loops through each one and executes the tests. -Charlie ----- Charlie Sharpsteen Undergraduate-- Environmental Resources Engineering Humboldt State University -- View this message in context: http://r.789695.n4.nabble.com/Wishlist-write-R-s-bin-path-to-the-PATH-variable-and-remove-the-version-string-in-the-installation-ds-tp3493922p3496533.html Sent from the R devel mailing list archive at Nabble.com.