The input can be a base R matrix or a sparse matrix from the Matrix package.

cpm(counts)

Arguments

counts

a matrix, dgCMatrix, or dgTMatrix of count values.

Value

a matrix, dgCMatrix, or dgTMatrix of CPM values (matching input)

Details

This function expects that columns correspond to samples, and rows to genes.