[R] problem reading in a csv file
Chris Howden
tall.chriss at yahoo.com.au
Tue Jun 23 03:38:58 CEST 2009
Morning all,
I'm trying to read in a csv file and R is having some problems. For some
reason its not 'seeing' all the columns for each row, and as such is not
reading in the file.
I've opened the file in EXCEL and I can't see any problems with it. All rows
have the correct number of columns.
The code and error messages I've used are below. I've also run
'count'fields" and have included that output too.
Any help or suggestions would be much appreciated.
Thanks
<-read.table("RWM Shopper Tracker - RAW DATA - 22JUN09 - Copy.csv",
header=TRUE, sep =",", row.names=NULL)
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
:
line 13 did not have 2264 elements
> count.fields("RWM Shopper Tracker - RAW DATA - 22JUN09 - Copy.csv",
sep=",")
[1] 2264 2264 2264 2264 2264 2264 2264 2264 2264 2264 384 2264 2264
384 2264 2264 2264 2264 2264 2264 2264 2264
[23] 2264 2264 2264 2264 152 2264 384 2264 2264 2264 2264 2264 2264
2264 2264 2264 2264 2264 2264 2264 2264 2264
Chris Howden
Marketing Scientist
For all your Analysis, Modelling, Experimental Design and Training needs
(mobile) 0410 689 945
(fax / office) (+618) 8952 7878
tall.chriss at yahoo.com.au
More information about the R-help
mailing list