Skip to content

Environment variables under Windows

3 messages · John Miyamoto, Uwe Ligges, Brian Ripley

#
Greetings,

I have a question pertaining to the concept of "environment variables"
that is mentioned in the R documentation for "Startup" and also in the
discussion of the Windows configuration of R in the recent book "An
Introduction to R" authored by Venables, Smith, and the R Development Core
Team (referred to as VS in this message).

The Startup documentation and VS make reference to environment variables,
e.g., R\_ENVIRON, R_USER, or R\_PROFILE.  Apparently the R startup
procedure operates differently depending on whether these variables are
"set" or "unset".  What is unclear to me is how to set these variables.

For example, is something to be done with the AUTOEXEC.BAT file or the
CONFIG.SYS file, or perhaps one must alter the Properties of the shortcut
icon for R?  Another possibility is that one must insert some lines in the
RProfile file.  On my installation I have two files names RProfile.  The
first is in the directory \rw1041\etc, and the second is in the directory,
\rw1041\library\base\R.  Does one "set" an environment variable by placing
an appropriate line in a RProfile file?

John

--------------------------------------------------------------------
John Miyamoto, Dept. of Psychology, Box 351525
University of Washington, Seattle, WA 98195-1525
Phone 206-543-0805, Fax 206-685-3157, Email jmiyamot at u.washington.edu
Homepage http://faculty.washington.edu/jmiyamot/
--------------------------------------------------------------------


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
John Miyamoto wrote:
1) See the R for Windows FAQs
2) See ?.Renviron for details on how to set those variables in a file
like .Renviron
3) There are different versions of Windows with different approaches to
set global environment variables. In Win9x and friends it is done in
autoexec.bat, but on WinNT,2k,XP you should set it at another place.
Details hopefully in the manuals of your OS.
4) You can set it temporarily in R by using Sys.putenv() (that's
possible in Rprofile as well, but I think not recommended, just to
answer your last question).


Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Thu, 10 Oct 2002, John Miyamoto wrote:

            
No. See the rw-FAQ questions 2.2 and 3.2.

You either use the command line or the .Renviron file (just as is
documented for Unix).

Please upgrade from rw1041 to rw1060 first.