Displaying 1 result from an estimated 1 matches for "mydatacolclass".
Did you mean:
mydatacolclasses
2013 Jan 24
0
How to get read.table() or scan() to report line on which error occurs
...the FAQs and lists
and web for an answer but not found one.
I have a text file of several hundred thousand rows and somewhere in the middle
there is a malformed row.
Doing:
mydata<-read.table("mydata.dat", header=FALSE, sep=" ",
col.names=mydatacolnames, colClasses=mydatacolclasses, row.names="hash")
results in:
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
scan() expected 'a real', got 'MONOCHROME2'
Calls: read.table -> scan
Execution halted
which is not very helpful, since it does not report whe...