a strange logical bug (PR#162)
Fri, 9 Apr 1999 11:37:42 +0200
> Mine has
> > as.numeric(is.na(c(NA,NA,1)))
>  -1 -1 0
> Which is obviously not OK...
> Seems to affect all numeric NA's:
> > A)))
>  -1
> This is on RedHat 5.2 (As Jim, I suspect)
On RH 5.2
The isnan() function returns a non-zero value if value is
"not-a-number" (NaN), and 0 otherwise.
and that non-zero is not defined!
isnan(), isnand(), and isnanf() return true (1) if the argu-
ment dsrc or fsrc is a NaN; otherwise they return false (0).
and isnan is used in Arith.c for ISNAN and that is used in coerce.c
for do_isna (why?)
So ISNAN needs to be redefined on Linux at least. Using ISNA not ISNAN
solves this one for me.
Brian D. Ripley, email@example.com
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
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: firstname.lastname@example.org