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]]
Hi, I but you left out the extension that Windows is hiding from you. Vincent On Wednesday 14 July 2004 10:02, Herman, David (NIH/NIMH) wrote:> 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-- Vincent Goulet, Professeur agr??g?? ??cole d'actuariat Universit?? Laval, Qu??bec Vincent.Goulet at act.ulaval.ca http://vgoulet.act.ulaval.ca
Hello!
It just is not able to find the file as the error message says.
You can check if you are specified the right directory path using dir.
?dir
dir("/Desktop/work/")
I gues you are not.
If you are specifying the full path, precede it with the drive name c:/
Eryk
*********** REPLY SEPARATOR ***********
On 7/14/2004 at 10:02 AM Herman, David (NIH/NIMH) wrote:
>>>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
Dipl. bio-chem. Eryk Witold Wolski @ MPI-Moleculare Genetic
Ihnestrasse 63-73 14195 Berlin 'v'
tel: 0049-30-83875219 / \
mail: wolski at molgen.mpg.de ---W-W----
http://www.molgen.mpg.de/~wolski
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