Learn R Programming

SnapATAC (version 1.0.0)

colSums: colSums for snap objects

Description

This function takes a snap object and returns the column sums of its count matrix.

Usage

# S4 method for snap
colSums(x, mat = c("bmat", "pmat", "gmat"), na.rm = TRUE)

Arguments

x

A snap object

mat

A charater object indicates what matrix slot to use c("bmat", "pmat", "gmat")

na.rm

A logical variable indicates wether to remove NA in the matrix

Examples

Run this code
# NOT RUN {
data(demo.sp);
a = colSums(demo.sp, mat="bmat");
b = colSums(demo.sp, mat="pmat");
d = colSums(demo.sp, mat="gmat");
# }

Run the code above in your browser using DataLab