Schema-Based Validation of 'R' Objects with User-Defined Rules
Overview
A schema-based validation framework for 'R' objects using user-defined rules. Provides three 'S7' classes 'Registry', 'Schema', and 'Validator' to manage rules, define list-based schemas, and validate data in a flexible and extensible manner.
New Features
- New
lengthrule added to theRegistry. This rule checks that the length of a data field is exactly equal to the value specified by thelengthschema field. This removes the need to specify both amin_lengthandmax_lengthwith the same value when enforcing an exact length. - New
length_and_min_lengthandlength_and_max_lengthcross rules added to theRegistry. These rules check that themin_lengthandmax_lengthrules are not specified when alengthrule is present. - The
coercerule now accepts functions with multiple arguments when passed directly to aSchemaorValidator, allowing baseas.*()functions to be used ascoercerules in schema definitions. However, only the field value is passed to the function; any additional arguments are ignored. Functions with multiple arguments still cannot be added to theRegistry@coerce_map, asadd_coerce_rule()enforces a strict one-argument function signature.
Bug fixes
- Fixed the
allowed_type_mismatchandforbidden_type_mismatchcross rules so that they use theRegistry@type_mapto obtain the function used for type checking whentypeis a string, and use the supplied function directly whentypeis a function. Previously, function-valuedtypefields caused an error, while character-valuedtypefields could result in incorrect type checking because the class of theallowed/forbiddenfield was compared directly with thetypefield. This could produce false positives, such as an integerallowed/forbiddenfield being flagged as a type mismatch whentypewas "numeric". - Fixed incorrect argument-count checking for the
type,predicate, andapplyrules.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK7 OK2026-06-11
Documentation
- Help pages
- 6 (1 internal)includes a package overview page
- Examples that run
- 100%5 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 93%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 37
- Median days to close, 50 most recently updated closed PRs
- not measured
Stars over time
Releases over time
Issues over time
Commits over time
10 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/lj-jenkins/fluffy on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-08-20 · The repository has a site deploy workflow
pkgdown site last built 2026-08-20
Show all practicesHide 2 practices
Dependencies
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.0.1Latest
- 1.0.02026-06-10
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-06-10
- Total releases
- 2 / 1 yrs
- License
- MIT + file LICENSE OSI
- Download size
- 156 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("fluffy")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
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.