TMRCA: Compute the TMRCA of a Coalescent Tree

Description Usage Arguments Details Value Examples

View source: R/coalesceR.R

Description

Compute the Time to the Most Recent Common Ancestor (TMRCA) of a coalescent tree.

Usage

1
  TMRCA(tree)

Arguments

tree

an object generated by the sim.tree command

Details

Once the sim.tree command line has been executed, TMRCA can be used to compute the TMRCA of the tree. Note that the TMRCA command may also be used on an object of class ‘history’

Value

TMRCA of the coalescent tree contained in the object ‘tree’

Examples

1
2
3
4
5
6
7
8
## This is to simulate a coalescent tree using the Hudson's algorithm, 
## with 20 sampled lineages. In this example, the current population size
## is 100. It was 1000 before a bottleneck that occurred 50 generations ago

tree <- sim.tree(method = "hudson",sample = 20,current = 100,ancestral = 1000,time = 50)

## This is to compute the TMRCA of that tree
TMRCA(tree)

coalesceR documentation built on May 2, 2019, 4:42 p.m.

Related to TMRCA in coalesceR...