View source: R/map_posterior_distribution.R
map_posterior_distribution | R Documentation |
This function will compared the trees
against the base_tree
and return an object that can be used with
plot_distribution_chart to plot the posterior distribution for
dwelling times and number of transistions on a particular node and plot_distribution_tree, which plots the posterior distribution in the entire tree.
map_posterior_distribution(base_tree, trees, scale.branches=TRUE
, scale.trees=FALSE, parallel=TRUE)
base_tree |
A single tree, result of the function sfreemap; |
trees |
A |
scale.branches |
Whether the function should scale the dwelling times to the branch length, resulting in a proportion of the time instead of an absolute value (the expected number of transitions is not scaled). |
scale.trees |
A value representing the maximum height to scale the tree, or FALSE if the trees should not be scaled. |
parallel |
Whether the function should run in parallel (defaults to TRUE) |
A named list with three items:
emr
for expected markov reward (the
dwelling times for states) and lmt
for the labelled markov
transitions (the expected number of state transitions).
Each criteria (emr and lmt) is composed by an array three dimentions, like this: $emr[trees, states, nodes]$.
This structure represent the corresponding value for each node and state on each tree in trees
when compared o base_tree
. When a node from base_tree
has no match, the corresponding state values will be set to NA.
base_tree
the original base_tree given as argument. This is useful for the functions that use the result of this function, cited in the description.
Diego Pasqualin dpasqualin@inf.ufpr.br
sfreemap
sm <- sfreemap(sfreemap.corals.trees, sfreemap.corals.tips, parallel=FALSE)
map <- map_posterior_distribution(sm[[1]], sm, parallel=FALSE)
p <- plot_distribution_chart(map, 160)
print(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.