Learn R Programming

phyloTop (version 1.1.1)

laddItr: Ladder Iteration Tool

Description

A function for internal use in relation to calculating the number of ladders in a tree.

Usage

laddItr(ladderNumbers)

Arguments

ladderNumbers
A numeric vector which is a result of calling ladderNums to a tree.

Value

  • Another numeric vector suitable for passing to laddItr.

Details

This function reduces the maximum value of ladderNumbers by one. Say m is the maximum number and there are n of them. Then this function removes them and also n of the natural numbers up to m - essentially removing all the ladders of size m from the tree.

See Also

nLadders and avgLadder which use this function.

Examples

Run this code
## Creates a tree
tree <- rtree4(50)

## Creates an appropriate vector
ladderNumbers <- ladderNums(tree)

## Perfoms the operation
laddItr(ladderNumbers)

Run the code above in your browser using DataLab