[R] R on MAC OS X

Joerg van den Hoff j.van_den_hoff at fz-rossendorf.de
Tue Jun 27 11:10:04 CEST 2006


Sara Mouro wrote:
> 
>> Dear all,
>>
>> I have been usig R for some time, but now I have a MAC instead of a  
>> PC, am I am having problems in reading files...
>>
>>
>> I have tried:
>> Data<-read.table("Users/SaraMM/PhD/Analises-LitterBags/Dados- 
>> Litter.txt",head=T)
>>
>> but it said:
>> Error in file(file, "r") : unable to open connection
>> In addition: Warning message:
>> cannot open file 'Users/SaraMM/PhD/Analises-LitterBags/Dados- 
>> Litter.txt', reason 'No such file or directory'
>>
>>
>> I guess that might be simple...
>> ... related to the fact that in PCs we do "C:/........"
>> .... but in iMAC, the only "path" I found was that one: "Users/ 
>> SaraMM(...)"...
>>
>> Can someone please help me on this?
>>
>> Wishes,
>> Sara
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


the (absolute) path to your file has to start with `/', i.e. your file 
should be

"/Users/SaraMM/PhD/Analises-LitterBags/Dados-Litter.txt"
  ^
  |

the leading slash was missing in your read.table call (in the original 
way it is a relative path name and would only work, if your current 
directory within R were `/' itself)

joerg



More information about the R-help mailing list