Re: [R] weird behaviour of summary.default

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon 12 Jun 2006 - 22:58:54 EST

On Mon, 12 Jun 2006, Stefano Calza wrote:

> Hi all.
>
> I may missing something here, but if I do summary.default(1:9999), I get:
>
> Min. 1st Qu. Median Mean 3rd Qu. Max.
> 1 2500 5000 5000 7500 9999
>
>
> but if I do summary.default(1:10001) I get:
>
> Min. 1st Qu. Median Mean 3rd Qu. Max.
> 1 2501 5001 5001 7501 10000
>
> i.e. Max is rounded to 10000.
>
> What's wrong?

Nothing: you asked for it to be rounded. Try reading the help page:

   digits: integer, used for number formatting with 'signif()' (for

           'summary.default') or 'format()' (for 'summary.data.frame').

and

> summary(1:10001, digits=7)

    Min. 1st Qu. Median Mean 3rd Qu. Max.

       1 2501 5001 5001 7501 10001

-- 
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
Received on Tue Jun 13 05:02:49 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 Tue 13 Jun 2006 - 06:12:23 EST.

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