[R] unix environment variables under R
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Tue Oct 29 13:33:24 CET 2002
Jan Malte Wiener <jan.wiener at tuebingen.mpg.de> writes:
> thanks for your answer,
> but how do i source a file using that environment variable; if the
> environment variable holds a path to a directory and i want to source
> a file within that directory??
> e.g.:
> Sys.putenv("ABC"="~/R-Stuff/")
> in ~/R-Stuff there a bunch of R-files
> now i want to source one of these R-files using the ABC environment
> variable.
> sorry, but i do not know how to do this ?
As in
> file.path(Sys.getenv("HOME"),"foo.R")
[1] "/home/sfe/pd/foo.R"
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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