as.list() coerces logical to integer (PR#1926)
maechler@stat.math.ethz.ch
maechler@stat.math.ethz.ch
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]]
[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.
Martin
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._