getCounts {edgeR}R Documentation

Extract Table of Counts from DGEList Object

Description

Returns the counts component of a DGEList object

Usage

getCounts(object) 

Arguments

object

DGEList object containing (at least) the elements counts (table of raw counts), group (factor indicating group) and lib.size (numeric vector of library sizes)

Value

getCounts returns a matrix of counts (presumably integers)

Author(s)

Mark Robinson, Davis McCarthy

See Also

DGEList for more information about the DGEList class. as.matrix.DGEList.

Examples

# generate raw counts from NB, create list object
y<-matrix(rnbinom(20,size=1,mu=10),nrow=5)
d<-DGEList(counts=y,group=rep(1:2,each=2),lib.size=rep(c(1000:1001),2))
# should be 5x4
print(dim(getCounts(d)))

[Package edgeR version 2.4.3 Index]