Re: [R] arith-true mean() fails make check on IRIX

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed 03 Jan 2007 - 07:45:02 GMT

On Tue, 2 Jan 2007, fissell+@pitt.edu wrote:

> Hello,
>
> I am building R-2.4.1 on an SGI IRIX platform, using gcc 3.3.
> gmake check failed, and the arith-true.Rout.fail file indicated:
>> is.na(mean(c(1,NA,NA)[-1], trim = .1, na.rm = TRUE))
> [1] FALSE
>>
>
> I tried the mean() command in R and got:
>> mean(c(1,NA,NA)[-1], trim = .1, na.rm = TRUE)
> [1] Inf
>
> I think the problem is in the na.rm = TRUE, because I get:
>> mean(c(1,NA,NA)[-1])
> [1] NA
>
> How serious is this problem, and is there a workaround ?

It indicates that your compiler is getting the wrong answer when computing 0./0, and that does look quite serious. You should get the same answer as mean(numeric(0)), and that should be NaN.

As the compiler is very old, you might like to try updating it.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed Jan 03 19:20:21 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 03 Jan 2007 - 08:30:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.