[Rd] print method for summary adds trailing zero

From: Ole Fredslund Christensen <OleF.Christensen_at_agrsci.dk>
Date: Fri, 02 Mar 2012 14:57:08 +0100


Dear R-devel

Thought I better report this. An example is shown below.

> vec <- rnorm(100)+10.5
> ss <- summary(vec)
> print(ss)

   Min. 1st Qu. Median Mean 3rd Qu. Max.   8.433 9.886 10.450 10.560 11.300 12.720
> for(kk in 1:length(ss)) print(ss[[kk]])

[1] 8.433
[1] 9.886
[1] 10.45
[1] 10.56
[1] 11.3
[1] 12.72

> print(mean(vec))

[1] 10.56399

Note the difference between 10.56399 and 10.560. It may confuse users that the number of significant digits is smaller than the number of digits shown by the print of a summary object (at least it confused me).

Yours
Ole F. Christensen

        [[alternative HTML version deleted]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 02 Mar 2012 - 15:13:04 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 02 Mar 2012 - 16:00:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive