height_distribution: Compute the Height Distribution

Description Usage Arguments Value Examples

View source: R/removal_tree_sampling_aux.R

Description

Compute the height distribution for a list of trees. The height of a tree is the time elapsed between the most recent common ancestor of the samples and the last sample.

Usage

1
2
height_distribution(trees, t_max, print = FALSE, plot = FALSE,
  save = FALSE, filename = "height_dist.RData")

Arguments

trees

a list of tree objects

t_max

time of the last sampling event

print

boolean, if TRUE prints the median, mean and 95% HPD interval for the distribution

plot

boolean, if TRUE plot the histogram of the distribution

save

boolean, if TRUE save the height distribution in a .RData file

filename

if save is TRUE, name of the file who will contain the distribution

Value

a vector containing the heights of the trees specified in trees

Examples

1
2
height_distribution(trees=list(list('branch_length'=1,
subtrees=list(list('branch_length'=1, subtrees=NULL)))), t_max=2, print=TRUE, plot=TRUE)

JasmineGamblin/bdTreeSim documentation built on Nov. 11, 2019, 6:28 a.m.