PCMTreeMatchLabels | R Documentation |
Get the node numbers associated with tip- or node-labels in a tree
PCMTreeMatchLabels(tree, labels, stopIfNotFound = TRUE)
tree |
a phylo object |
labels |
a character vector with valid tip or node labels from tree |
stopIfNotFound |
logical indicating if an error should be raised in case a label has not been found in the tree labels. Default: TRUE |
an integer vector giving the tip- or node- integer indices corresponding to labels. If stopIfNotFound is set to FALSE, this vector may contain NAs for the labels that were not found.
set.seed(1, kind = "Mersenne-Twister", normal.kind = "Inversion")
PCMTreeMatchLabels(PCMTree(ape::rtree(20)), c("t1", "t15", "21", "39"))
PCMTreeMatchLabels(PCMTree(ape::rtree(20)), c("t1", "45"), stopIfNotFound = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.