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.fisch...@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.fisch...@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@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


--

* *
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to