> > 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
Looks like you forgot the leading "/" as in> Data<-read.table("/Users/SaraMM/PhD/Analises-LitterBags/Dados- > Litter.txt",head=T)> > > > 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[[alternative text/enriched version deleted]]
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.htmlthe (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
Hi listers, I just got a MAC, so I am trying to use the command READ.TABLE but I am getting a error that is probably caused by the wrong path that I am using... The command is the following... file<-read.table("/Users/M?rcio/UdeM/Travail Dirig?/Data/MU284 Population.txt",header=T,skip=24) And I am getting the following error... Erro em file(file, "rt") : n?o ? poss?vel abrir a conex?o Al?m disso: Warning message: In file(file, "rt") : cannot open file '/User/M?rcio/UdeM/Travail_Dirig?/Data/MU284_Population.txt': No such file or directory I checked already the messages but I didn't find what could be my mistake... Any suggestions??? Thanks in advance, Marcio -- View this message in context: http://n4.nabble.com/R-on-MAC-OS-X-tp802729p1557818.html Sent from the R help mailing list archive at Nabble.com.