is_bifurcating {castor} | R Documentation |
Determine if a tree is bifurcating.
Description
This function determines if a tree is strictly bifurcating, i.e. each node has exactly 2 children. If a tree has monofurcations or multifurcations, this function returns FALSE
.
Usage
is_bifurcating(tree)
Arguments
tree |
A tree of class "phylo". |
Details
This functions accepts rooted and unrooted trees, that may include monofurcations, bifurcations and multifurcations.
Value
A logical, indicating whether the input tree is strictly bifurcating.
Author(s)
Stilianos Louca
Examples
# generate random tree
Ntips = 10
tree = generate_random_tree(list(birth_rate_intercept=1),max_tips=Ntips)$tree
# check if the tree is bifurcating (as expected)
is_bifurcating(tree)
[Package castor version 1.8.2 Index]