View source: R/tree_manipulation.R
subtree | R Documentation |
Select a subset of nodes from a tree
subtree(x, id, ...)
## S3 method for class 'Strata'
subtree(x, id, type = "name", ...)
## S3 method for class 'phylo'
subtree(x, id, collapse = TRUE, descend = TRUE, type = "auto", ...)
x |
phylo object |
id |
vector of ids or names |
... |
Arguments sent to |
type |
id type: ['name', 'index', 'auto'] |
collapse |
logical collapse edges around nodes with a single descendent |
descend |
logical include all descendents of each id |
phylo object
data(atree)
subtree(atree, c('n15', 'n19'))
subtree(atree, c('t7', 't4', 't1'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.