subtreeBAMM | R Documentation |
bammdata
objectGiven a set of tips or a node, this function extracts the
corresponding subtree from the bammdata
object. User should
specify either a set of tips or a node, and the node will overwrite
the tips if both are given.
subtreeBAMM(ephy, tips = NULL, node = NULL)
ephy |
An object of class |
tips |
An integer or character vector indicating which tips (more than one) to be included in the subtree. |
node |
An integer indicating the root of the subtree to be extracted, and it must correspond to an innernode on the tree. |
This function allows users to extract a subtree from a big
bammdata
object, and examine the subset using
plot.bammdata
An object of class bammdata
.
Huateng Huang
getmrca
, plot.bammdata
data(whales, events.whales)
ephy <- getEventData(whales, events.whales, burnin=0.25, nsamples=500)
# specify a set of tips for the subtree
tips <- sample(ephy$tip.label,size=20,replace=FALSE)
subphy <- subtreeBAMM(ephy,tips=tips)
# specify a innernode for subsetting
subphy <- subtreeBAMM(ephy,node=103)
# plot the subtree
plot(subphy)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.