| Subtree | R Documentation |
Subtree() safely extracts a clade from a phylogenetic tree.
Subtree(tree, node)
tree |
A tree of class |
node |
The number of the node at the base of the clade to be extracted. |
Modified from the ape function extract.clade, which
sometimes behaves unpredictably.
Unlike extract.clade, this function supports the extraction of "clades"
that constitute a single tip.
Subtree() returns a tree of class phylo that represents a
clade extracted from the original tree.
Martin R. Smith (martin.smith@durham.ac.uk)
Other tree manipulation:
AddTip(),
CollapseNode(),
ConsensusWithout(),
DropTip(),
EnforceOutgroup(),
ImposeConstraint(),
KeptPaths(),
KeptVerts(),
LeafLabelInterchange(),
MakeTreeBinary(),
Renumber(),
RenumberTips(),
RenumberTree(),
RootTree(),
SortTree(),
TipTimedTree(),
TrivialTree
tree <- Preorder(BalancedTree(8))
plot(tree)
ape::nodelabels()
ape::nodelabels(13, 13, bg="yellow")
plot(Subtree(tree, 13))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.