Dynamic Generation and Quality Checks of Formula Objects
Overview
Many statistical models and analyses in R are implemented through formula objects. The formulaic package creates a unified approach for programmatically and dynamically generating formula objects. Users may specify the outcome and inputs of a model directly, search for variables to include based upon naming patterns, incorporate interactions, and identify variables to exclude. A wide range of quality checks are implemented to identify issues such as misspecified variables, duplication, a lack of contrast in the inputs, and a large number of levels in categorical data. Variables that do not meet these quality checks can be automatically excluded from the model. These issues are documented and reported in a manner that provides greater accountability and useful information to guide an investigation of the data.
Minor updates:
- reduce.existing.formula: A new parameter envir was added to store the environment of the formula, with the global environment as the default.
- add.backtick: A new parameter dat was addedBackticks can be added based on the relationship of the object to the data dat. The data can be formatted as either a data.frame or data.table object.
Major updates:
Improvement to accommodate variable transformations. This allows the user to specify more complex quantities, e.g. sqrt(Age^2 * log(Income)). In create.formula, this may be specified in the input.names or the interactions. The calculated inclusion.table of quality checks has been updated to evaluate the transformations and then assess the inclusion and exclusion criteria. Likewise, in add.backtick, a similar evaluation is used to determine whether encompass the object within backticks for use in a formula object. This improves upon the previous version of the formulaic package. Previously the main effects and interactions could only be based on the variables within a data.frame. With this change, the package should better accommodate most transformations of these variables.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- WARNING12 OK, 1 WARNING2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 4
- Examples that run
- 100%2 run in a plain check
- Exported functions with examples
- 67%
- Documented parameters
- 100%
- Return-value docs
- 0%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 69%
- Median days to close, 50 most recently updated closed issues
- 76
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
9 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/dachosen1/formulaic on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Show all practicesHide 2 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-01-11Pull request it wrote: opened by a project memberCommits: 3 by its own account
Dependencies
Installing formulaic adds 1 package (1 with compiled code, 5.7 MB of source tarballs). Heaviest: data.table 5.7 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.0.8Latest
- 0.0.72020-05-04 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.0.62020-01-19 · diff ↗
- 0.0.52019-12-16 · diff ↗
- 0.0.42019-10-08 · diff ↗
- 0.0.32019-08-31 · diff ↗
- 0.0.2
- 0.0.12019-08-05
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2019-08-05
- Total releases
- 8 / 7 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.2.0
- Bundled data
- 124 KB / 1 file
- Download size
- 188 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("formulaic")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.