[R] Weird read.table error? (line `n' did not have `m' elements)

Peng Yu pengyu.ut at gmail.com
Tue Sep 22 04:12:17 CEST 2009


Hi,

I have the following commands. It says line 5205 does not have 22
elements. But I use my 'vim' checked that line in the file. It has 22
fields. Can somebody let me know how to further debug this case?

Regards,
Peng

> annotation = read.table("../EC_results/Juan_15wks_gene_core.xls", header=T, sep='\t',quote='')
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  :
  line 5204 did not have 22 elements
> annotation = count.fields("../EC_results/Juan_15wks_gene_core.xls", sep='\t',quote='')
> which(annotation!=22)
[1] 5205




More information about the R-help mailing list