random_tree {rrnni}R Documentation

Create a random ranked phylogeny

Description

Create a random ranked phylogeny using the coalescent method.

Usage

random_tree(n)

Arguments

n

the number of tips

Details

This is implementation of a ranked coalescent algorithm described in Collienne (2021). Starting from n tips of a tree, all with rank 0, randomly select two tips and merge them into a new node with rank 1, and add the new node to remaining tips. In next iteration, assign rank 2 and so on, until only a single node, the root, remains.

Value

random ranked tree of class "rankedPhylo"

References

Collienne, L. (2021). Spaces of Phylogenetic Time Trees (p. 158). University of Otago.

Examples

random_tree(5)


[Package rrnni version 0.1.1 Index]