View source: R/apply.reconstruction.R
apply.reconstruction | R Documentation |
Apply a series of passes for an ancestral states reconstruction
apply.reconstruction(
tree,
character,
passes = 4,
method = "NA",
inapplicable = 1,
match.tip.char = FALSE
)
tree |
|
character |
|
passes |
|
method |
either |
inapplicable |
When method is |
match.tip.char |
|
A states.matrix
object that is a list
of:
$Char |
a |
$Dp1 |
a |
$Up1 |
a |
$Dp2 |
a |
$Up2 |
a |
$tracker |
a |
$region |
a vector of |
$changes |
a vector of |
$score |
a single |
$tree |
the tree ( |
Thomas Guillerme
plot.states.matrix
, runInapp
set.seed(1)
## Random tree with 12 taxa
tree <- ape::rtree(12, br = NULL)
## A character with inapplicable data
character <- "23--1??--032"
## Normal Fitch algorithm (NA states are missing data)
apply.reconstruction(tree, character, passes = 2, method = "Fitch",
inapplicable = 1)
## Same but NA states are an extra state and character now match the tips
apply.reconstruction(tree, character, passes = 2, method = "Fitch",
inapplicable = 2, match.tip.char = TRUE)
## NA algorithm
apply.reconstruction(tree, character, passes = 4, method = "NA")
## 1st pass of the NA algorithm
apply.reconstruction(tree, character, passes = 1, method = "NA")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.