[Rd] Bug in read.table (PR#463)

Thomas Lumley thomas@biostat.washington.edu
Tue, 29 Feb 2000 15:16:33 -0800 (PST)


On Tue, 29 Feb 2000 venkat@biosta.mskcc.org wrote:

> 
> I want to report a bug in read.table.  The attached output demonstrates
> the bug.  Unfortunately, the data file contains confidential information
> and hence cannot be attached.  Is there any way to figure out the cause 
> of the bug and fix it?  Thanks.


Here's the output in readable form. The bug seems to be that
count.fields() thinks the records are the same length but read.table
doesn't.

	-thomas


[venkat@msk-130-153 venkat]$ R

R : Copyright 2000, The R Development Core Team
Version 1.0.0  (February 29, 2000)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type    "?license" or "?licence" for distribution details.

R is a collaborative project with many contributors.
Type    "?contributors" for a list.

Type    "demo()" for some demos, "help()" for on-line help, or
        "help.start()" for a HTML browser interface to help.
Type    "q()" to quit R.

> options(width=72)
> count.fields("Consult/krasdata",sep="\t")
  [1] 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
 [23] 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
 [45] 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
 [67] 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
 [89] 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
> read.table("Consult/krasdata",sep="\t")

row.lens=
  [1] 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
 [23] 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
 [45] 18 18 18 18 18 18 18 18 18 18 18 18 18  1  1 18 18 18 18 18 18 18
 [67] 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
 [89] 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
Error in read.table("Consult/krasdata", sep = "\t") :
        all rows must have the same length.
>
> version
         _
platform i686-unknown-linux
arch     i686
os       linux
system   i686, linux
status
major    1
minor    0.0
year     2000
month    February
day      29
language R
>


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._