Description Usage Arguments Value Examples
View source: R/tree_distNode.R
distNode
is to calculate the distance between any two nodes on
a phylo
tree
1 | distNode(tree, node)
|
tree |
A phylo object. |
node |
A numeric or character vector of length two. |
A numeric value.
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(ggtree)
data(tinyTree)
ggtree(tinyTree) +
geom_text2(aes(label = node), color = "darkorange",
hjust = -0.1, vjust = -0.7) +
geom_text2(aes(label = branch.length), color = "darkblue",
vjust = 0.7)
distNode(tree = tinyTree, node = c(10, 11))
distNode(tree = tinyTree, node = c(12, 13))
distNode(tree = tinyTree, node = c(13, 15))
distNode(tree = tinyTree, node = c(12, 14))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.