These functions provide convenience shortcut for commonly performed group-apply operations, such as column/row group means, medians, maxs, mins, etc...
col<STAT>By
computes for each column a given statistic within separate groups of rows, which are defined by a factor.
row<STAT>By
computes for each row a given statistic within separate groups of columns, which are defined by a factor.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | colSumsBy(x, BY, ...)
rowSumsBy(x, BY, ...)
rowMeansBy(x, BY, ...)
colMeansBy(x, BY, ...)
rowMediansBy(x, BY, ...)
colMediansBy(x, BY, ...)
rowMaxsBy(x, BY, ...)
colMaxsBy(x, BY, ...)
rowMinsBy(x, BY, ...)
colMinsBy(x, BY, ...)
|
x |
matrix-like object on which |
BY |
factor or object coerced to a factor, that defines the groups within
which the function If |
... |
extra parameters passed to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.