[R] reading text file in Windows (was no subject)

John Fox jfox at mcmaster.ca
Wed Jul 14 17:39:29 CEST 2004


Dear David,

You got several useful suggestions for what you may have done wrong. I often
find that it's easier to use read.table(file.choose()) and to navigate to
the file in the resulting dialog than to type the path to the file.

I hope that this helps,
 John

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of 
> Herman, David (NIH/NIMH)
> Sent: Wednesday, July 14, 2004 9:03 AM
> To: 'R-help at lists.R-project.org'
> Subject: [R] (no subject)
> 
> Hello,
>             I'm new to R, and I'm having trouble importing a 
> text file (I'm on Windows XP)
>  
> >  m <- read.table("/Desktop/work/128_L")
> Error in file(file, "r") : unable to open connection In 
> addition: Warning message: 
> cannot open file `/Desktop/work/128_L'
>  
>  
> do you know why this isn't working?  All I have is a bunch of 
> text files, each with a single column of about 30,000 rows.
>  
> thanks
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html




More information about the R-help mailing list