View source: R/conversion-utilities.R
| pars2simmap | R Documentation | 
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.
pars2simmap(pars, tree)
| pars | A list that contains  | 
| tree | A tree of class 'phylo' | 
pars2simmap takes a list of parameters and converts it to simmap format
A list with elements: tree A simmap formatted tree, pars bayou formatted parameter list, and cols A named vector of colors.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.