Description Usage Arguments Details Author(s) Examples
View source: R/src_binMatrix.R
Perform binning on a numeric matrix. Divide the matrix in ncol(mat)/byNcols columns and then on each of these apply rowMeans, combine into a binned output matrix.
1 |
mat |
numeric matrix |
byNcols |
average this number of consecutive columns |
method |
aggregation method, "mean" or "median" |
drop.uneven |
logical, whether to drop columns if ncol(mat)/byNcols is odd, see details. |
'drop.uneven' determines what to do with columns if ncol(mat)/byNcols is odd. Say you have 99 columns and want to bin into 10er columns, means the last 9 would be orphans. With FALSE these would simply be averaged and returned with the rest, or TRUE would be discarded. If mat has fewer columns that one sets byNcols then with FALSE the function returns all columns averaged, or with TRUE a stop is returned.
Alexander Toenges
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.