[Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows
Sharpie
chuck at sharpsteen.net
Wed May 4 21:17:48 CEST 2011
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.
More information about the R-devel
mailing list