[R] Problem with read.table
Marc Schwartz
mschwartz at medanalytics.com
Fri Mar 21 20:55:55 CET 2003
-----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
More information about the R-help
mailing list