build_coal_tree: Generate a Newick string representation of a tree...

View source: R/tree_utils.R

build_coal_treeR Documentation

Generate a Newick string representation of a tree corresponding to a realisation of a coalescent process. Note: the topology is RANDOM, If you wish for the topology to be consistent, use set.seed before calling this function.

Description

Generate a Newick string representation of a tree corresponding to a realisation of a coalescent process. Note: the topology is RANDOM, If you wish for the topology to be consistent, use set.seed before calling this function.

Usage

build_coal_tree(
  sampling_times,
  coalescent_times,
  leaf_names = NULL,
  node_name_prefix = "N",
  terminate_string = TRUE
)

Arguments

sampling_times

times of leaves.

coalescent_times

times of coalescent events / internal nodes.

Value

a Newick string corresponding to the tree.


dhelekal/CaveDive documentation built on June 11, 2024, 4:32 p.m.