Skip to content
Prev 30466 / 398513 Next

mean etc at the end of column

Martin Wegmann <wegmann at biozentrum.uni-wuerzburg.de> writes:
use rbind to add a row created by
 unlist(lapply(dataframe, summary.function))
as in
height   weight
1      58 115.0000
2      59 117.0000
3      60 120.0000
4      61 123.0000
5      62 126.0000
6      63 129.0000
7      64 132.0000
8      65 135.0000
9      66 139.0000
10     67 142.0000
11     68 146.0000
12     69 150.0000
13     70 154.0000
14     71 159.0000
15     72 164.0000
16     65 136.7333

However, you may want to ask yourself if you really want to do this.
It is hard to distinguish that last row of means from the rest of the
data.  In general I would suggest keeping the summary separate from
the original data.