trackNode: track the nodes of a phylo tree

View source: R/tree_trackNode.R

trackNodeR Documentation

track the nodes of a phylo tree

Description

trackNode track nodes of a phylo tree by adding the alias labels to them

Usage

trackNode(tree)

Arguments

tree

A phylo object

Value

a phylo object

Author(s)

Ruizhu Huang

Examples

library(ggtree)

data(tinyTree)

ggtree(tinyTree, branch.length = 'none') +
    geom_text2(aes(label = label), hjust = -0.3) +
    geom_text2(aes(label = node), vjust = -0.8,
               hjust = -0.3, color = 'blue')

#check whether the node number and node label are matched
trackTree <- trackNode(tinyTree)
ggtree(trackTree, branch.length = 'none') +
    geom_text2(aes(label = label), hjust = -0.3) +
    geom_text2(aes(label = node), vjust = -0.8,
               hjust = -0.3, color = 'blue')

fionarhuang/TreeSummarizedExperiment documentation built on June 11, 2025, 9:42 a.m.