[R] .Renviron and Renviron.site (on Windows XP)

James Rogers jrogers at cantatapharm.com
Wed Sep 11 18:49:46 CEST 2002


Hello, 

Could someone please tell me why the following doesn't work: 

I have a file C:\Program Files\R\rw1051\etc\Renviron.site, which
contains the line: 

R_LIBS= "C:/Jim/LocalR-Libraries/FromCran";
"C:/Jim/LocalR-Libraries/Cantata"

>From the documentation, I gather that I have put this file in the
default location, but to be safe I also explicitly set the R_ENVIRON
environment variable. Now I indeed have: 

R> Sys.getenv("R_ENVIRON")
                                    R_ENVIRON 
"C:\\Progra~1\\R\\rw1051\\etc\\Renviron.site" 

So, I can't figure out why the libraries indicated in my file don't end
up in the library path: 

> .libPaths()
[1] "C:/PROGRA~1/R/rw1051/library"

If I rename Renviron.site as .Renviron and put it in the directory
indicated by Sys.getenv("R_USER") it still does not work. 

If I name the file .Renviron and put it in the same directory as the R
executable, it works:

> .libPaths()
[1] "C:/Jim/LocalR-Libraries/FromCran" "
C:/Jim/LocalR-Libraries/Cantata"
[3] "C:/PROGRA~1/R/rw1051/library" 

but (as I would expect) only when launching R from that directory. Of
course, I want this configuration file to be read regardless of the
directory from which I start R. 

I've scrutinized the documentation for a while now and I can't figure
out what's going wrong. 

R> version
         _              
platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    1              
minor    5.1            
year     2002           
month    06             
day      17             
language R      


Thanks very much,
Jim 


James A. Rogers, rogers at cantatapharm.com
Statistical Scientist
Cantata Pharmaceuticals 

 





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