reroot | R Documentation |
Re-roots a phylogenetic tree at an arbitrary position along an edge.
reroot(tree, node.number, position=NULL, interactive=FALSE, ...)
tree |
a phylogenetic tree in |
node.number |
number of the node descending from the target branch in |
position |
position along the target edge at which to re-root the tree. If not supplied, then the tree will be re-rooted at the node or tip. |
interactive |
logical value indicating whether to use interactive mode (defaults to |
... |
arguments to be passed to |
This function had an error for rootings along edges descended from the root node for phytools<=0.2-47. This should be fixed in the present version. Now uses paste.tree
, root
, and splitTree
internally. Earlier versions also had an error related to node labels. This should be fixed in phytools>=0.4-47.
A phylogenetic tree in "phylo"
format.
Liam Revell liam.revell@umb.edu
Paradis, E., J. Claude, and K. Strimmer (2004) APE: Analyses of phylogenetics and evolution in R language. Bioinformatics, 20, 289-290.
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
splitTree
, paste.tree
, root
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.