Re: [R] A curious bug in read.xls

From: Peter Dalgaard <>
Date: Tue, 10 Jun 2008 17:03:29 +0200

Alberto Monteiro wrote:
> I found a curious bug in read.xls. I don't know if it's reproducible.
> It's like this: suppose I do a read.xls in a spreadsheet. A column
> begins with a number. Then, any strings below it will be rendered as NA.
> If the column begins with a string, then it will be rendered correctly.
> Alberto Monteiro
Notice that this is in a contributed package (at least two of which have a read.xls...), not R as such.

It would seem to be by design: The first value determines the variable type. You should be able to override this logic by using the colClasses argument.

   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (              FAX: (+45) 35327907

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 10 Jun 2008 - 15:46:14 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 Tue 10 Jun 2008 - 16:30:37 GMT.

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

list of date sections of archive