cherries: Cherry number

Description Usage Arguments Value Author(s) See Also Examples

View source: R/cherries.R

Description

Finds the number of cherries in a tree. A cherry is considered to be a pair of sister tips.

Usage

1
cherries(tree, normalise = FALSE)

Arguments

tree

a tree of class phylo or phylo4. The tree should be binary and rooted; if not it will be coerced into a binary rooted tree using multi2di, if possible.

normalise

option to normalise the result, default is FALSE.

Value

An integer representing the number of cherries in the tree.

Author(s)

Michelle Kendall michelle.louise.kendall@gmail.com

See Also

configShow

Examples

1
2
3
4
5
6
7
8
9
## Find the number of cherries in a random tree with 10 tips:
tree <- rtree(10)
plot(tree)
cherries(tree)
# and the normalised cherry number:
cherries(tree, normalise=TRUE)

## Note that the function configShow can be used to highlight the cherries in the tree:
configShow(tree, 2, edge.width=2)


phyloTop documentation built on May 19, 2017, 6:37 p.m.
Search within the phyloTop package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.