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

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


On Tue, 29 Feb 2000, Thomas Lumley wrote:

> 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.


Ok. read.table and count.fields don't have identical defaults.

R> args(count.fields)
function (file, sep = "", quote = "", skip = 0)

R> args(read.table)
function (file, header = FALSE, sep = "", quote = "\"'", dec = ".",
    row.names, col.names, as.is = FALSE, na.strings = "NA", skip = 0)


So if count.fields likes your data but read.table doesn't, you probably
want

 read.table("Consult/krasdata",sep="\t",quote="")


Please don't use Base64 encoding in attached files -- it was quite hard to
find a program to decode it, and it's really intended for sending binary
files.  Use plain text, and if your mailer insists on encoding attachments
then just cut and paste the output into the message.


	-thomas


Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._