View source: R/tree_findExcl.R
findExcl | R Documentation |
Find all branches whose leaves do not overlap with those of the specified branches.
findExcl(tree, node, use.alias = FALSE)
tree |
A |
node |
A numeric or character vector specifying the nodes. |
use.alias |
A logical scalar. If |
A vector of node numbers
Ruizhu Huang
suppressPackageStartupMessages({
library(ggtree)
library(TreeSummarizedExperiment)
})
data(tinyTree)
ggtree(tinyTree, branch.length = "none") +
geom_text2(aes(label = node)) +
geom_hilight(node = 17, fill = "blue", alpha = 0.3) +
geom_hilight(node = 13, fill = "orange", alpha = 0.3)
## Find branches whose leaves do not overlap with the two colored branches.
## The returned branches are represented at the highest tree level
## possible without including any of the forbidden branches.
findExcl(tree = tinyTree, node = c(17, 13))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.