Package: treebalance 1.2.0

Luise Kuehn

treebalance: Computation of Tree (Im)Balance Indices

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) <ISBN: 978-3-031-39799-8>, <doi:10.1007/978-3-031-39800-1>, 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) <https://treebalance.wordpress.com>. 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) <http://ape-package.ird.fr/misc/FormatTreeR_24Oct2012.pdf>.

Authors:Mareike Fischer [aut], Lina Herbst [aut], Sophie Kersting [aut], Luise Kuehn [aut, cre], Kristina Wicke [aut]

treebalance_1.2.0.tar.gz
treebalance_1.2.0.tar.gz(r-4.5-noble)treebalance_1.2.0.tar.gz(r-4.4-noble)
treebalance_1.2.0.tgz(r-4.4-emscripten)treebalance_1.2.0.tgz(r-4.3-emscripten)
treebalance.pdf |treebalance.html
treebalance/json (API)
NEWS

# Install 'treebalance' in R:
install.packages('treebalance', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Datasets:
  • wedEth - Wedderburn Etherington numbers

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

1.48 score 1 packages 204 downloads 50 exports 10 dependencies

Last updated 12 months agofrom:7ce30ae32f. Checks:OK: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKDec 09 2024
R-4.5-linuxOKDec 09 2024

Exports:areaPerPairIauxE_l_XavgLeafDepIavgVertDepB1IB2IcherryIcollessIcollesslikeIcolPlaLabcolPlaLab_invcPL_invewCollessIfurnasIfurnasI_invget.subtreesizegetAllAncestorsgetAncVecgetDescMatrixgetfurranksgetlcagetNodesOfDepthgetsubtreeIbasedIis_binaryis_phylomaxDelWmaxDepthmaxDepthLeafmaxWidthmCherryImWovermDrogersIrQuartetIsackinIsShapeIstairs1stairs2symBucketLexicoSortsymNodesItotCophItotIntPathLentotPathLentree_decompositiontree_mergetreenumbertreenumber_invvarLeafDepIwe_ethweighL1dist

Dependencies:apecachemdigestfastmapgmplatticememoisenlmeRcpprlang

Readme and manuals

Help Manual

Help pageTopics
Calculation of the area per pair index for rooted treesareaPerPairI
Calculation of the average leaf depth index for rooted treesavgLeafDepI
Calculation of the average vertex depth for rooted treesavgVertDep
Calculation of the B1 index for rooted treesB1I
Calculation of the B2 index for rooted treesB2I
Calculation of the cherry index for rooted treescherryI
Calculation of the Colless index for rooted binary treescollessI
Calculation of the Colless-like indices for rooted treescollesslikeI
Calculation of the Colijn-Plazzotta rank for rooted binary treescolPlaLab
Generation of the rooted binary tree corresponding to a given Colijn-Plazzotta rankcolPlaLab_inv
Calculation of the equal weights Colless index for rooted binary treesewCollessI
Calculation of the Furnas rank for rooted binary treesfurnasI
Calculation of rooted binary tree for tuple (rank, leaf number)furnasI_inv
Auxiliary functionsauxE_l_X cPL_inv get.subtreesize getAllAncestors getAncVec getDescMatrix getfurranks getlca getNodesOfDepth getsubtree is_binary is_phylo maxDepthLeaf symBucketLexicoSort treenumber treenumber_inv tree_decomposition tree_merge we_eth
Calculation of the I-based indices for rooted treesIbasedI
Calculation of the (modified) maximum difference in widths for a rooted treemaxDelW
Calculation of the maximum depth of the treemaxDepth
Calculation of the maximum width of the treemaxWidth
Calculation of the modified cherry index for rooted binary treesmCherryI
Calculation of the maximum width over maximum depth of the treemWovermD
Calculation of the Rogers J index for rooted binary treesrogersI
Calculation of the rooted quartet index for rooted treesrQuartetI
Calculation of the Sackin index for rooted treessackinI
Calculation of the s-shape statistic for rooted treessShapeI
Calculation of the stairs1 value for rooted binary treesstairs1
Calculation of the stairs2 value for rooted binary treesstairs2
Calculation of the symmetry nodes index for rooted binary treessymNodesI
Calculation of the total cophenetic index for rooted treestotCophI
Calculation of the total internal path length for rooted treestotIntPathLen
Calculation of the total path length for rooted treestotPathLen
Calculation of the variance of leaf depths index for rooted treesvarLeafDepI
Wedderburn Etherington numbers (from OEIS)wedEth
Calculation of weighted l1 distance index for rooted binary treesweighL1dist