simTreeClades: simTreeClades

Description Usage Arguments Value

Description

This function simulates a tree of a given size, and then identifies a given number of clades of a certain size. Trees are simulated using the function sim.bd.taxa from TreeSim. the function can get into an infinite loop if you aren't careful about the specifications, for example if the tree has 100 tips, a single clade of 95 taxa might take a long time to find.

Usage

1
2
simTreeClades(treesize, mintax, maxtax, clades, lambda = 0.2, mu = 0.02,
  complete = FALSE, rescale = FALSE)

Arguments

treesize

The number of tips the final tree should have.

mintax

The minimum size of each of the clades to be identified.

maxtax

The maximum size of each of the clades to be identified.

lambda

The birthrate for the tree simulation process, defaults to 0.2

mu

The deathreate for the tree simulation process, defaults to 0.02

complete

If FALSE, returns just the extant taxa at the end of the simulation, if TRUE extinct taxa are retained.

caldes

The number of clades to be identified.

Value

A list with two elements, the first is the tree, and the second is a list of the taxa names for each clade of the correct size identified.


hferg/hfgr documentation built on May 17, 2019, 3:56 p.m.