GetNLabelledMultifurcatingRootedTrees: Get N Labelled Multifucrating Rooted Trees

Description Usage Arguments Details Value Author(s) References Examples

View source: R/GetNLabelledMultifurcatingRootedTrees.R

Description

Gets the total number of labelled multifurcating rooted trees for N tips.

Usage

1

Arguments

N

The number of tips.

Details

Uses equation 3.1 (and illustrated in Figure 3.6) of Felsenstein (2004).

Note that direct counts are possible only up to N = 145, beyond that R will return only "Inf".

Value

A list containg two items, TotalTrees (the total number of trees) and TreesByNodeCount (a vector of trees by node count from 1 to N - 1).

Author(s)

Graeme T. Lloyd graemetlloyd@gmail.com

References

Felsenstein 2004

Examples

1
2
3
4
5
6
# Get numbers of trees:
GetNLabelledMultifurcatingRootedTrees(8)

# Get just the total number of trees for 1:10 tips
unlist(lapply(as.list(1:10), function(x)
  GetNLabelledMultifurcatingRootedTrees(x)$TotalTrees))

graemetlloyd/hypRspace documentation built on Aug. 24, 2020, 11:41 a.m.