cpm: Convert a matrix of raw counts to a matrix of Counts per...

View source: R/util.R

cpmR Documentation

Convert a matrix of raw counts to a matrix of Counts per Million values

Description

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

Usage

cpm(counts)

Arguments

counts

a matrix, dgCMatrix, or dgTMatrix of count values.

Details

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

Value

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


AllenInstitute/scrattch.hicat documentation built on June 6, 2024, 5:31 a.m.