head {limma} | R Documentation

## Return the First to Last Part of a Data Object

### Description

Retrieve the first or last parts of an RGList, MAList, EListRaw, EList, MArrayLM or TestResults object.

### Usage

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

### Arguments

`x` | an object of class `RGList`, `MAList`, `EListRaw`, `EList`, `MArrayLM` or `TestResults`.
`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.

02.Classes gives an overview of data classes used in LIMMA.

### Examples

    E <- matrix(rnorm(40),20,2)
    rownames(E) <- paste0("Gene",1:20)
    colnames(E) <- c("A","B")
    y <- new("EList",list(E=E))
    head(y)
    tail(y)

[Package limma version 3.43.8 Index]