head: Return the First to Last Part of a Data Object

headR Documentation

Return the First to Last Part of a Data Object

Description

Retrieve the first or last parts of a DGEList, DGEExat, DGEGLM, DGELRT or TopTags object.

Usage

## S3 method for class 'DGEList'
head(x, n = 6L, ...)
## S3 method for class 'DGEList'
tail(x, n = 6L, ...)

Arguments

x

an object of class DGEList, DGEExact, DGEGLM, DGELRT or TopTags.

n

a single integer. If positive or zero, number rows of resulting object. If negative, all but the n last/first rows of x.

...

other arguments are not currently used.

Details

head (tail) returns the first (last) n rows when n >= 0 or all but the last (first) n rows when n < 0.

Value

An object like x but generally with fewer rows.

Author(s)

Gordon Smyth

See Also

head in the utils package or head.EList in the limma package.

Examples

Counts <- matrix(rpois(40,lambda=10),20,2)
rownames(Counts) <- paste0("Gene",1:20)
colnames(Counts) <- c("A","B")
y <- DGEList(Counts)
head(y)
tail(y)

OliverVoogd/edgeR documentation built on July 28, 2022, 10:13 p.m.