[R] summary() and range(): inconsistency?

Thomas Lumley tlumley at u.washington.edu
Mon Nov 26 17:49:28 CET 2001


On Mon, 26 Nov 2001, Agustin Lobo wrote:

>
> I've found the following and I'm kind
> of confused:
>
> > summary(delme)
>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>       1    2950    5699    5756    8572   11680
>
> > range(delme)
> [1]     1 11675
>
>
> summary() and range()  give different Max. value for the same
> vector!

summary reports only a limited number of significant digits (4, by
default) and
R> signif(11675,4)
[1] 11680

See help(summary) for how to adjust this default.

	-thomas


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list