The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

heaping: Correction of Heaping on Individual Level

Provides methods for correcting heaping (digit preference) in survey data at the individual record level. Age heaping, where respondents disproportionately report ages ending in 0 or 5, is a common phenomenon that can distort demographic analyses. Unlike traditional smoothing methods that only correct aggregated statistics, this package corrects individual values by replacing a calculated proportion of heaped observations with draws from fitted truncated distributions (log-normal, normal, or uniform). Supports 5-year and 10-year heaping patterns, single heap correction, and optional model-based adjustment to preserve covariate relationships.

Version: 0.1.0
Depends: R (≥ 3.5.0)
Imports: fitdistrplus, EnvStats, stats
Suggests: VIM, ranger, data.table, ggplot2, simPop, testthat (≥ 3.0.0), knitr, rmarkdown
Published: 2026-02-09
DOI: 10.32614/CRAN.package.heaping (may not be active yet)
Author: Matthias Templ ORCID iD [aut, cre], Bernhard Meindl [ctb]
Maintainer: Matthias Templ <matthias.templ at gmail.com>
BugReports: https://github.com/matthias-da/heaping/issues
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
URL: https://github.com/matthias-da/heaping
NeedsCompilation: no
CRAN checks: heaping results

Documentation:

Reference manual: heaping.html , heaping.pdf
Vignettes: Introduction to the heaping Package (source, R code)

Downloads:

Package source: heaping_0.1.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): heaping_0.1.0.tgz, r-oldrel (arm64): heaping_0.1.0.tgz, r-release (x86_64): heaping_0.1.0.tgz, r-oldrel (x86_64): heaping_0.1.0.tgz

Linking:

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

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.