Skip to content

treebalance

1.2.0

Computation of Tree (Im)Balance Indices

2packages depend
8.1Kdownloads / year
test coverage
13/13checks pass

Overview

About
Maintained by Luise KuehnFirst published 2021-09-223 releasesCRAN page ↗

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.

Install

Health

CRAN checks
13OK
Slowest check: 1.4 min · r-oldrel-windows-x86_64
Code health
None
Tests · ratio 0.00
not tracked
Coverage
100%
Documentation · exports
3
Dependencies · direct
Check history
  • OK2026-08-04
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMENoVignettesNopkgdown siteNoNEWSYes · 67% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
99%
Return-value docs
100%
References docs
94%

Downloads

8.1K
CRAN downloads in the past year
Rank #3,199 · ~22/day · ~673/mo
Daily download trend is not available in this view yet.
27630 days
3.6K90 days
8.1K1 year
Compare downloads with other packages →
Also on137 r2u22 autocran18 c2d4u

Dependencies

Declared dependencies
3 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.5.0
Imports (3)
LinkingTo (0)
none
Suggests (0)
none
Enhances (0)
none
Reverse dependencies
2direct
1indirect

Code & Tests

Datasets

People & History

People (5)
Maintainer (1)
Author, Maintainer
Authors (5)
Author, Maintainer
Package Timeline

3 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 1.2.0Latest
    2023-12-14 · current release · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • 1.1.0
    2021-10-17 · diff ↗
  • 1.0.0
    2021-09-22
  • R
    R 4.1.0 released · 2021-05-18

Package metadata

First published
2021-09-22
Total releases
3 / 5 yrs
License
GPL-3 OSI
Minimum R
≥ 3.5.0
Bundled data
6.3 KB / 1 file
Download size
52 KB
Installed size
not tracked yet
With dependencies
not tracked yet
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("treebalance")
Kuehn, L., Fischer, M., Herbst, L., Kersting, S., & Wicke, K. (2023). treebalance: Computation of Tree (Im)Balance Indices (Version 1.2.0) [Computer software]. https://doi.org/10.32614/CRAN.package.treebalance

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for treebalance version 1.2.0 [Data set]. HJJB, LLC. Data release v2026-08-23. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy