colVars_spm: Variance computation for sparse matrices
Description
Compute variance for each column / each row of
a dgCMatrix (from Matrix package).
Usage
colVars_spm(spm)
rowVars_spm(spm)
Arguments
spm
A sparse matrix of class dgCMatrix from the Matrix package.
Value
Vector with variances.
Details
The only supported format currently is dgCMatrix. While the Matrix
package has other formats, this one is used for scRNAseq raw count data.
Function code written by Simon Anders.