[R] weird behaviour of summary.default

Gabor Grothendieck ggrothendieck at gmail.com
Mon Jun 12 14:43:49 CEST 2006


Try

summary(1:10001, digits = 5)

or

old <- options(digits = 8)
summary(1:10001)


Note default for digits= in:

args(summary.default)



On 6/12/06, Stefano Calza <stecalza at tiscali.it> 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?
>
> My system:
>
>               _
> platform       i486-pc-linux-gnu
> arch           i486
> os             linux-gnu
> system         i486, linux-gnu
> status
> major          2
> minor          3.1
> year           2006
> month          06
> day            01
> svn rev        38247
> language       R
> version.string Version 2.3.1 (2006-06-01)
>
>
> Regards,
> Stefano
>
> ______________________________________________
> R-help at 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
>



More information about the R-help mailing list