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
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 >
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 at 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