What is the R error here? The default delimiter in read.table is not \t but whitespace, so the first example has 2 and 3 rows (fine for header=T) and the second has 2 and 4 rows.
On Fri, 21 Oct 2005 [EMAIL PROTECTED] wrote: > Upon upgrading to R 2.2.0 on my Windows box, I found that one of my > packages no longer compiled, giving this error: > > Error in read.table(zfile, header =3D TRUE) : > more columns than column names > Execution halted > > After removing every line of code from my package and still not being > able to compile it, I found the error to be related to a .txt file in my > data directory. I reduced my data file to a very simple example which > causes the error, and a nearly identical file which does not cause the > problem. > > A file with these contents causes the error (I am using \t to indicate > the usual tab delimiter). > x \t y > A B C \t DEF > > However, if I remove one of the spaces between A and B or B and C, the > package compiles fine: > x \t y > A BC \t DEF > > I can only guess that there is some kind of parsing problem when there > is more than one space between tab delimiters. Looks more like a user misunderstanding of ?data. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel