Learn R Programming

phytools (version 2.3-0)

midpoint_root: Midpoint root a phylogeny

Description

These functions midpoint root a rooted or unrooted tree (Farris 1972).

Usage

midpoint_root(tree)
# S3 method for root
midpoint(tree, node.labels="support", ...)

Value

An object of class "phylo" containing a rooted phylogenetic tree.

Arguments

tree

an object of class "phylo".

node.labels

argument to be passed to midpoint.

...

optional arguments to be passed to midpoint.

Author

Liam Revell liam.revell@umb.edu

Details

Midpoint rooting involves locating the midpoint of the longest path between any two tips and putting the root in that location.

The function midpoint_root performs the same operation as midpoint in the phangorn package, but uses no phangorn (Schliep, 2011) code internally.

The function midpoint.root is a pseudo S3 method for the object class "root" that exists because when midpoint was created in phangorn it was not defined as a generic method. This function merely points to midpoint and is being deprecated out.

References

Farris, J. (1972) Estimating phylogenetic trees from distance matrices. American Naturalist, 106, 645-667.

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.

Schliep K. P. (2011) phangorn: phylogenetic analysis in R. Bioinformatics, 27, 592-593.

See Also

midpoint, reroot, root