printNode {TreeSummarizedExperiment} | R Documentation |
nodeLabel
is to print out the node labels of a phylo
tree.
printNode(tree, type = c("leaf", "internal", "all"))
tree |
A phylo object. |
type |
A character value choose from |
a data frame
Ruizhu HUANG
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"))