Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

CladeSizes

Clade sizes


Description

CladeSizes() reports the number of nodes in each clade in a tree.

Usage

CladeSizes(tree, internal = FALSE, nodes = NULL)

Arguments

tree

A tree of class phylo.

internal

Logical specifying whether internal nodes should be counted towards the size of each clade.

nodes

Integer specifying indices of nodes at the base of clades whose sizes should be returned. If unspecified, counts will be provided for all nodes (including leaves).

Value

CladeSizes() returns the number of nodes (including leaves) that are descended from each node, not including the node itself.

See Also

Examples

tree <- BalancedTree(6)
plot(tree)
ape::nodelabels()
CladeSizes(tree, nodes = c(1, 8, 9))

TreeTools

Create, Modify and Analyse Phylogenetic Trees

v1.4.4
GPL (>= 3)
Authors
Martin R. Smith [aut, cre, cph] (<https://orcid.org/0000-0001-5660-1727>), Emmanuel Paradis [cph] (<https://orcid.org/0000-0003-3092-2199>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.