printNode {TreeSummarizedExperiment} | R Documentation

## To print out the node labels

### Description

`nodeLabel` is to print out the node labels of a `phylo` tree.

### Usage

    printNode(tree, type = c("leaf", "internal", "all"))

### Arguments

`tree` | A phylo object.
`type` | A character value choose from `leaf`, `all`, and `internal`. If `leaf`, the output is a data frame including only leaf nodes; if `internal`, the output is a data frame including only internal nodes; if `all`, the output is a data frame including all nodes.

### Value

a data frame

### Author(s)

Ruizhu HUANG

### Examples

    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"))

[Package TreeSummarizedExperiment version 1.6.2 Index]