colMeanVars | R Documentation |
Calculates column mean and variance. Adapted from pagoda2. https://github.com/kharchenkolab/pagoda2/blob/main/src/misc2.cpp
colMeanVars(sY, rowSel, ncores = 1L)
sY |
sparse matrix Gene by cell matrix of counts |
rowSel |
numeric The selected rows (genes) |
ncores |
numeric The number of cores |
data.frame with columns of mean, variance, and number of observeatios for each gene across samples
library(Matrix)
donor_by_gene <- rbind(c(9,2,1,5), c(3,3,1,2))
donor_by_gene <- Matrix(donor_by_gene, sparse = TRUE)
result <- colMeanVars(donor_by_gene, rowSel = NULL, ncores=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.