pars2simmap: Convert a bayou parameter list into a simmap formatted...

Description Usage Arguments Details Value Examples

Description

This function converts a bayou formatted parameter list specifying regime locations into a simmap formatted tree that can be plotted using plotSimmap from phytools or the plotRegimes function from bayou.

Usage

1
pars2simmap(pars, tree)

Arguments

pars

A list that contains sb (a vector of branches with shifts), loc (a vector of shift locations), t2 (a vector of theta indices indicating which theta is present after the shift).

tree

A tree of class 'phylo'

Details

pars2simmap takes a list of parameters and converts it to simmap format

Value

A list with elements: tree A simmap formatted tree, pars bayou formatted parameter list, and cols A named vector of colors.

Examples

1
2
3
4
5
tree <- reorder(sim.bdtree(n=100), "postorder")

pars <- list(k=5, sb=c(195, 196, 184, 138, 153), loc=rep(0, 5), t2=2:6)
tr <- pars2simmap(pars, tree)
plotRegimes(tr$tree, col=tr$col)


Search within the bayou package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.