tree_subset | R Documentation |
Create a subtree by specifying tips to keep.
tree_subset(tree, tips, underscores = FALSE)
tree |
A phylo object, as returned from |
tips |
A character, numeric, or logical vector of tips to keep. |
underscores |
When parsing the tree, should underscores be kept as
is? By default they will be converted to spaces (unless the entire ID
is quoted). Default |
A phylo
object for the subtree.
Other phylogeny:
read_tree()
library(rbiom)
infile <- system.file("extdata", "newick.tre", package = "rbiom")
tree <- read_tree(infile)
tree
subtree <- tree_subset(tree, tips = head(tree$tip.label))
subtree
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.