a strange logical bug (PR#162)

Nicholas Lee Nicholas Lee <N.J.Lee@statslab.cam.ac.uk>
Fri, 9 Apr 1999 12:48:26 +0100 (BST)


On Fri, 9 Apr 1999 ripley@stats.ox.ac.uk wrote:

> > > as.numeric(is.na(c(NA,NA,1)))
> > [1] -1 -1  0
> > 
> > Seems to affect all numeric NA's:
> > 
> > > A)))
> > [1] -1
> > 
> > This is on RedHat 5.2 (As Jim, I suspect)
> 
> On RH 5.2

I don't seem to have this problem on Debian 2.2 (with glibc2.1):

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


Nicholas


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._