uniTab: uniTab Combine Duplicate Rows

View source: R/uniTab.R

uniTabR Documentation

uniTab Combine Duplicate Rows

Description

Combine duplicate rows of a table of counts

Usage

uniTab(tab, omitNullRows = TRUE)

Arguments

tab

matrix or table of counts. Rows correspond to lineages and columns to cell types.

omitNullRows

logical, if TRUE omit rows with only zero cells

Details

When a table of counts has many duplicate rows, computations are sometimes faster if duplicate rows are combined and a vector of case weights is created.

Value

list with elements tab - the rows of unique(tab), n - a vector of replicate row counts, data.index - a mapping of the rows to the tab argument to those of uniTab(tab)[["tab"]], and omitted - NULL if no rows were omitted, or an object such that inverse.rle(result$omitted) is a logical vector indicating which table rows were all zeros.

Author(s)

Charles Berry


BushmanLab/cellTypeCompositions documentation built on June 14, 2022, 9:29 p.m.