[R] Sys.getenv

About this list Date view Thread view Subject view Author view Attachment view

From: Christian Hoffmann (christian.hoffmann@lagonda.wsl.ch)
Date: Thu 12 Jul 2001 - 18:49:55 EST


Message-id: <3.0.6.32.20010712104955.0097bec0@mail.wsl.ch>

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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Wed 10 Mar 2004 - 08:18:19 EST