PCMTreeSetRegimesForEdges | R Documentation |
Set the regime for each individual edge in a tree explicitly
PCMTreeSetRegimesForEdges(tree, regimes, inplace = TRUE)
tree |
a PCMTree or a phylo object. |
regimes |
a vector of the length equal to 'nrow(tree$edge)'. |
inplace |
a logical indicating if the change should be done within the tree in the calling environment or a copy of the tree with modified regime assignment should be returned. |
if inplace is TRUE, nothing, otherwise a modified copy of tree.
Calling this function overwrites the current partitioning of the tree.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.