Full_Name: Andreas Fischlin Version: 2.8.1 OS: Mac OS X 10.5.6 Submission from: (NULL) (84.75.178.229) R.home() returns "/Library/Frameworks/R.framework/Resources" although there is no such directory present. Inspecting the actual directory structure of the R installation indicates that the correct value R.home() should contain is: '/Library/Frameworks/R.framework/Versions/2.8/Resources' Detected by af, ETH Zurich / 1.Feb.2009 using R 2.8.1 under Mac OS X 10.5.6
R.home() of R 2.8.1 Mac OS X is wrong (PR#13494)
4 messages · andreas.fischlin at env.ethz.ch, Simon Urbanek, Brian Ripley +1 more
On Feb 1, 2009, at 1:50 PM, andreas.fischlin at env.ethz.ch wrote:
Full_Name: Andreas Fischlin Version: 2.8.1 OS: Mac OS X 10.5.6 Submission from: (NULL) (84.75.178.229) R.home() returns "/Library/Frameworks/R.framework/Resources" although there is no such directory present.
Then your installation is broken. You should re-install R to fix your installation. In R 2.8.1: fino:~$ file /Library/Frameworks/R.framework/Resources /Library/Frameworks/R.framework/Resources: directory This is true for all R installations from CRAN as well as all custom installations with framework enabled (default on OS X). Cheers, S
Inspecting the actual directory structure of the R installation indicates that the correct value R.home() should contain is: '/Library/Frameworks/R.framework/Versions/2.8/Resources'
It is present on my system (R reinstalled yesterday), so it looks like you broke yours. More precisely, there is a link at /Library/Frameworks/R.framework/Resources to the correct place. How did you think R could possibly work with this broken? R.home() is used all over the place in R's own scripts.
On Sun, 1 Feb 2009, andreas.fischlin at env.ethz.ch wrote:
Full_Name: Andreas Fischlin Version: 2.8.1 OS: Mac OS X 10.5.6 Submission from: (NULL) (84.75.178.229) R.home() returns "/Library/Frameworks/R.framework/Resources" although there is no such directory present. Inspecting the actual directory structure of the R installation indicates that the correct value R.home() should contain is: '/Library/Frameworks/R.framework/Versions/2.8/Resources' Detected by af, ETH Zurich / 1.Feb.2009 using R 2.8.1 under Mac OS X 10.5.6
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Thank you all for the replies. However, I figured it now out, there is
nothing broken. The reason I got confused is only because there are
symbolic links used extensively and some tests failed in my script as a
consequence (see below).
My installation is fine and looks in fact like this:
afischli$ cd /Library/Frameworks/R.framework
afischli$ ls -l
total 40
lrwxr-xr-x 1 root admin 24 Jan 13 15:24 Headers ->
Versions/Current/Headers
lrwxr-xr-x 1 root admin 30 Jan 13 15:24 Libraries ->
Versions/Current/Resources/lib
lrwxr-xr-x 1 root admin 31 Jan 13 15:24 PrivateHeaders ->
Versions/Current/PrivateHeaders
lrwxr-xr-x 1 root admin 18 Jan 13 15:24 R -> Versions/Current/R
lrwxr-xr-x 1 root admin 26 Jan 13 15:24 Resources ->
Versions/Current/Resources
drwxrwxr-x 7 root admin 238 Feb 1 20:17 Versions
afischli$ cd Versions
afischli$ ls -l
total 8
drwxrwxr-x 6 root admin 204 May 24 2007 2.5
drwxrwxr-x 6 root admin 204 Nov 30 2007 2.6
drwxrwxr-x 6 root admin 204 Jan 13 15:24 2.8
lrwxr-xr-x 1 root admin 3 Jan 13 15:24 Current -> 2.8
This means there is nothing broken. The consequence is that R commands
such as:
> R.home()
[1] "/Library/Frameworks/R.framework/Resources"
> setwd(R.home())
> getwd()
[1] "/Library/Frameworks/R.framework/Versions/2.8/Resources"
give differing answers, which means that a test such as
setwd(R.home())
if (getwd() == R.home()) {
always fails, although the setwd command was actually successful. Guess
this all explains the problem and sorry for the bandwidth waste ;-)
Regards,
Andreas Fischlin
________________________________________________________________________
ETH Zurich
Prof. Dr. Andreas Fischlin
Systems Ecology - Institute of Integrative Biology
CHN E 21.1
Universitaetstrasse 16
8092 Zurich
SWITZERLAND
andreas.fischlin at env.ethz.ch
www.sysecol.ethz.ch
+41 44 633-6090 phone
+41 44 633-1136 fax
Make it as simple as possible, but distrust it!
________________________________________________________________________
Prof Brian Ripley wrote:
It is present on my system (R reinstalled yesterday), so it looks like you broke yours. More precisely, there is a link at /Library/Frameworks/R.framework/Resources to the correct place. How did you think R could possibly work with this broken? R.home() is used all over the place in R's own scripts. On Sun, 1 Feb 2009, andreas.fischlin at env.ethz.ch wrote:
Full_Name: Andreas Fischlin Version: 2.8.1 OS: Mac OS X 10.5.6 Submission from: (NULL) (84.75.178.229) R.home() returns "/Library/Frameworks/R.framework/Resources" although there is no such directory present. Inspecting the actual directory structure of the R installation indicates that the correct value R.home() should contain is: '/Library/Frameworks/R.framework/Versions/2.8/Resources' Detected by af, ETH Zurich / 1.Feb.2009 using R 2.8.1 under Mac OS X 10.5.6
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
* *