extract: Extract or replace parts of an object

extractR Documentation

Extract or replace parts of an object

Description

Extract genes by row and samples by column.

Usage

## S4 method for signature 'DESeqAnalysis,ANY,ANY,ANY'
x[i, j, drop = FALSE]

Arguments

x

Object.

i

Indices specifying elements to extract or replace. Indices are numeric or character vectors, empty (missing), or NULL.

For more information:

help(topic = "Extract", package = "base")
j

Indices specifying elements to extract or replace. Indices are numeric or character vectors, empty (missing), or NULL.

For more information:

help(topic = "Extract", package = "base")
drop

For matrices and arrays. If TRUE the result is coerced to the lowest possible dimension (see the examples). This only works for extracting elements, not for the replacement. See drop for further details.

Value

DESeqAnalysis.

Note

Updated 2020-10-28.

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.

Examples

data(deseq)
object <- deseq
dim(object)

genes <- head(rownames(object), 50L)
head(genes)
samples <- head(colnames(object), 2L)
head(samples)

x <- object[genes, samples]
print(x)

acidgenomics/r-deseqanalysis documentation built on March 30, 2024, 12:08 p.m.