[Rd] Bug in read.table() (PR#1477)
Tue, 23 Apr 2002 19:12:48 +0200 (MET DST)
On 23 Apr 2002, Peter Dalgaard BSA wrote:
> firstname.lastname@example.org writes:
> > > From: Huntsinger, Reid
> > > Sent: Monday, April 22, 2002 5:15 PM
> > > To: Raubertas, Richard
> > > Subject: RE: R problem
> > >
> > > [ ... ] This happens
> > > because of the attempt to convert. The function type.convert
> > > is called on columns with unspecified types; this tries to
> > > convert to "logical, integer, numeric or complex" in that
> > > order (first one that is successful wins). You have some ids
> > > like 21428-2 which type.convert doesn't like as numeric but
> > > will treat as complex. This in turn is due to R's hand-rolled
> > > "strtoc" function, which returns 0+0i for something it
> > > doesn't like. This is a valid value, so the conversion
> > > "works", and all values are converted this way...
> > >
> > > You or I should probably alert the R people. That's not very
> > > good behavior.
> Right, but not something we can fix for 1.5.0. Another version of the
> same effect is
> > scan(what=0+0i)
> 1: 21419-2
> 2: Read 1 items
>  0+0i
> A workaround would be to use the colClasses argument, or as.is.
Actually it is already fixed: it was a very simple fix. The problem was
being detected: it was just not being reported. As this was just a case
of what is done in an error condition (it can't affect any valid input) I
thought it safe to fix a week before release.
Brian D. Ripley, email@example.com
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 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
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: firstname.lastname@example.org