Re: [Rd] mean(NA) returns -(1+.Machine$integer.max) (PR#9097)

From: <ripley_at_stats.ox.ac.uk>
Date: Wed 26 Jul 2006 - 04:54:51 GMT


That happened in 2.3.0 only, and we do ask people not to report on obselete versions of R.

>From the NEWS for 2.3.1

    o	mean() on an integer (or logical) vector was treating NAs as
	actual values (unless na.rm = TRUE).

and the actual value is the largest negative integer, usually -2147483648.

On Tue, 25 Jul 2006, Dirk Eddelbuettel wrote:

>
> On 26 July 2006 at 04:17, btyner@stat.purdue.edu wrote:
> | Full_Name: Benjamin Tyner
> | Version: 2.3.0
> | OS: linux-gnu (debian)
> | Submission from: (NULL) (71.98.75.54)
> |
> |
> | > mean(NA)
> | returns -2147483648 on my system, which is -(1+.Machine$integer.max)
>
> There is quite possibly something wrong with your libraries. Did you build
> this yourself, or is it Christian's backport for Debian stable, or is it a
> regular Debian build? What happens if you upgrade to Christian's (from CRAN
> and its mirrors) or my (Debian mirrors) build of the current version 2.3.1 ?
>
> edd@basebud:~> dpkg -l r-base-core | grep "^ii" | cut -c-78
> ii r-base-core 2.3.1-1 GNU R core of statistical computing language
> edd@basebud:~> R --quiet
> > mean(NA)
> [1] NA
> > q("no")
> edd@basebud:~>
>
> All fine here.
>
> Dirk
>
>
> |
> | > sessionInfo()
> | Version 2.3.0 (2006-04-24)
> | i686-pc-linux-gnu
> |
> | attached base packages:
> | [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets"
> | [7] "base"
> |
> | ______________________________________________
> | R-devel@r-project.org mailing list
> | https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
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-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed Jul 26 14:59:01 2006

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 26 Jul 2006 - 06:28:45 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.