Learn R Programming

phyloTop (version 2.1.2)

ladderSizes: Ladder sizes

Description

Finds the sizes and positions of ladders in the tree. A ladder is here defined to be a series of consecutive nodes in the tree, each of which has exactly one tip child (as counted by ILnumber). The size of the ladder is given by the number of nodes in the chain.

Usage

ladderSizes(tree)

Value

A list of:

  • ladderSizes the sizes of ladders in the tree

  • ladderNodes the ladder nodes in the tree

  • ladderEdges the edges between ladder nodes of the tree

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.

Author

Caroline Colijn c.colijn@imperial.ac.uk

Michelle Kendall michelle.louise.kendall@gmail.com

See Also

ILnumber, ladderShow

Examples

Run this code
## Find ladder sizes in a random tree with 20 tips:
tree <- rtree(20)
plot(tree)
ladderSizes(tree)
# note that the ladders can be highlighted in a plot using ladderShow:
ladderShow(tree)


Run the code above in your browser using DataLab