View source: R/getMeanBranchLengthTree.R
getMeanBranchLengthTree | R Documentation |
Takes a bammdata
object and computes a phylogenetic
tree where branch lengths are equal to the mean of the marginal
distributions of rates on each branch. This tree can be plotted to
visualize rate variation across a phylogeny.
getMeanBranchLengthTree(ephy, rate = "speciation")
ephy |
An object of class |
rate |
The type of rate-tree to be computed. Options: "speciation" (default), "extinction", "ndr" (net diversification), and "trait". |
A list with the following components:
phy: A phylogenetic tree, topologically identical to the
model tree, but with branch lengths replaced by the mean
(marginal) rates on each branch as estimated from the
posterior samples in the bammdata
object.
mean: The mean rate over all branches.
median: the median rate over all branches.
Dan Rabosky
plot.bammdata
data(whales)
data(events.whales)
ed <- getEventData(whales, events.whales, burnin=0.1, nsamples=500)
ed2 <- subsetEventData(ed, index = 1:20)
ratetree <- getMeanBranchLengthTree(ed2, rate='speciation')
plot(ratetree$phy, show.tip.label=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.