make.states.matrix | R Documentation |
Creates a states matrix
make.states.matrix(
tree,
character,
inapplicable = NULL,
match.tip.char = FALSE
)
tree |
|
character |
Either vector of character states ( |
inapplicable |
When the intended reconstruction method is |
match.tip.char |
|
If character
argument is a list, each element of the list must be a "numeric"
vector with "?"
being all states and "-"
being -1
.
A list of character states for each node and tip per pass:
-$Char
: a list
of character states for the tips.
-$Dp1
: a list
of the tips' and nodes' states after the first downpass.
-$Up1
: a list
of the tips' and nodes' states after the first uppass.
-$Dp2
: a list
of the tips' and nodes' states after the second downpass.
-$Up2
: a list
of the tips' and nodes' states after the second uppass.
-$tracker
: a list
tracking the applicable regions.
-$regions
: a single numeric
value counting the number of applicable regions.
-$changes
: a numeric
vector recording the node with state changes.
-$score
: a numeric
vector recording the score of the tree.
-$tree
: a phylo
object describing the tree.
-$n_tip
: a numeric
vector recording the number of tips.
-$n_node
: a numeric
vector recording the number of (internal) nodes within the tree.
Thomas Guillerme
apply.reconstruction
.
## A simple topology
tree <- ape::read.tree(text = "((a,b),(c,d));")
## A simple character
character <- "0101"
## Create a states matrix for reconstruction
make.states.matrix(tree, character)
## A complex character
character <- "0{01}-?"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.