ladderSizes: Ladder sizes

View source: R/ladderSizes.R

ladderSizesR Documentation

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)

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.

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

Author(s)

Caroline Colijn c.colijn@imperial.ac.uk

Michelle Kendall michelle.louise.kendall@gmail.com

See Also

ILnumber, ladderShow

Examples

## 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)



phyloTop documentation built on Feb. 16, 2023, 5:55 p.m.