countNode: count the number of nodes

Description Usage Arguments Value Author(s) Examples

View source: R/tree_countNode.R

Description

countNode calculates the number of nodes on a phylo tree.

Usage

1
countNode(tree)

Arguments

tree

A phylo object

Value

a numeric value

Author(s)

Ruizhu Huang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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')


(n <- countLeaf(tinyTree))

TreeSummarizedExperiment documentation built on Dec. 8, 2020, 2 a.m.