R/utils.R
safeMatrixStats.Rd
Compute matrix statistics selecting the appropriate function depending on the matrix class of the input (supports sparse matrices and DelayedArrays)
safeMatrixStats(X, statFun = "rowSums", ...)
input matrix
statistic. E.g. "rowSums", "colSums", "rowMeans", "colMeans", ...
"rowSums"
"colSums"
"rowMeans"
"colMeans"
arguments passed on to the matrix stats function. E.g. na.rm.
na.rm
result of the corresponding matrix statistic
Fabian Mueller