Description Usage Arguments Details Value Note Author(s) See Also Examples
This function utilizes a matrix of the format returned by regimeMatrix
to define the models it is going to create. Then, it paints these models onto the trees provided and returns a list suitable for further analysis.
1 | regimeMaker(ouchTrees, regMatrix, nodeMembers)
|
ouchTrees |
A list of ouch-style trees |
regMatrix |
A model by nodes matrix of the format returned by |
nodeMembers |
A list of individuals defining the nodes specified in |
The easiest way to use this function will usually be to utilize regimeMatrix
to create the matrix input as regMatrix
and manually prune or add rows. See the example below.
A list with three items:
regList |
A list of lists of regimes, with the number of first-order items corresponding to the number of trees in |
nodeMatrix |
A boolean matrix with rows corresponding to the trees in |
regMatrix |
A list of |
Use of regimeMatrix
or regimeMaker
to generate tailored sets of regimes is not currently integrated smoothly with runBatchHansen
,
but for the time being they can be used to create regimes for manual analysis.
Andrew L. Hipp <ahipp@mortonarb.org>
1 2 3 4 5 6 7 8 9 10 11 12 | data(carex)
# tree comes in in phylo format, but we need an ouchtree object
trees <- lapply(carex$ovales.bayesTrees[1:10], ape2ouch)
# if we are interested in comparing the single-change models that allow changes only at nodes
# 1, 2, 4, 5, and 8, as well as the no-change model, we could do:
mat <- regimeMatrix(n = 8, maxNodes = 1)[c(1,2,4,5,8,9), ] # the 9th row is the no-change model
#... then we make regimes based on that regime matrix...
regs <- regimeMaker(trees, mat, carex$ovales.nodes)
#... and paint the regimes from tree 1 onto tree 1 either singly...
plot(trees[[1]], regime = regs$regList[[1]][[1]])
#... or in a layout:
plot(trees[[1]], regime = regs$regList[[1]])
|
Loading required package: ouch
Loading required package: subplex
Loading required package: ape
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.