sim.tree: Phylogenetic tree simulation

Description Usage Arguments Value Author(s) References Examples

View source: R/sim.tree.R

Description

Phylogenetic tree simulation, given the model and parameters.

Usage

1
sim_phyl(ct=15, lambda0=0.8, mu0=0.1, K=40, model="dd",printEv=FALSE,seed=FALSE)

Arguments

ct

Crown time

lambda0,mu0

Speciation and extinction rates parameter (they depends on the model)

K

Carring capacity (For diversity-dependance model only)

Model

Diversification rates model. The available models are 'dd' for diversity dependance and 'cr' for constant rate model

PrintEv

Prints the events while occurring in the tree

seed

Seed for the simulation.

Value

tree

A list containing 4 elements: wt are the waiting times of the tree, E is the binary vector representing speciations or extinctions, n is the number of species at each node of the tree and br are the branching times of the nodes.

phylo

is the phylo object corresponding to the tree

tree.extant

Same as tree, but removing extinct species

extant.phylo

phylo of the extant-species tree

Author(s)

F. Richter M.

References

[1] Generalizing species diversification models: Technical report

Examples

1
2
st <- sim.tree()
plot(st$phylo)

franciscorichter/dmea02 documentation built on March 21, 2020, 3:46 a.m.