tips {rrnni} | R Documentation |
Extract tips from tree
Description
Extract tip labels from the object of class "phylo" or "multiPhylo"
Usage
tips(x, ...)
## S3 method for class 'phylo'
tips(x, ...)
## S3 method for class 'multiPhylo'
tips(x, all = FALSE, ...)
Arguments
x |
an object of class "phylo" or "multiPhylo" |
... |
arguments to be passed to methods |
all |
optional extract tips for all trees, only if |
Details
This is convenience method, it's purpose is to easily retrieve tip labels of a tree or
a collection of trees with the same tip labels. Due to this, when called on a collection of
trees (an object of class "multiPhylo"), only the first tree of a collection is accessed.
To obtain tip labels from all trees, specify the argument all=TRUE
.
Value
a vector of tip labels, or list of vectors in case of "multiPhylo" with all=TRUE
Examples
tree = rankedPhylo(5)
tips(tree)
trees = rankedPhylo(3:7)
# only the first tree is accessed
tips(trees)
# use this to obtain all tip labels
tips(trees, all=TRUE)
[Package rrnni version 0.1.1 Index]