Dear all, <BR><BR>I was used to work on R1.6 and I have now passed
on R1.6.2 but I can''t read my <BR>file (and that is a big
problem!!).<BR>I made a data sheet with some <BR>spreadsheet in
Excell, and save it as separeted by tab .txt.<BR>I write in
R<BR>read.table
("file.txt",h=T,sep="/t",dec=",")<BR>But R
consider that I have only one column (eG one variable)!!!<BR><BR>I
have tried a lot of thing (I don''t wrote the spreadsheet,I have
verified in word <BR>that my column was really separated by tabulation...)
but I really don''t find.<BR>It may be really simple but
I''m not really good to speak with
R!<BR><BR>Regards<BR><BR>Sabrina
Servanty.<P><P>______________________________________________________<BR>Boîte
aux lettres - Caramail - <A
HREF=http://www.caramail.com>http://www.caramail.com</A><P>
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of sabrina
servanty
Sent: Friday, March 21, 2003 1:22 PM
To: R-help at stat.math.ethz.ch
Subject: [R] Problem with read.table
Dear all,
I was used to work on R1.6 and I have now passed on R1.6.2 but I can't
read my
file (and that is a big problem!!).
I made a data sheet with some
spreadsheet in Excell, and save it as separeted by tab .txt.
I write in R
read.table ("file.txt",h=T,sep="/t",dec=",")
But R consider that I have only one column (eG one variable)!!!
I have tried a lot of thing (I don't wrote the spreadsheet,I have
verified in word
that my column was really separated by tabulation....) but I really
don't find.
It may be really simple but I'm not really good to speak with R!
Regards
Sabrina Servanty.
---------------------------------
Sabrina,
Try reversing the "/" in your 'sep = "/t"' argument.
You have it
reveresed at the moment, assuming that is is copied here as you are
using it.
The tab character is: "\t"
So the command should be:
read.table ("file.txt",h=T,sep="\t",dec=",")
HTH,
Marc Schwartz
How about replacing "/t" by "\t" ? Jerome
Should that be sep="\t" ? On Fri, 21 Mar 2003, sabrina servanty wrote:> Dear all, > > I was used to work on R1.6 and I have now passed on R1.6.2 but I can't read my > file (and that is a big problem!!). > I made a data sheet with some > spreadsheet in Excell, and save it as separeted by tab .txt. > I write in R > read.table ("file.txt",h=T,sep="/t",dec=",") > But R consider that I have only one column (eG one variable)!!! > > I have tried a lot of thing (I don't wrote the spreadsheet,I have verified in word > that my column was really separated by tabulation...) but I really don't find. > It may be really simple but I'm not really good to speak with R! > > Regards > > Sabrina Servanty. > > ______________________________________________________ > Bo?te aux lettres - Caramail - http://www.caramail.com > > >-- 318 Carr Hall bolker at zoo.ufl.edu Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker Box 118525 (ph) 352-392-5697 Gainesville, FL 32611-8525 (fax) 352-392-3704
Have you tried "count.fields" to confirm that R thinks all records have the same number of fields? Spencer Graves sabrina servanty wrote:> Dear all, > > I was used to work on R1.6 and I have now passed on R1.6.2 but I can't > read my > file (and that is a big problem!!). > I made a data sheet with some > spreadsheet in Excell, and save it as separeted by tab .txt. > I write in R > read.table ("file.txt",h=T,sep="/t",dec=",") > But R consider that I have only one column (eG one variable)!!! > > I have tried a lot of thing (I don't wrote the spreadsheet,I have > verified in word > that my column was really separated by tabulation...) but I really don't > find. > It may be really simple but I'm not really good to speak with R! > > Regards > > Sabrina Servanty. > > ______________________________________________________ > Bo?te aux lettres - Caramail - http://www.caramail.com > > > ------------------------------------------------------------------------ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
You were right!<BR>Thank a lot, I think that I''m really dumm!<BR>I''ve lost 3 hours trying to solve the problem!!<BR><BR>Regards,<BR><BR>Sabrina Servanty<P><P>______________________________________________________________<BR><FONT FACE=Verdana SIZE=2>Gagne une PS2 ! Envoie un SMS avec le code PS au 61166<BR>(0,35 Euro Hors coût du SMS)<BR></FONT><P>