[R] max/summary

Prof Brian D Ripley ripley at stats.ox.ac.uk
Sat May 17 20:59:39 CEST 2003


They are the same value.  Lokking at ?summary will show you that the number
of significant values are different in the two cases (7 and 4).

You need to distinguish between the value and how it is printed.

On Sat, 17 May 2003, Mahbub Latif wrote:

> What is the reason for getting two different max of a
> vector from two functions max() and summary()? Here is
> an example,
>
> > set.seed(2222)
> > x <- sample(x=1:100000, size=10000, replace=T)
> > max(x)
> [1] 99992
> > summary(x)
>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>       6   24510   49950   50020   75040   99990
>
> Which value is the correct one? I had this problem
> while I was working with microarry data.

-- 
Brian D. Ripley,                  ripley at 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




More information about the R-help mailing list