Skip to content

a strange logical bug (PR#162)

3 messages · Jim Lindsey, Ross Ihaka, Peter Dalgaard

#
In R0.64.0, try
as.numeric(is.na(c(NA,NA,1)))
as.numeric(c(T,T,F))
  Jim

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Fri, 9 Apr 1999 jlindsey@alpha.luc.ac.be wrote:

            
My version says

	> as.numeric(is.na(c(NA,NA,1)))
	[1] 1 1 0
	> as.numeric(c(T,T,F))
	[1] 1 1 0

which I think is ok?

	Ross

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Ross Ihaka <ihaka@stat.auckland.ac.nz> writes:
Mine has
[1] -1 -1  0

Which is obviously not OK...

Seems to affect all numeric NA's:
[1] -1

This is on RedHat 5.2 (As Jim, I suspect)

Ick!