[R] Bug in boxplot.stats?
Trenkler, Dietrich
dtrenkler at nts6.oec.uni-osnabrueck.de
Tue Sep 25 15:44:11 CEST 2001
Is this a bug?
>"xx" <- c(50, 79, 120, 78, 90, 100, 78, 80,
+ 90, 80, 60, 39, 90, 85, 140, 100, 80, 80)
> boxplot.stats(xx)$stats
[1] 60 78 80 90 100
> boxplot.stats(0.1*xx)$stats
[1] 7.8 7.8 8.0 9.0 10.0
I suppose the way the numbers in 0.1*xx are internally stored may
cause this problem:
> formatC(0.1*xx[2],format="f",digits=16)
[1] "7.9000000000000004"
Version:
platform = i386-pc-mingw32
arch = x86
os = Win32
system = x86, Win32
status =
major = 1
minor = 3.1
year = 2001
month = 08
day = 31
language = R
Windows NT 4.0 (build 1381) Service Pack 6
--- D.Trenkler ---
****************************************************************************
*****
Dr. Dietrich Trenkler (dtrenkler at nts6.oec.uni-osnabrueck.de)
Statistik / Empirische Wirtschaftsforschung
Universitaet Osnabrueck
Rolandstrasse 8 Phone: +49(0) 541-969-2753
D-49069 Osnabrueck Fax : +49(0) 541-969-2744
GERMANY
****************************************************************************
*****
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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