Learn R Programming

pirouette (version 1.6.9)

create_sim_yule_twin_tree_fun: Create a partially evaluated function to to sim_yule_twin_tree.

Description

The function sim_yule_twin_tree simulates a twin tree using the Yule speciation model.

Usage

create_sim_yule_twin_tree_fun(method = "random_tree", n_replicates = 10000)

Value

a function

Arguments

method

determines how to create the twin tree

  • 'random_tree' just produces a random tree;

  • 'max_clade_cred' simulates n_replicates trees and uses maxCladeCred to create a consensus tree;

  • 'max_likelihood' simulates n_replicates trees and selects the most likely;

n_replicates

number of replicas to evaluate in order to create the twin tree

Author

Richèl J.C. Bilderbeek

See Also

Use get_sim_bd_twin_tree_fun to get a partially evaluated function to produce a Birth-Death tree. Use create_copy_twtr_from_true_fun to get a function to simply copy the tree

Examples

Run this code

f <- create_sim_yule_twin_tree_fun()
phylo_in <- ape::read.tree(text = "((A:1, B:1):1, C:2);")
f(phylo_in)

Run the code above in your browser using DataLab