Finds the number of cherries in a tree. A cherry is considered to be a pair of sister tips.
cherries(tree, normalise = FALSE)
An integer representing the number of cherries in the tree.
## Find the number of cherries in a random tree with 10 tips:
tree <- rtree(10)
plot(tree)
cherries(tree)
#> [1] 3
# and the normalised cherry number:
cherries(tree, normalise=TRUE)
#> [1] 0.6
## Note that the function configShow can be used to highlight the cherries in the tree:
configShow(tree, 2, edge.width=2)