aphylo-index | R Documentation |
Indexing aphylo objects
## S3 method for class 'aphylo'
x[i, j, drop = FALSE]
## S3 replacement method for class 'aphylo'
x[i, j] <- value
x |
An object of class aphylo. |
i, j |
Integer vector. Indices of genes or functions. |
drop |
Logical scalar. When |
value |
Integer vector. Replacing values, can be either |
The subsetting method allows selecting one or more annotations from
the aphylo object. Whenever i
is specified, then aphylo returns the corresponding
annotations.
When indexing with i
: A data frame with the annotations of the
selected genes.
When only indexing with j
(drop = FALSE
): An aphylo
object with the selected sets of
annotations.
When only indexing with j
(drop = TRUE
): A data.frame with the selected
annotations.
When indexing on both i
and j
: A data.frame with the selected genes and annotations.
set.seed(12312)
atree <- raphylo(50, P = 4)
atree[1:10,]
atree[,2:3]
atree[, 2:3, drop = TRUE]
atree[1:10, 2:3]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.