PCMTreeGetTipsInRegime | R Documentation |
Get the tips belonging to a regime in a tree
PCMTreeGetTipsInRegime(tree, regime)
tree |
a phylo object with an edge.regime member or a PCMTree object |
regime |
a character or integer denoting a regime in the tree. |
an integer vector with the ids of the tips belonging to regime.
PCMTreeGetTipsInPart, PCMTreeGetPartNames, PCMRegimes, PCMTreeGetPartRegimes, PCMTreeSetPartRegimes, PCMTreeGetPartition
set.seed(1, kind = "Mersenne-Twister", normal.kind = "Inversion")
tree <- ape::rtree(10)
regimes <- sample(letters[1:3], nrow(tree$edge), replace = TRUE)
PCMTreeSetRegimesForEdges(tree, regimes)
if(requireNamespace("ggtree"))
PCMTreePlot(tree) + ggtree::geom_nodelab() + ggtree::geom_tiplab()
regime <- PCMRegimes(tree)[1]
PCMTreeGetTipsInRegime(tree, regime)
print(regime)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.