| is_bifurcating {castor} | R Documentation |
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.
is_bifurcating(tree)
tree |
A tree of class "phylo". |
This functions accepts rooted and unrooted trees, that may include monofurcations, bifurcations and multifurcations.
A logical, indicating whether the input tree is strictly bifurcating.
Stilianos Louca
# 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)