[R] Sys.getenv

Christian Hoffmann christian.hoffmann at lagonda.wsl.ch
Thu Jul 12 10:49:55 CEST 2001


I am running R-1.3.0 on Solaris 8:

Under Solaris I do
setenv dendro_us hoffmann

echo $dendro_us gives back:
hoffmann

which is correct.

When in R I do:

Sys.getenv("dendro_us")  I get
dendro_us 
       "" 

which is NOT correct:

Inverse effect (taken from help of Sys.getenv)
Under R:
print(Sys.putenv("R_TEST"="testit", ABC=123))
[1] TRUE TRUE
Sys.getenv("R_TEST")   gives back:
  R_TEST 
"testit" 
which seems correct.

When in Solaris I do:
echo $R_TEST
R_TEST: Undefined variable.

which is NOT correct:

Third type of behaviour:
echo $HOME
/home/woodstock/hoffmann
and
Sys.getenv("HOME")
                      HOME 
"/home/woodstock/hoffmann" 

which are both correct.

QUESTION:
Are there two versions of the environment around? Or what am I missing?

>uname -a
SunOS fluke 5.7 Generic_106541-12 sun4d sparc SUNW,SPARCserver-1000

Thanks for help.

-christian
Dr.sc.math.Christian W. Hoffmann
Mathematics and Statistical Computing
Landscape Modeling and Web Applications
Swiss Federal Research Institute WSL 
Zuercherstrasse 111
CH-8903 Birmensdorf, Switzerland
phone: ++41-1-739 22 77    fax: ++41-1-739 22 15
e-mail: christian.hoffmann_at_wsl.ch__prevent_spamming
www: http://www.wsl.ch/staff/christian.hoffmann/

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list