TreeIsRooted() is a fast alternative to ape::is.rooted().

TreeIsRooted(tree)

Arguments

tree

A phylogenetic tree of class phylo.

Value

TreeIsRooted() returns a logical specifying whether a root node is resolved.

See also

Other tree properties: ConsensusWithout(), NSplits(), NTip(), PathLengths(), SplitsInBinaryTree(), TipLabels()

Author

Martin R. Smith (martin.smith@durham.ac.uk)

Examples

TreeIsRooted(BalancedTree(6))
#> [1] TRUE
TreeIsRooted(UnrootTree(BalancedTree(6)))
#> [1] FALSE