You should make your missing value indicator something other than your separator indicator: 1. Use a text editor to indicate all missing values as NA or 2. Use a text editor to replace the 3 separator spaces with, for example, a comma or semicolon and use the argument sep="," or sep=";" which won't trigger on ANY whitespace.
HTH, Rob ----- Original Message ----- From: "AGUSTIN PEREZ MARTIN" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 20, 2004 8:01 AM Subject: [R] read.table with spaces > DeaR useRs: > > Excuses for my english. I am trying to read a file with my dats and the format is a number, 3 spaces, other number, etc... > When I use: > a<-read.table(file="c:/datos2.dat",sep="") > R sais: > Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : > line 3 did not have 34 elements > > And I see my dats and in line 3 the first number is an space (missing value) > SOS help me!!!! > > Thanks. > > -- > > ==============oOo============= > Visit my website in: > http://users.servicios.retecal.es/aperez2 > Maybe you can find something interesting > ============================== > -- > > ______________________________________________ > [EMAIL PROTECTED] 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 > ______________________________________________ [EMAIL PROTECTED] 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
