[R-SIG-Mac] Path separator issues in OSX 10.5

Ben Tupper PemaquidRiver at tidewater.net
Wed Jan 21 19:15:51 CET 2009


Hello,

I have a new Mac OSX 10.5 iMac running R 2.8.1.  Using Finder, I  
manually created a folder for R source code as /Users/Shared/code/R.

If I use R.app's "Misc>Change Working Directory..." menu dialog to  
navigate to /Users/Shared/code/R and then use getwd() to print the  
directory path, the components of the path are separated with colons  
as shown:  /Users/Shared/Shared:code/Shared:code:R

The R function file.path() does not produces these colon-ized paths.

I have pasted below the commands I used as well as the output of  
sessionInfo().  Additionally, I have provided the output of the ls  
command from the Terminal which also appears to use the colon-ized form.

I cannot replicate this issue in OSX 10.4.11 and R 2.8.1.  I am not  
sure how to proceed and suggestions are most welcome.

Thanks,
Ben



# file.path() creates the paths with the path separator "/"
 > ROOTDIR <- file.path("/", "Users", "Shared")
 > file.path(ROOTDIR, "code", "R")
[1] "//Users/Shared/code/R"

# but according to the dir() it is unreadable
 > dir(file.path(ROOTDIR, "code", "R"))
character(0)
Warning message:
In dir(file.path(ROOTDIR, "code", "R")) :
  list.files: '//Users/Shared/code/R' is not a readable directory


# use R.app's Misc>Change Working Directory...
# to change to "/Users/Shared/code/R"
 > getwd()
[1] "/Users/Shared/Shared:code/Shared:code:R"


 > sessionInfo()
R version 2.8.1 (2008-12-22)
i386-apple-darwin8.11.1

locale:
en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
 >


 From Terminal...
Henry:Shared Brian$ ls
SC Info                Shared:code        Shared:data        Shared:doc



More information about the R-SIG-Mac mailing list