[R] Build on Solaris 8 gcc-3.1 fails make check

Martin Maechler maechler at stat.math.ethz.ch
Mon Aug 5 16:06:31 CEST 2002


>>>>> "ChinShCh" == Chin-Shan Chuang <chinshan.chuang at stanfordalumni.org> writes:

    ChinShCh> Hi, I also seem to have the same problem.

    ChinShCh> A related question -- are NAs and NaNs supposed to
    ChinShCh> be the same in R?  If they are not, wouldn't it be
    ChinShCh> more appropriate for var(1) to return NaN 
    ChinShCh> and to take out the test "stopifnot( is.na(var(1)),
    ChinShCh> !is.nan(var(1)) )"?  (Presumably NA is used to
    ChinShCh> denote a missing value, and var(1) is not
    ChinShCh> missing.)

yes, I think you are right 
     (and it would be the same as S-plus 6.0 does
      so there, the difference between NaN and NA
      is less visible since "NaN" are printed as "NA").


    ChinShCh> Excluding this test, I also found that make check
    ChinShCh> fails at the step "stopifnot( ...,
    ChinShCh> !is.nan(c(1,NA)), ... )" or line 7877 of
    ChinShCh> base-Ex.R.  Could someone please comment on this
    ChinShCh> as well? On this compiled version of R, I get
    ChinShCh> !is.nan(c(1,NA)) returns TRUE FALSE although
    ChinShCh> !is.nan(NA) returns TRUE.

which shows that that is.nan() is doing the wrong thing for
"double" NA but is ok for logical NA, since

  c(1,NA)  is double  whereas
  NA	   is logical

This may help you find out where your compiler/linker/libraries
are doing the wrong thing...


Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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