Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

head

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)

edgeR

Empirical Analysis of Digital Gene Expression Data in R

v3.32.1
GPL (>=2)
Authors
Yunshun Chen, Aaron TL Lun, Davis J McCarthy, Matthew E Ritchie, Belinda Phipson, Yifang Hu, Xiaobei Zhou, Mark D Robinson, Gordon K Smyth
Initial release
2021-01-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.