Description Usage Arguments Value
Uses the slam
package rollup function to efficiently aggregate a sparse matrix. Also allows multiple vectors to be used as grouping vars.
1 | matrix.aggregate(mat, grouping.vars, FUN = "sum")
|
mat |
A matrix object, can be a sparse matrix |
grouping.vars |
The grouping elements. Can be a single vector, or a list or data.frame with multiple vectors |
The |
name of the function to be applied |
A list containing a (sparse) matrix and a data.frame with the variables matching the matrix rows
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.