Skip to content

unsum

0.3.0Package record

Reconstruct Raw Data from Summary Statistics

0packages depend
2.4Kdownloads / year
–test coverage
13/13flavors OK

Overview

About

Reconstructs all possible raw data that could have led to reported summary statistics. Provides a wrapper for the 'Rust' implementation of the 'CLOSURE' algorithm.

Changes in 0.3.0

This could easily be the first major version of unsum because it contains many new features, but also many breaking changes – you may need to adjust your code if you have used unsum before. However, it does not yet rise to the level where I can promise a stable API, so it is officially a minor release.

I do not think this is an ideal versioning model, and future releases will not follow it. The current release became necessary due to a combination of breaking changes in upstream dependencies and increasingly strict CRAN policies. Thanks to all maintainers of this crucial infrastructure.

Caveat

I have become more cautious about the inferences allowed by CLOSURE (and SPRITE) than I was at the time of the 0.2.0 release. Users are advised to exercise caution when using these methods and drawing conclusions based on them. Forensic metascience methods generally require validation, and there is still much work to be done on both of these methods. There are plans to conduct this work in the future.

Big picture

This version unifies and consolidates the system of CLOSURE functions and remodels its output to include much new information. It also moves the horns index calculation down to the Rust level, where it is now conducted alongside CLOSURE itself. Their results are returned together. This reaffirms the central status of closure_generate(): every other function that uses CLOSURE results can now immediately follow up on closure_generate(), without any intermediaries.

The other big change is SPRITE support. SPRITE is also implemented in Rust and generally mirrors CLOSURE in its output and API.

Another focus of this release is visualization, with new plotting functions and improvements on existing ones.

New features

  • SPRITE is now implemented in unsum. It is centered around sprite_generate() and features downstream visualization functions, such as sprite_plot_bar().
  • closure_count_all() returns the total number of samples CLOSURE will find without running CLOSURE itself. Useful to assess the complexity of future runs, but not yet used to its full potential.
  • demo_plot_bar() can be used to showcase principles of reconstruction methods and the horns index by using arbitrary example distributions.
Show all changes in 0.3.0Hide the rest of the changes in 0.3.0
  • Modified closure_generate()'s output to incorporate the horns index values for each generated sample, summary statistics about them, and frequencies based on the minimal and maximal horns index values.
  • Added writing mode in closure_generate() via the new path argument. This allows you to save large data to disk immediately, preventing a risk of data loss.
  • Added a technique column at the start of closure_generate()'s output. This is for clarity: it says "CLOSURE" here, and the output of any technique to be implemented in the future will be disambiguated in the same way.
  • Added closure_plot_horns_histogram() to visualize the distribution of horns index values as a whole.

Breaking changes

  • CLOSURE (and SPRITE) output is now an S7 object that is essentially a list of tibbles. You can access it like other tibbles, but manipulation is intentionally restricted to preserve authenticity of results.
  • Reworked closure_plot_ecdf():
  • It now shows 3 lines by default — overall mean, min horns index, and max horns index (samples = "mean_min_max"), with a legend that includes the horns index values of each category. The old default was samples = "mean" for a single line and no legend.
  • Accordingly, the line_color argument was replaced by line_color_single and line_color_multiple.
  • The pad argument is now a string with three alternatives.
  • Added legend_title and mark_decimal arguments.
  • Remodeled closure_plot_bar() to show two panels instead of one. It now compares the subsets of samples with minimal and maximal variability, as measured by horns(). Its format argument now defaults to "percent" rather than "absolute-percent", for readability. It also gained new arguments to control the new two-panel layout: min_max, overlay, facet_labels, and facet_labels_parens.
  • Redesigned closure_read() to control which parts are read in via the new include and samples_cap arguments.
  • Renamed the frequency argument of closure_plot_bar() to format, for clarity. There are many mentions of "frequency" in unsum, so it is good to disambiguate. In particular, the new demo_plot_bar() has freqs as its first argument.
  • Renamed the "absolute-percent" option of format (the former frequency) in closure_plot_bar() to "absolute_percent", for consistency with other multi-word strings in the package.
  • Removed closure_horns_analyze(). Its functionality was integrated into closure_generate() for simplicity and ease of use.
  • Removed closure_horns_histogram() because its functionality has now been replaced by closure_plot_horns_histogram().
  • Removed the rounding_error_mean and rounding_error_sd arguments from closure_generate(). They are not needed for users. If anything, you can use the rounding argument instead.
  • Also removed the warn_if_empty argument from closure_generate(). It did not fulfill much of a purpose.

Bugfixes

  • Fixed a bug that caused closure_plot_ecdf() to return clearly wrong results if the scale did not start at 1.
  • Fixed bugs in closure_plot_bar() that could cause imprecision in the ways that percentages were rounded for display using frequency = "percent" or frequency = "absolute-percent" (see above for new syntax). This was only intended to limit the length of the percentage text labels, but it could affect the bar sizes, as well.
  • Fixed a mismatch between closure_write() and closure_read(): the two disagreed about which files make up a results folder, so writing results and reading them back in again failed.

Lifecycle updates

  • The package now requires ggplot2 version 3.4.0 or later and ggtext.
  • The package no longer depends on readr.
  • New dependencies: S7, ggtext, grid, and stats. (The last two are standard packages.)
  • Updated the Rust dependency on extendr to version 0.9.0, which no longer calls the non-API entry point R_NamespaceRegistry.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 19.2 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-10-13
  • NOTE12 OK, 1 NOTE2026-10-12
  • OK13 OK2026-10-08
  • NOTE12 OK, 1 NOTE2026-10-07
  • OK13 OK2026-10-02
Show 9 earlier changesHide 9 earlier changes
  • NOTE12 OK, 1 NOTE2026-10-01
  • OK13 OK2026-09-23
  • NOTE12 OK, 1 NOTE2026-09-19
  • OK13 OK2026-09-10
  • NOTE4 OK, 9 NOTE2026-06-09
  • ERROR4 OK, 8 NOTE, 1 ERROR2026-06-08
  • NOTE8 OK, 6 NOTE2026-04-14
  • ERROR13 OK, 1 ERROR2026-03-16
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.3.0
READMEYes · 346 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 0.3.0Citation fileNoWebsiteYes · pkgdown
Help pages
12
Examples that run
92%11 run in a plain check · 1 never run
Exported functions with examples
100%
Documented parameters
80%
Return-value docs
100%
Help pages citing references
8%
Vignettes (1)

Downloads

2.4K
CRAN downloads in the past year
Rank #13,840 · ~6/day · ~197/mo
Daily download trend is not available in this view yet.
41730 days
83190 days
2.4K1 year
Compare downloads with other packages →
Also on368 r2u

Repository

7Stars
0Forks
0Open issues
0Open PRs
0Releases
553Commits
3Commit identities
553 commits · Last activity 2026-10-04 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
82
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-09-14 · 72026-07-07 · 7
PracticesBeta

13 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/lhdjung/unsum on 2026-10-11.

Continuous integration (1)
GitHub Actions
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-10-04 · The repository has a site deploy workflow

pkgdown site last built 2026-10-04

Reproducibility and dev environment (1)
data-raw/
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Show all practicesHide 2 practices
Research and citation (1)
CITATION.cff
Lint, format, editor (4)
jarlAirVS CodeRStudio project
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-02-24
    Seen in the repository: .claude
    Named in .Rbuildignore: .claude
    Pull request it wrote: opened by a project member
    Commits: at least 7 crediting it in the message
Models named in its commits
  • Claude Sonnet 4.64 commits · Mar 2026
  • Claude Opus 5.53 commits · Oct 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
16 external dependencies (excludes base and recommended)

Installing unsum adds 41 packages (23 with compiled code, 33 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, Rcpp 1.8 MB.

Depends (1)
R >= 4.2.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (2)
Author, Maintainer since 0.2.0 (2025)
Releases (2)

Pick two releases to compare their code metrics.

  • 0.3.0Latest
    record
    2026-09-04 · current release · diff ↗ ·
    removed 2 exports
    closure_horns_analyze, closure_horns_histogram
    added 7 exports
    closure_count_all, closure_plot_horns_histogram, demo_plot_bar, sprite_generate, sprite_plot_bar, sprite_read, sprite_write
  • R
    R 4.6.0 released · 2026-04-24
  • 0.2.0
    record
    2025-06-19
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2025-06-19
Total releases
2 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.2.0
Download size
8.5 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("unsum")
Jung, L., & Larigaldie, N. (2026). unsum: Reconstruct Raw Data from Summary Statistics (Version 0.3.0) [Computer software]. https://doi.org/10.32614/CRAN.package.unsum

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

The repository also keeps a CITATION.cff.

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 unsum version 0.3.0 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-18, 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