[R] Irix 6.5: > is.na(c(1,NA)) #> FALSE FALSE

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Wed Feb 17 22:59:29 CET 1999


George White <gwhite at bodnext.bio.dfo.ca> writes:

> R 0.63.2, compiled using SGI cc and f90 on Irix 6.5 gives:
> 
> > is.na(NA)
> [1] TRUE                # OK
> > is.na(c(1,NA))
> [1] FALSE FALSE         # expected FALSE TRUE
> > is.nan(NaN)
> [1] FALSE               # expected TRUE
> > is.nan(1/0)
> [1] FALSE               # ditto
> 
> The above functions work correctly for R compiled with gcc and g77 on an
> Irix 6.2 system.  The Irix 6.5 release notes explain that the test
> (x!=x) will be compiled to "false" unless the command line option:
> 
> -OPT:IEEE_NaN_inf=ON
> 
> is supplied for the SGI compilers.  

Er? Does that help? Since we rely on (from Arith.h)

#define ISNAN(x)                ((x)!=(x))

all over the place, it's not surprising that it won't work if it
compiles to false. (What kind of standards compliance is that
anyway?!) 

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list