HistogramTools: Utility Functions for R Histograms

Provides a number of utility functions useful for manipulating large histograms. This includes methods to trim, subset, merge buckets, merge histograms, convert to CDF, and calculate information loss due to binning. It also provides a protocol buffer representation of R's native histogram class to allow histograms over large data sets to be computed and combined in distributed analytical pipelines. Implements bin-by-bin histogram distance measures described in Rubner, Tomasi and Guibas (2000) <doi:10.1023/A:1026543900054>, Swain and Ballard (1991) <doi:10.1007/BF00130487>, and Puzicha, Hofmann and Buhmann (1997) <doi:10.1109/CVPR.1997.609331>, and average shifted histograms as in Scott (2015, ISBN:9781118575536).

Version: 0.4.1
Imports: ash, Hmisc
Suggests: emdist, gdata, testthat (≥ 3.0.0)
Enhances: RProtoBuf
Published: 2026-05-12
DOI: 10.32614/CRAN.package.HistogramTools
Author: Murray Stokely ORCID iD [aut, cre, cph], Google, Inc. [cph], Tim Hesterberg [ctb]
Maintainer: Murray Stokely <murray at stokely.org>
BugReports: https://github.com/murraystokely/histogramtools/issues
License: Apache License 2.0
Copyright: Copyright 2011-2015 Google, Inc. Copyright 2026 Murray Stokely
URL: https://github.com/murraystokely/histogramtools
NeedsCompilation: no
Classification/ACM: G.3
Materials: README, NEWS
CRAN checks: HistogramTools results

Documentation:

Reference manual: HistogramTools.html , HistogramTools.pdf
Vignettes: HistogramTools-QuickRef (source, R code)
HistogramTools-Intro (source, R code)

Downloads:

Package source: HistogramTools_0.4.1.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): HistogramTools_0.4.1.tgz, r-oldrel (arm64): HistogramTools_0.4.1.tgz, r-release (x86_64): HistogramTools_0.4.1.tgz, r-oldrel (x86_64): HistogramTools_0.4.1.tgz
Old sources: HistogramTools archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=HistogramTools to link to this page.