[R] getting a windows environment variable in r

Bob Sandefur rls at pincock.com
Thu Oct 12 17:38:17 CEST 2000


hi-
 I would like to get a value set with the dos set command (e.g. set dog=cow) in a rterm session on rterm 1011 under windows 2000. if I try in a dos window:
set dog=cow
echo %dog%
i get cow (what I want)
then i start rterm
system("echo %dog%",intern=T)
gives "%dog%"

I can of course do something like
set dog=cow
echo  %dog% >jnk.rin
and  then start rterm and
jnk<-read.table("jnk.rin")
wantthis<-as.character(V1[1])
wantthis now has what I want

Are there simpler methods?

thanx

Bob Sandefur



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