getMeans | R Documentation |
means
)
of groups of observations.getMeans
: compute statistics
(e.g., means
) by groups of observations stored in an
observations * variables
data-frame or matrix.
getMeans(G, factor, FUN = mean)
G |
a data frame observations * variables. |
factor |
a factor vector for the groups of observations |
FUN |
( |
a data frame with the group means as rows and the variables as columns.
Hervé Abdi
MakeCIEllipses
toto = matrix(round(runif(12)*10), nrow = 6, ncol = 2) getMeans(toto, factor(c(1,1,1,2,2,2)), median) # median by groups
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.