
Last chance! 50% off unlimited learning
Sale ends in
This function takes a snap object and returns the row sums of its count matrix.
# S4 method for snap
rowSums(x, mat = c("bmat", "pmat", "gmat"), na.rm = TRUE)
A snap object
A charater object indicates what matrix slot to use
A logical variable indicates wether to remove NA in the matrix
# NOT RUN {
data(demo.sp);
a = rowSums(demo.sp, mat="bmat");
b = rowSums(demo.sp, mat="pmat");
d = rowSums(demo.sp, mat="gmat");
# }
Run the code above in your browser using DataLab