Phylogenetic Tree Statistics
Overview
Collection of phylogenetic tree statistics, collected throughout the literature. All functions have been written to maximize computation speed. The package includes umbrella functions to calculate all statistics, all balance associated statistics, or all branching time related statistics. Furthermore, the 'treestats' package supports summary statistic calculations on Ltables, provides speed-improved coding of branching times, Ltable conversion and includes algorithms to create intermediately balanced trees. Full description can be found in Janzen (2024) doi:10.1016/j.ympev.2024.108168.
- Polytomies were not handled correctly, and code for the following statistics
was adjusted accordingly: ILnumber, entropy_j, tot_internal_path, tot_path,
max_width, max_del_width, max_depth, mw_over_md, phylogenetic_diversity,
var_pair_dist and var_leaf_depth.
Furthermore, several statistics previously not available for non-binary trees
- Several statistics previously not available for non-binary trees
were expanded to be applicable to non-binary trees as well (use at your own
discretion, as normalization constants might not be applicable): b1, b2,
cherries, pitchforks, double_cherries, sackin index, total cophenetic index,
area_per_pair and average_leaf_depth.
max_closeness, area_per_pair and average_leaf_depth.
- For an overview of which statistics can be used with non-binary trees, please
Show all changes in 1.71.13Hide the rest of the changes in 1.71.13
consult the table in the README file, which has been updated accordingly.
From NEWS.md in the release
Install
Health
- OK13 OK2026-10-17
- WARNING12 OK, 1 WARNING2026-10-01
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-19
Show 6 earlier changesHide 6 earlier changes
- WARNING12 OK, 1 WARNING2026-06-17
- OK13 OK2026-04-30
- WARNING11 OK, 2 NOTE, 1 WARNING2026-04-23
- NOTE12 OK, 2 NOTE2026-04-22
- ERROR11 OK, 2 NOTE, 1 ERROR2026-04-18
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 81includes a package overview page
- Examples that run
- 100%18 run in a plain check
- Exported functions with examples
- 23%
- Documented parameters
- 100%
- Return-value docs
- 96%
- Help pages citing references
- 64%
- Correlations HTML
- Getting started HTML
- Speed improvement HTML
- Tree Size HTML
Downloads
Repository
- PRs merged (all time)
- 80%
- Median days to close, 50 most recently updated closed issues
- 14
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
7 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/thijsjanzen/treestats on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-08-24 · The repository has a site deploy workflow
pkgdown site last built 2026-08-24
Dependencies
Installing treestats adds 45 packages (27 with compiled code, 40 MB of source tarballs). Heaviest: BH 14 MB, igraph 4.8 MB, maps 2.2 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.71.13Latest
- 1.71.12
- 1.70.112026-05-20 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 1.70.82025-11-12 · diff ↗
- 1.70.7
- RR 4.5.0 released · 2025-04-11
- 1.70.52024-08-26 · diff ↗
- 1.70.42024-07-17 · diff ↗ ·
removed 3 exports
calc_balance_stats, eigen_vector, prep_lapl_specadded 16 exports
avg_vert_depth, calc_topology_stats, colless_corr, colless_quad, create_fully_balanced_tree, create_fully_unbalanced_tree, double_cherries, eigen_centrality, four_prong, minmax_adj, minmax_laplace, mw_over_md, root_imbalance, tot_internal_path, tot_path_length, treeness - RR 4.4.0 released · 2024-04-24
- 1.0.52024-01-30 · diff ↗
- 1.0.32024-01-12
- RR 4.3.0 released · 2023-04-21
Package metadata
- First published
- 2024-01-12
- Total releases
- 9 / 2 yrs
- License
- GPL-3 OSI
- Download size
- 5.2 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("treestats")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.1016/j.ympev.2024.108168.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.