[R] Environment variable PATH in Windows

Uwe Ligges ligges at statistik.tu-dortmund.de
Fri Mar 4 15:41:20 CET 2011



On 04.03.2011 15:16, Dennis Fisher wrote:
> Colleagues,
>
> I am trying to understand how R (2.12.1) obtains the PATH environment variable in Windows (7 or Vista).  Startup {base} directs one to:
> 	"R_ENVIRON" -- which equals "" in my systems
> 	R_HOME/etc/Renviron.site -- which does not exist
> Next, it directs to:
> 	R_HOME/etc/Rprofile.site -- which also does not exist (the expected behavior in a "factory-fresh" installation)

You can create any of these files and set env variables therein.

If you want to change PATH, you can do so as well in the control panel 
(system).

The current value can be shown by

Sys.getenv("PATH")

in R.

Uwe Ligges





> I found the following files in R_HOME/etc:
> 	Makeconf
> 	Rcmd_environ
> 	Rconsole
> 	Rdevga
> 	respositories
> 	rgb.text
> 	Rprofile.txt
> none of which refer to PATH (except Makeconf, which refers to JAVA path, but not to PATH itself)
>
> Today's R-SIG-Mac Digest addresses a similar issue in OS X -- that R.app gets the values from /.MacOSX/environment.plist whereas a session started in Terminal uses .bashrc or /etc/profile.  What are the corresponding sources in Windows?
>
> Thanks in advance.
>
> Dennis
>
> Dennis Fisher MD
> P<  (The "P Less Than" Company)
> Phone: 1-866-PLessThan (1-866-753-7784)
> Fax: 1-866-PLessThan (1-866-753-7784)
> www.PLessThan.com
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list