Re: [R] Read.table - Less rows than original data

From: Ben Bolker <>
Date: Wed, 09 Jul 2008 20:17:00 +0000 (UTC)

phoebe kong <sityeekong <at>> writes:

> I built a 1,273,230 by 6 data set named "mydata2", it was saved in the
> following command,
> write.table(mydata2, "mydata2.txt",,,quote=F,sep="\t")
> The next day I read in above saved text file into R,
> temp<-read.table("mydata2.txt",header=T,sep="\t",na.strings="NA")
> However, the dimension of "temp" is 636,615 X 6.

  A long shot: do you by any chance have any "#" characters in your data set? If they all occurred for the first time in column number 636,616 that would produce the observed problem. If so, set comment.char="".

  Does this happen if you generate a random data set?

  Ben Bolker mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 09 Jul 2008 - 20:29:35 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Jul 2008 - 20:33:44 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive