rowMeans {psichomics} | R Documentation |
Calculate mean or variance for each row of a matrix
rowMeans(mat, na.rm = FALSE) rowVars(mat, na.rm = FALSE)
mat |
Matrix |
na.rm |
Boolean: remove missing values ( |
Vector of means or variances
df <- rbind("Gene 1"=c(3, 5, 7), "Gene 2"=c(8, 2, 4), "Gene 3"=c(9:11)) rowMeans(df) rowVars(df)