Description Usage Arguments Value Author(s) Examples
View source: R/tree_printNode.R
nodeLabel
is to print out the node labels of a phylo
tree.
1 |
tree |
A phylo object. |
type |
A character value choose from |
a data frame
Ruizhu HUANG
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | data(tinyTree)
library(ggtree)
# PLOT tree
# The node labels are in orange texts and the node numbers are in blue
ggtree(tinyTree,branch.length = 'none')+
geom_text2(aes(label = label), color = "darkorange",
hjust = -0.1, vjust = -0.7) +
geom_text2(aes(label = node), color = "darkblue",
hjust = -0.5, vjust = 0.7)
(pn1 <- printNode(tinyTree, type = "leaf"))
(pn2 <- printNode(tinyTree, type = "internal"))
(pn3 <- printNode(tinyTree, type = "all"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.