Learn R Programming

treebalance (version 1.2.0)

Computation of Tree (Im)Balance Indices

Description

The aim of the 'R' package 'treebalance' is to provide functions for the computation of a large variety of (im)balance indices for rooted trees. The package accompanies the book ''Tree balance indices: a comprehensive survey'' by M. Fischer, L. Herbst, S. Kersting, L. Kuehn and K. Wicke (2023) , , which gives a precise definition for the terms 'balance index' and 'imbalance index' (Chapter 4) and provides an overview of the terminology in this manual (Chapter 2). For further information on (im)balance indices, see also Fischer et al. (2021) . Considering both established and new (im)balance indices, 'treebalance' provides (among others) functions for calculating the following 18 established indices and index families: the average leaf depth, the B1 and B2 index, the Colijn-Plazzotta rank, the normal, corrected, quadratic and equal weights Colless index, the family of Colless-like indices, the family of I-based indices, the Rogers J index, the Furnas rank, the rooted quartet index, the s-shape statistic, the Sackin index, the symmetry nodes index, the total cophenetic index and the variance of leaf depths. Additionally, we include 9 tree shape statistics that satisfy the definition of an (im)balance index but have not been thoroughly analyzed in terms of tree balance in the literature yet. These are: the total internal path length, the total path length, the average vertex depth, the maximum width, the modified maximum difference in widths, the maximum depth, the maximum width over maximum depth, the stairs1 and the stairs2 index. As input, most functions of 'treebalance' require a rooted (phylogenetic) tree in 'phylo' format (as introduced in 'ape' 1.9 in November 2006). 'phylo' is used to store (phylogenetic) trees with no vertices of out-degree one. For further information on the format we kindly refer the reader to E. Paradis (2012) .

Copy Link

Version

Install

install.packages('treebalance')

Monthly Downloads

208

Version

1.2.0

License

GPL-3

Maintainer

Luise Kuehn

Last Published

December 14th, 2023

Functions in treebalance (1.2.0)

maxDelW

Calculation of the (modified) maximum difference in widths for a rooted tree
symNodesI

Calculation of the symmetry nodes index for rooted binary trees
totCophI

Calculation of the total cophenetic index for rooted trees
collesslikeI

Calculation of the Colless-like indices for rooted trees
collessI

Calculation of the Colless index for rooted binary trees
weighL1dist

Calculation of weighted l1 distance index for rooted binary trees
rQuartetI

Calculation of the rooted quartet index for rooted trees
rogersI

Calculation of the Rogers J index for rooted binary trees
stairs1

Calculation of the stairs1 value for rooted binary trees
stairs2

Calculation of the stairs2 value for rooted binary trees
wedEth

Wedderburn Etherington numbers (from OEIS)
maxWidth

Calculation of the maximum width of the tree
varLeafDepI

Calculation of the variance of leaf depths index for rooted trees
sShapeI

Calculation of the s-shape statistic for rooted trees
maxDepth

Calculation of the maximum depth of the tree
sackinI

Calculation of the Sackin index for rooted trees
colPlaLab

Calculation of the Colijn-Plazzotta rank for rooted binary trees
colPlaLab_inv

Generation of the rooted binary tree corresponding to a given Colijn-Plazzotta rank
B2I

Calculation of the B2 index for rooted trees
areaPerPairI

Calculation of the area per pair index for rooted trees
getDescMatrix

Auxiliary functions
B1I

Calculation of the B1 index for rooted trees
cherryI

Calculation of the cherry index for rooted trees
IbasedI

Calculation of the I-based indices for rooted trees
avgLeafDepI

Calculation of the average leaf depth index for rooted trees
avgVertDep

Calculation of the average vertex depth for rooted trees
furnasI

Calculation of the Furnas rank for rooted binary trees
ewCollessI

Calculation of the equal weights Colless index for rooted binary trees
mWovermD

Calculation of the maximum width over maximum depth of the tree
furnasI_inv

Calculation of rooted binary tree for tuple (rank, leaf number)
mCherryI

Calculation of the modified cherry index for rooted binary trees
totIntPathLen

Calculation of the total internal path length for rooted trees
totPathLen

Calculation of the total path length for rooted trees