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 |
| Author: | Matthias Templ |
| 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 |
| Reference manual: | heaping.html , heaping.pdf |
| Vignettes: |
Introduction to the heaping Package (source, R code) |
| Package source: | heaping_0.1.0.tar.gz |
| Windows binaries: | r-devel: heaping_0.1.0.zip, r-release: heaping_0.1.0.zip, r-oldrel: heaping_0.1.0.zip |
| 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 |
Please use the canonical form https://CRAN.R-project.org/package=heaping to link to this page.
Need a high-speed mirror for your open-source project?
Contact our mirror admin team at info@clientvps.com.
This archive is provided as a free public service to the community.
Proudly supported by infrastructure from VPSPulse , RxServers , BuyNumber , UnitVPS , OffshoreName and secure payment technology by ArionPay.