[R] Max vs summary inconsistency
Thomas Lumley
tlumley at u.washington.edu
Mon Aug 27 20:14:40 CEST 2007
On Mon, 27 Aug 2007, Adam D. I. Kramer wrote:
> Hello,
>
> I'm having the following questionable behavior:
>
>> summary(m)
> Min. 1st Qu. Median Mean 3rd Qu. Max.
> 1 13000 26280 25890 38550 50910
>> max(m)
> [1] 50912
>
>> typeof(m)
> [1] "integer"
>> class(m)
> [1] "integer"
>
> ...it seems to me like max() and summary(m)[6] ought to return the same
> number. Am I doing something wrong?
>
They do return the same number, they just print it differently. summary() prints four significant digits by default.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
More information about the R-help
mailing list