Importing data

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Importing data

Will Terry
Hi all,

I'm a new R user trying to import some tab delimited data. It's not  
clear to me why the following code won't work on my Mac:

 > read.delim("asphodel:Users:will:Desktop:Math_282:hw2:hw2-
data1.txt",header=TRUE)
Error in file(file, "r") : unable to open connection
In addition: Warning message:
cannot open file `asphodel:Users:will:Desktop:Math_282:hw2:hw1-
data1.txt'

Is this the correct syntax for specifying the path? Thanks!

-Will

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Importing data

Peter Dalgaard
Will Terry <[hidden email]> writes:

> Hi all,
>
> I'm a new R user trying to import some tab delimited data. It's not  
> clear to me why the following code won't work on my Mac:
>
>  > read.delim("asphodel:Users:will:Desktop:Math_282:hw2:hw2-
> data1.txt",header=TRUE)
> Error in file(file, "r") : unable to open connection
> In addition: Warning message:
> cannot open file `asphodel:Users:will:Desktop:Math_282:hw2:hw1-
> data1.txt'
>
> Is this the correct syntax for specifying the path? Thanks!

Hmm, wouldn't know, but it the most common problem with file paths are
misspellings, and you have it spelled in two different ways there...

Does file.choose do something useful on the Mac?

--
   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - ([hidden email])                  FAX: (+45) 35327907

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html