[R] difference between max in summary table and max function

Franckx Laurent laurent.franckx at vito.be
Fri Feb 13 11:59:57 CET 2015


Dear all

I have found out that the max in the summary of an integer vector is not always equal to the actual maximum of that vector. For example:


> testrow <- c(1:131509)
> summary(testrow)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
      1   32880   65760   65760   98630  131500
> max(testrow)
[1] 131509

This has occurred both in a Windows and in a Linux environment.

Does this mean that the max value in the summary is only an approximation?

Best regards

Laurent Franckx, PhD
Senior researcher sustainable mobility
VITO NV | Boeretang 200 | 2400 Mol
Tel. ++ 32 14 33 58 22| mob. +32 479 25 59 07 | Skype: laurent.franckx | laurent.franckx at vito.be | Twitter @LaurentFranckx




VITO Disclaimer: http://www.vito.be/e-maildisclaimer



More information about the R-help mailing list