sim.binary.character: Simulate evolution of a binary state character

Description Usage Arguments Value

View source: R/sim.binary.character.R

Description

Generates binary state character distributions for the nodes of a phylogeny.

Usage

1
sim.binary.character(phy, pars, mu = 0L, nsim = 1L)

Arguments

phy

A phylogeny that inherits class phylo and extended-phylo.

pars

A vector of transition rates. e.g. pars[1] = rate of transition from state 0 to state 1.

mu

The state of the root node.

nsim

The number of simulations to perform.

Value

A matrix of character state distributions for the nodes of the phylogeny. Rows correspond to nodes and columns correspond to simulations. e.g. the i-th row and j-th column returns the character state for node i in simulation j.


blueraleigh/pea.toolkits documentation built on Dec. 24, 2017, 3:20 p.m.