Graeme.Ambler@bristol.ac.uk
2003-Sep-08 14:57 UTC
[Rd] Accuracy problems in summary()? (PR#4101)
Full_Name: Graeme Ambler Version: 1.7.1 OS: Red Hat Linux 9 Submission from: (NULL) (137.222.80.161) There seems to be a curious accuracy-related problem in summary(). Try the following: test<-matrix(rnorm(2000),nc=2) summary(test) summary(test[,1]) The first use of summary() is fine. The second will lie to you about the accuracy to which numbers are displayed. The results I got were:> summary(test)X1 X2 Min. :-2.68358 Min. :-3.780882 1st Qu.:-0.67451 1st Qu.:-0.721148 Median : 0.01577 Median : 0.006311 Mean : 0.00644 Mean :-0.022287 3rd Qu.: 0.69642 3rd Qu.: 0.630215 Max. : 3.11174 Max. : 2.827698> summary(test[,1])Min. 1st Qu. Median Mean 3rd Qu. Max. -2.68400 -0.67450 0.01577 0.00644 0.69640 3.11200 Accuracy in the second case always seems to be 4SF, yet 6 are displayed in some cases. I have been able to reproduce this bug with 100% reliability. Apologies if this has been reported before, I couldn't find it when I searched.
maechler@stat.math.ethz.ch
2003-Sep-08 16:09 UTC
[Rd] Accuracy problems in summary()? (PR#4101)
A bug report with a "?" is **wrong**, almost by definition! (and your definitely is). Please ask questions on R-help. And this has become almost a FAQ. Note that sending bug-reports for non-bugs can be quite counter-productive. The waste of time it produces to R developers will not improve the quality of development nor answers... (yes, I'm grouchy.....) Martin Maechler <maechler@stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 <><