as.list() coerces logical to integer (PR#1926)
Thu, 22 Aug 2002 11:47:22 +0200 (MET DST)

A symptom was seen by Ole Christensen when using sapply(*, is.numeric).

It can be simplified  to
``lapply coerces logical to integer'' :

  > lapply(TRUE, typeof)
  [1] "integer"

But the bug is not in lapply's C code, but rather before that, 
namely in as.list() :

> typeof(as.list(TRUE)[[1]])
[1] "integer"

I'm looking into fixing this (for R-devel aka "1.6.0 unstable")
right away.


r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: