tips | R Documentation |
Extract tip labels from the object of class "phylo" or "multiPhylo"
tips(x, ...)
## S3 method for class 'phylo'
tips(x, ...)
## S3 method for class 'multiPhylo'
tips(x, all = FALSE, ...)
x |
an object of class "phylo" or "multiPhylo" |
... |
arguments to be passed to methods |
all |
optional extract tips for all trees, only if |
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
.
a vector of tip labels, or list of vectors in case of "multiPhylo" with all=TRUE
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.