Skip to content

cldreducer

0.2.0Package record

Reduce Compact Letter Displays

0packages depend
46downloads / year
99.3%test coverage
11/11flavors OK

Overview

About
Maintained by John EnnisCRAN page ↗GitHub ↗Issues ↗Declared funder: Aigora

Reduces compact letter displays (CLDs) of all pairwise comparisons. A CLD gives two groups a common letter exactly when they are not significantly different. The package finds a display with the fewest letter assignments that keeps every one of these relationships. This is the assignment-minimum clique covering problem of Ennis, Fayle, and Ennis (2012) doi:10.1145/2133803.2275596, solved as a mixed-integer linear program with 'HiGHS'. Among the displays with the fewest assignments, it returns one fixed canonical display, so the result does not depend on the solver. The package includes the wheat yield example of Piepho (2004) doi:10.1198/1061860043515.

Changes in 0.2.0

First release of the R package. The repository now holds three packages that follow one specification (docs/algorithm.md) and pass one conformance suite (conformance/): the R package cldreducer at the repository root, the Python package cld-reducer in python/, and the JavaScript package cld-reducer in js/. All three solve the problem with HiGHS and return the same display for the same input.

R package

  • reduce_letters() reduces a compact letter display from pairwise comparisons, and reduce_from_adjacency() does the same from a matrix of non-significant pairs. Both return a cld_reduction object with print() and as.data.frame() methods.
  • The example data sets are piepho2004_wheat, simple_abc_pairs, and simple_abc_means.
  • R turns HiGHS presolve off, because the highs package bundles HiGHS 1.14.

JavaScript package

  • New npm package cld-reducer in js/, built on HiGHS compiled to WebAssembly: reduceLetters(), reduceFromAdjacency(), loadSolver(), and the error classes CldReducerError, InvalidInputError, and SolverError. Group means must be a Map or an array of { group, mean }; a plain object is rejected.

Python package

  • Preserve exact CSV labels, including leading zeros, NA-like text, and empty strings.
  • Preserve mixed numeric labels in lists of pair rows and means mappings.
  • Use one means-column rule for group order and values.
  • Report uneven adjacency rows as InvalidInputError with the square-matrix message.
Show all changes in 0.2.0Hide the rest of the changes in 0.2.0
  • The package moved to python/. The import name cld_reducer, the public names, the exceptions, and the cld-reduce command with its flags are unchanged. Installing from a git URL now needs #subdirectory=python: pip install "git+https://github.com/aigorahub/cld-reducer.git#subdirectory=python".
  • The solver is HiGHS through highspy. The dependencies are highspy, numpy, and pandas; scipy and networkx are gone.
  • **Canonical tie-break.** Many inputs have several displays with the same, smallest number of assignments (the Piepho 2004 wheat example has 64). The package now returns one fixed display: among all minimal displays, the one whose membership vector is lexicographically greatest in the order of the specification. The result no longer depends on which optimum the solver finds first, so R, Python, and JavaScript agree. For inputs with several minimal displays this can differ from version 0.1.0.
  • **Canonical clique order.** Maximal cliques are now ordered by their sorted group indices, where 0.1.0 used the order of NetworkX. This order breaks ties between letters, so the letters can be renamed even for inputs that have only one minimal display. Example: five groups numbered 0 to 4, no means, and non-significant pairs 01, 02, 03, 04, 14, 24 have one minimal display; group 3 had A in 0.1.0 and has C now.
  • stats["reduction_pct"] is not rounded any more; print it with the format you need. The example scripts print one decimal.
  • stats["solver_status"] is the text Optimal, and stats["objective"] is a whole number.
  • time_limit is one time budget for all solves of a call. Each solve gets the time that is left.
  • Group means must be finite numbers; a missing, infinite, or non-numeric mean is an InvalidInputError.
  • A missing group label (None, NaN, pd.NA, or pd.NaT) is an InvalidInputError, in the comparisons, the groups, and the means.
  • Means with a repeated group label are an InvalidInputError for reduce_from_adjacency() too.
  • Significance text is trimmed of spaces, tabs, carriage returns, and line feeds only. Other white space, such as a no-break space, makes the value invalid.
  • An empty list of comparisons is a table with zero rows, so the groups come from the means.
  • A solver value that is not within 1e-6 of 0 or 1 is a SolverError, also when the value is a whole number.

Release preparation

  • Check installed Python wheels, wheels rebuilt from source distributions, and npm TypeScript consumers outside the checkout.
  • Require manual tag-based publication with dry runs, version checks, artifact hashes, and separate npm/PyPI jobs.
  • Record data reuse conditions and Python publication history as open release requirements.

From NEWS.md in the release

Install

Health

CRAN checks
11OK
Slowest check: 1.7 min · r-devel-windows-x86_64
Status changes
  • OK11 OKNow
  • OK5 OK2026-10-21
Advisories

none known

Documentation

In release 0.2.0
READMENoVignettesNoNEWSYes · 67% structured · mentions 0.2.0Citation fileYes · cites a publicationWebsitenot declared in DESCRIPTION
Help pages
5 (1 internal)includes a package overview page
Examples that run
100%4 run in a plain check
Exported functions with examples
100%
Documented parameters
70%
Return-value docs
100%
Help pages citing references
20%

Downloads

46
CRAN downloads in the past year
Rank #25,688 · ~0/day · ~4/mo
cldreducer
Daily download trend is not available in this view yet.

Repository

0Stars
0Forks
0Open issues
0Open PRs
2Releases
233Commits
2Commit identities
233 commits · Last activity 2026-10-20
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
not measured
Median days to close, 50 most recently updated closed PRs
0
PracticesBeta

Repository github.com/aigorahub/cld-reducer is linked, but repository-practices checks have not run for it yet.

How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
2 external dependencies (excludes base and recommended)

Installing cldreducer adds 4 packages (4 with compiled code, 3.8 MB of source tarballs). Heaviest: Rcpp 1.8 MB, highs 1.7 MB, checkmate 247 KB.

Depends (1)
R >= 4.0.0
Imports (2)
highsMatrix
LinkingTo (0)
none
Suggests (1)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (2)
Author, Maintainer since 0.2.0 (2026)
Copyright holder, Funder
Releases (1)
  • 0.2.0Latest
    2026-10-21 · current release ·
    11 days in CRAN's queue
    Listed in CRAN's incoming queue from 2026-10-10 16:03 to 2026-10-21 10:55 UTC, in 59 readings.
  • R
    R 4.6.0 released · 2026-04-24
Across CRAN, the median accepted release of the past year spent 26 hours in the queue, 90% under 11 days.How queue time is measured

Package metadata

First published
2026-10-21
Total releases
1 / 1 yrs
License
MIT + file LICENSE OSI
Copyright
See file COPYRIGHTS for example data sources and reuse status.
Minimum R
≥ 4.0.0
Bundled data
0.8 KB / 3 files
Download size
25 KB

Cite

Cite this package

Run in R for the authors' entry:

citation("cldreducer")

The package provides a citation file, so citation() returns the authors' own entry.

It points to 10.1145/2133803.2275596.

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

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