Skip to content

parsnip

1.6.1Package record

A Common API to Modeling and Analysis Functions

58packages dependsuggested by 50
506.7Kdownloads / year
69.6%test coverage
13/13flavors OK

Overview

About

A common interface is provided to allow users to specify a model without having to remember the different argument names across different functions or computational engines (e.g. 'R', 'Spark', 'Stan', 'H2O', etc).

Changes in 1.6.1

Breaking Change

  • Two translate() helper functions for glmnet are generalized and used to de-duplicate code for ordinalNet and glmnetcr. The latter two no longer silently modify penalty path-governing engine arguments (@corybrunson, #1412 & #1424), which will impact code that relied on these modifications.
  • logistic_reg() now errors when the outcome has more than two levels, instead of warning. Most engines cannot fit this: glm collapses every level after the first into the event and keras3 returns a column per level, but in both cases the probability columns parsnip labels do not mean what their names say, and glmnet, stan, and brulee error inside the engine. The LiblineaR engine is exempt, since it genuinely fits a multiclass model and multinom_reg() has no LiblineaR engine. The warning was added in 1.1.0 (#545); erroring reflects that for most engines the result was not usable (#1444).

New Features

  • New model specifications tabular_auto_int(), tabular_chronos(), tabular_icl(), tabular_pfn(), tabular_resnet(), tabular_rln(), and tabular_saint() were added for tabular deep-learning and foundation models, with engines provided by the tabby extension package (#1386).
  • fit() and fit_xy() have less per-fit overhead, making small or repeated fits (such as during tuning) faster (#1071).
  • null_model() now supports quantile regression mode, where fitting computes the requested empirical quantiles of the outcome.
  • For censored regression models, the censoring weights can now be added to the predictions of survival probability by setting add_censoring_weights = TRUE in predict(type = "survival") (#1371).
  • ordinal_reg() gains arguments threshold_structure and parallel_reg to control threshold constraints and the parallel regression assumption. The ordinalNet engine can use parallel_reg while the clm and vglm engines can use both new arguments (#1393, @corybrunson).

Bug Fixes

  • The deprecated quantile argument now reaches its deprecation warning when passed via predict(type = "quantile") instead of being rejected as an unknown argument. The error for unknown arguments passed to predict() now lists the offending argument names. (@bjornkallerud, #1258)
  • Several internal list accesses that resolved only through $ partial matching were corrected: the outcome levels recorded when fitting from a formula, the "ranger" prediction post-processor, and the multi_predict() generic's check for a failed fit. Results are unchanged, but each would have silently started reading a different element had one with a shorter name been added.
Show all changes in 1.6.1Hide the rest of the changes in 1.6.1
  • Model and engine arguments are now evaluated while the model call is assembled, so the call an engine records no longer contains quosures. This fixes mars() fits with the earth engine when prune_method = "cv" is combined with prod_degree (#432), and set_engine("glmnet", relax = TRUE) for every glmnet engine, which also covers the poissonreg and censored wrappers (#1069). Both engines re-evaluate their own recorded call with base eval(), which cannot handle quosures. A fitted object's $fit$call now shows values such as degree = 2 rather than degree = ~2.
  • bart() classification fits with the "dbarts" engine now return each observation's own confidence and prediction interval bounds. The bounds were sorted across observations, so each row received some other row's rank-matched limits. Regression intervals were unaffected (#1407).
  • bart() classification with the "dbarts" engine now errors when the outcome does not have exactly two levels. dbarts models a binary outcome, but parsnip passed it the factor codes without checking, so a third level became a y value of 2 and the returned "probabilities" were not on [0, 1]. This also affected a two-level outcome that retained an unused level: class and probability predictions were silently mislabelled, and interval predictions errored inside rlang::set_names(). The new error names the unused levels and suggests droplevels() when that is the problem (#1444).
  • boost_tree() with the "xgboost" engine now warns once per session when monotone_constraints is supplied for binary classification. The signs of the constraints are relative to the event level, which is the first factor level unless event_level = "second" is set, so monotone_constraints = 1 constrains the probability of that level rather than of the second one. The engine documentation now describes the convention. Fitted models are unchanged (#796).
  • boost_tree() models fit with the "xgboost" engine and a function-valued objective now error informatively for predict(type = "class") and predict(type = "prob") instead of returning raw margins labelled as probabilities. xgboost cannot report whether a custom objective produces margins or probabilities, so parsnip cannot convert them; use predict(type = "raw") and apply the matching inverse link yourself, or register a custom engine that post-processes the predictions. Fitting, type = "raw", and regression are unaffected (#999).
  • fit() and fit_xy() now error when extra arguments are passed through .... The documentation always said these were ignored, but depending on the combination of user and engine interface they were silently dropped, silently applied (a subset argument really did subset the training data on the formula-to-xy path), or raised an internal "unused argument" error. Pass engine arguments to set_engine() and case weights to the case_weights argument. Passing offset gets specific advice, since the general suggestion does not work for it: use offset() in the formula, or pass the offset vector to set_engine() when using fit_xy() (#492, #1439).
  • mars() classification fits with the "earth" engine now return correct predict(type = "class") results for outcomes with three or more levels. A binary threshold rule was applied regardless of the number of levels, so every multiclass prediction was wrong and the last level could never be predicted. Binary outcomes are unaffected (#472, #1409).
  • multi_predict() for glmnet engine fits now passes type = "raw" through to glmnet with no post-processing. It was silently ignored for linear_reg(), which returned the usual nested .pred tibble, and errored unhelpfully for logistic_reg() and multinom_reg(). The result is glmnet's own prediction object — a matrix with one column per penalty, or a three-dimensional array for multinom_reg() — rather than a tibble (#857).
  • The per-type glmnet prediction methods (predict_numeric._elnet(), predict_class._lognet() and the six others like them) were removed. Each only evaluated the model specification before handing off to the corresponding model_fit() method, which the predict() path already does beforehand. Predictions from glmnet models are unchanged. A custom model that carries one of glmnet's fitted classes, such as _elnet, now reaches parsnip's model_fit() methods for these prediction types rather than the glmnet ones (#878).
  • multi_predict_args() and has_multi_predict() work again for fitted workflows, returning the submodel argument names and TRUE instead of NULL and FALSE. They read from an outdated internal workflows structure. Both now error informatively on an untrained workflow rather than silently reporting that it has no submodel arguments (#1410).
  • predict_raw() no longer errors when opts contains an argument name that collides with a protected prediction argument such as newdata or object. The colliding entry is now dropped with a warning; previously every path through that branch failed with "attempt to select less than one element". This also covers predict(type = "raw", opts = ...) (#1408).
  • set_model_arg() now stores func as a list when given the named character vector form shown in its documentation, such as c(pkg = "dials", fun = "mixture"). That form registered without complaint but made tuning fail much later with $ operator is invalid for atomic vectors (#1251).
  • svm_linear() with the "LiblineaR" engine now passes cost to LiblineaR::LiblineaR(). It was previously mapped to a nonexistent C argument, which the engine silently absorbed into its dots, so every fit used the engine default of cost = 1 and tuning over cost had no effect. Fitted results will change for any model with a non-default cost (#1405).
  • Fitting with sparse data now respects the model mode, so loading an extension package that registers an engine for a different mode can no longer alter sparse data support for the original mode (#1382).
  • Corrected documentation that referred to fit() and fit_xy() as arguments rather than functions in the case weights template (#1394).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 7.5 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-10-04
  • ERROR8 OK, 4 NOTE, 1 ERROR2026-09-11
  • NOTE12 OK, 1 NOTE2026-07-11
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
Show 3 earlier changesHide 3 earlier changes
  • OK14 OK2026-04-10
  • ERROR13 OK, 1 ERROR2026-04-07
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.6.1
READMEYes · 410 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 1.6.1Citation fileNoWebsiteYes · pkgdown

The repository also keeps web-only articles.

Help pages
242 (173 internal)includes a package overview page
Examples that run
100%58 run in a plain check (57 of them under a condition)
Exported functions with examples
48%
Documented parameters
96%
Return-value docs
39%
Help pages citing references
18%

Downloads

506.7K
CRAN downloads in the past year
Rank #591 · ~1.4K/day · ~42.2K/mo
Daily download trend is not available in this view yet.
35.7K30 days
105.4K90 days
506.7K1 year
Compare downloads with other packages →
Also on14.7K r2u9 autocran39K conda_forge218 c2d4u

Repository

661Stars
116Forks
66Open issues
3Open PRs
36Releases
2,227Commits
67Commit identities
2,227 commits · Last activity 2026-09-27 · +0.3% stars, 30d · Default branch at 1.6.1.9000, ahead of CRAN 1.6.1 (checked 2026-10-11)
Responsiveness
How these are sampled
PRs merged (all time)
96%
Median days to close, 50 most recently updated closed issues
120
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-09-29 · 6312026-10-06 · 661
PracticesBeta

14 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/tidymodels/parsnip on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (3)
Code of conductContributing guideIssue templates
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-09-27 · The repository has a site deploy workflow

pkgdown site last built 2026-09-27

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 1 practice
Lint, format, editor (4)
Lint workflowAirVS 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-03-02
    Seen in the repository: .claude, .claude/skills
    Named in .Rbuildignore: .claude
    Commits: at least 1 crediting it in the message
  • GitHub Copilotfirst seen 2026-07-27
    Pull request: opened by its own account
    Commits: 1 by its own account · at least 1 crediting it in the message
Shared conventions any agent may read, so they name no particular tool.
Seen in the repository: AGENTS.md
From outside contributors
  • Claude Code
    Pull requests: 1 from outside contributors, first on 2026-09-17, 1 from forks
Models named in its commits
  • Claude Fable 5.11 commit · Sep 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
39 external dependencies (excludes base and recommended)

Installing parsnip adds 33 packages (16 with compiled code, 29 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, isoband 1.5 MB.

Depends (1)
R >= 4.1
LinkingTo (0)
none
Enhances (0)
none

Datasets

People & History

People (4)
Maintainer since 0.0.1 (2018), Author
Contributor · added in 0.1.6
Copyright holder, Funder · added in 1.1.0
Listed in earlier versions (2)
RStudio
no longer listed · 0.0.1 to 1.0.3
Posit Software PBC
no longer listed · 1.0.4
Releases (34)

Pick two releases to compare their code metrics.

  • 1.6.1Latest
    record
    2026-09-27 · current release · diff ↗ ·
    added 8 exports
    check_outcome_levels, tabular_auto_int, tabular_chronos, tabular_icl, tabular_pfn, tabular_resnet, tabular_rln, tabular_saint
  • 1.6.0
    record
    2026-05-14 · diff ↗ ·
    added 3 exports
    keras3_activations, keras3_mlp, keras3_predict_classes
  • R
    R 4.6.0 released · 2026-04-24
  • 1.5.0
    record
    2026-04-09 · diff ↗ ·
    added 8 exports
    format_predictions, mcqrnn_train, model_arg_exists, ordinal_reg, predict_class, predict_classprob, predict_hazard, predict_quantile
  • 1.4.1
    record
    2026-01-11 · diff ↗
  • 1.4.0
    record
    2025-12-01 · diff ↗
  • 1.3.3
    record
    2025-08-31 · diff ↗
  • 1.3.2
    record
    2025-05-28 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 1.3.1
    record
    2025-03-12 · diff ↗
  • 1.3.0
    record
    2025-02-14 · diff ↗ ·
    removed 2 exports
    bartMachine_interval_calc, rpart_train
    added 5 exports
    .get_prediction_column_names, ensure_parsnip_format, extract_fit_time, keras_activations, matrix_to_quantile_pred
  • R
    R 4.4.0 released · 2024-04-24
  • 1.2.1
    record
    2024-03-22 · diff ↗
  • 1.2.0
    record
    2024-02-16 · diff ↗ ·
    added 5 exports
    case_weights_allowed, check_args, predict_confint, predict_predint, predict_predint.model_fit
  • 1.1.1
    record
    2023-08-17 · diff ↗ ·
    added 2 exports
    .extract_surv_status, .extract_surv_time
  • R
    R 4.3.0 released · 2023-04-21
Show 27 earlier eventsHide 27 earlier events
  • 1.1.0
    record
    2023-04-12 · diff ↗ ·
    added 1 export
    .censoring_weights_graf
  • 1.0.4
    record
    2023-02-23 · diff ↗ ·
    removed 2 exports
    check_model_doesnt_exist, check_model_exists
  • 1.0.3
    record
    2022-11-11 · diff ↗ ·
    added 3 exports
    prompt_missing_implementation, spec_is_loaded, spec_is_possible
  • 1.0.2
    record
    2022-10-01 · diff ↗ ·
    added 2 exports
    bag_mlp, condense_control
  • 1.0.1
    record
    2022-08-18 · diff ↗ ·
    added 1 export
    auto_ml
  • 1.0.0
    record
    2022-06-16 · diff ↗ ·
    added 17 exports
    .model_param_name_key, cforest_train, ctree_train, format_class, format_classprobs, format_hazard, format_linear_pred, format_num, format_survival, format_time, frequency_weights, glm_grouped, importance_weights, max_mtry_formula, print_model_spec, update_spec, xgb_predict
  • R
    R 4.2.0 released · 2022-04-22
  • 0.2.1
    record
    2022-03-17 · diff ↗
  • 0.2.0
    record
    2022-03-09 · diff ↗ ·
    added 26 exports
    C5_rules, autoplot, bag_mars, bag_tree, bart, bartMachine_interval_calc, check_model_doesnt_exist, check_model_exists, cubist_rules, dbart_predict_calc, discrim_flexible, discrim_linear, discrim_quad, discrim_regularized, extract_parameter_dials, extract_parameter_set_dials, keras_predict_classes, knit_engine_docs, list_md_problems, naive_Bayes, pls, poisson_reg, rule_fit, set_tf_seed, tune, update_model_info_file
  • 0.1.7
    record
    2021-07-21 · diff ↗ ·
    added 13 exports
    .check_glmnet_penalty_fit, .check_glmnet_penalty_predict, .convert_form_to_xy_fit, .convert_form_to_xy_new, .convert_xy_to_form_fit, .convert_xy_to_form_new, .organize_glmnet_pred, extract_fit_engine, extract_spec_parsnip, find_engine_files, gen_additive_mod, make_engine_list, make_seealso_list
  • 0.1.6
    record
    2021-05-27 · diff ↗ ·
    added 11 exports
    predict_hazard.model_fit, predict_linear_pred, predict_linear_pred.model_fit, predict_survival, predict_survival.model_fit, predict_time, predict_time.model_fit, proportional_hazards, required_pkgs, survival_reg, svm_linear
  • R
    R 4.1.0 released · 2021-05-18
  • 0.1.5
    record
    2021-01-19 · diff ↗ ·
    added 3 exports
    augment, parsnip_addin, stan_conf_int
  • 0.1.4
    record
    2020-10-27 · diff ↗ ·
    added 7 exports
    make_call, maybe_data_frame, maybe_matrix, min_cols, min_rows, prepare_data, show_engines
  • 0.1.3
    record
    2020-08-04 · diff ↗ ·
    added 2 exports
    glance, update_engine_parameters
  • 0.1.2
    record
    2020-07-03 · diff ↗ ·
    removed 1 export
    convert_args
    added 5 exports
    contr_one_hot, get_encoding, repair_call, req_pkgs, set_encoding
  • 0.1.1
    record
    2020-05-06 · diff ↗ ·
    removed 1 export
    tidy.model_fit
    added 2 exports
    predict_raw, tidy
  • R
    R 4.0.0 released · 2020-04-24
  • 0.1.0
    record
    2020-04-09 · diff ↗ ·
    added 11 exports
    convert_args, convert_stan_interval, eval_args, predict_class.model_fit, predict_classprob.model_fit, predict_confint.model_fit, predict_numeric, predict_numeric.model_fit, predict_quantile.model_fit, predict_raw.model_fit, translate.default
  • 0.0.5
    record
    2020-01-07 · diff ↗ ·
    added 7 exports
    check_final_param, is_varying, new_model_spec, null_value, show_fit, update_dot_check, update_main_parameters
  • 0.0.4
    record
    2019-11-02 · diff ↗ ·
    removed 7 exports
    min_grid, min_grid.boost_tree, min_grid.linear_reg, min_grid.logistic_reg, min_grid.mars, min_grid.multinom_reg, min_grid.nearest_neighbor
    added 1 export
    control_parsnip
  • 0.0.3.1
    record
    2019-08-06 · diff ↗
  • 0.0.3
    record
    2019-07-31 · diff ↗ ·
    added 26 exports
    add_rowindex, get_dependency, get_fit, get_from_env, get_model_env, get_pred_type, has_multi_predict, min_grid, min_grid.boost_tree, min_grid.linear_reg, min_grid.logistic_reg, min_grid.mars, min_grid.multinom_reg, min_grid.nearest_neighbor, multi_predict_args, pred_value_template, set_dependency, set_env_val, set_fit, set_in_env, set_model_arg, set_model_engine, set_model_mode, set_new_model, set_pred, show_model_info
  • R
    R 3.6.0 released · 2019-04-26
  • 0.0.2
    record
    2019-03-22 · diff ↗ ·
    removed 17 exports
    predict_class, predict_class.model_fit, predict_classprob, predict_classprob.model_fit, predict_confint, predict_confint.model_fit, predict_numeric, predict_numeric.model_fit, predict_predint, predict_predint.model_fit, predict_quantile, predict_quantile.model_fit, predict_raw, predict_raw.model_fit, varying_args.model_spec, varying_args.recipe, varying_args.step
    added 3 exports
    null_model, nullmodel, tidy.model_fit
  • 0.0.1
    record
    2018-11-12
  • R
    R 3.5.0 released · 2018-04-23

Package metadata

First published
2018-11-12
Total releases
34 / 8 yrs
License
MIT + file LICENSE OSI · relicensed from GPL-2 in 0.1.6
Minimum R
≥ 4.1
Bundled data
3.6 KB / 1 file
Download size
864 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("parsnip")
Kuhn, M., Posit Software, PBC, Hvitfeldt, E., & Vaughan, D. (2026). parsnip: A Common API to Modeling and Analysis Functions (Version 1.6.1) [Computer software]. https://doi.org/10.32614/CRAN.package.parsnip

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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for parsnip version 1.6.1 [Data set]. HJJB, LLC. Data release v2026-10-17. https://doi.org/10.5281/zenodo.21843040

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