some errors
Kasper,
On Jun 9, 2005, at 1:08 AM, Kasper Daniel Hansen wrote:
First a summary: amongst the very many help suggestion, the best approach seems to be to use ~/.Renviron: in that file it is possible to set "environment" variables which are used even if there is no environment, such as when start the R GUI. This means that the values will be used in every invocation fo R - under shell, in Carbon Emacs, in the GUI.
Yes.
Now, I actually tried that out without success before my post. I have done some further research and I think I have found some kind of bug (or else something very strange).
I still cannot reproduce it - it works perfectly for me:
gammu:urbanek$ uname -srp
Darwin 8.1.0 powerpc
gammu:urbanek$ ls -ld /tmp/bar
drwxr-xr-x 2 urbanek wheel 68 Jun 9 12:38 /tmp/bar
gammu:urbanek$ cat ~/.Renviron
R_LIBS=/tmp/bar
gammu:urbanek$ echo =$R_LIBS=
==
gammu:urbanek$ R
R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.1.0 Patched (2005-05-12), ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for a HTML browser interface to help.
Type 'q()' to quit R.
> .libPaths()
[1] "/tmp/bar"
[2] "/Library/Frameworks/R.framework/Resources/library"
> Sys.getenv("R_LIBS")
R_LIBS
"/tmp/bar"
>
If you want to try to debug your problem, you may want to look at
$R_HOME/library/base/R/Rprofile, because that is where .libPaths gets
set.
Just for completeness sake: I am running Tiger, with the R-2.1.0 patched version. I do not have administration privileges, but it seems to me that the permissions on ~/Library/ and subdirectories are as they ought to be.
Can you, please, check the ls -ld $R_LIBS output?
There is another possible solution that involves editing ~/.MacOSX/environment.plist, but I never managed to get that working
BTW: That works only for LS-started applications. Cheers, Simon