Description Details Author(s) See Also Examples
This package defines a function applyBy that enables applying a function along margins of matrix-like objects separately within groups of columns/rows defined by factor(s), e.g., computing aggregated summary statistics. It is essentially a wrapper around functions from the the matrixStats package, which provide very fast alternative implementation to the base aggregate function.
This package defines a function applyBy that enables applying a function along margins of matrix-like objects separately within groups of columns/rows defined by factor(s), e.g., computing aggregated summary statistics. It is essentially a wrapper around functions from the the matrixStats package, which provide very fast alternative implementation to the base aggregate function.
Package: | applyBy |
Type: | Package |
Version: | 1.2 |
Date: | 2016-11-18 |
License: | GPL (>= 2) |
LazyLoad: | yes |
Renaud Gaujoux <renaud@tx.technion.ac.il> (Maintainer)
Renaud Gaujoux renaud@tx.technion.ac.il
Maintainer: Renaud Gaujoux renaud@tx.technion.ac.il
matrixStats-package
, colAvgsPerRowSet
, rowAvgsPerColSet
, applyBy
1 2 3 4 5 6 7 | x <- matrix(runif(32), ncol = 4)
g.row <- gl(2, 4)
g.col <- gl(2, 2)
rowMeans(x)
rowMeansBy(x, g.col)
colMeansBy(x, g.row)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.