pushPATH
Manipulate the System PATH Variable
Description
Add or remove entries from the front of the environment variable PATH:
the list of directories where the operating system looks for executable files.
Usage
pushPATH(dir)
popPATH()
Arguments
dir |
a character string containing a directory to add
to the front of Sys.getenv("PATH").
|
Details
- pushPATH(dir) adds the directory to the front of PATH, so that
the directory is searched before any others when system looks
for an executable to run.
- popPATH(dir) removes the initial entry from PATH.
Altering PATH from within TIBCO Enterprise Runtime for R (or open-source R)
affects only where functions like
system look for executables to run.
It has no effect outside of TIBCO Enterprise Runtime for R, and it is valid only for the current session of
TIBCO Enterprise Runtime for R.
Value
pushPATH | returns the value of Sys.getenv("PATH") before it was changed. |
popPATH | returns the name of the directory that was removed from PATH. |
Note
These functions can be useful when using RCompare, if the default
REvaluator objects just specify the name of an intepreter, "R" or "TERR",
and not where they are. The RinR package tries to find the full path to the
interpreters when the package is loaded, but it is not always successful.
See Also
Examples
pushPATH("C:/Program Files/R/R-3.0.1/bin")
REvaluate(version$version.string)