Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recipe() error message with missing data argument #1042

Closed
simonpcouch opened this issue Sep 30, 2022 · 1 comment · Fixed by #1068
Closed

recipe() error message with missing data argument #1042

simonpcouch opened this issue Sep 30, 2022 · 1 comment · Fixed by #1068
Labels
upkeep maintenance, infrastructure, and similar

Comments

@simonpcouch
Copy link
Contributor

recipes:::recipe.formula called without a data argument gives a base missing argument error from an internal function:

library(tidymodels)

recipe(mpg ~ .)
#> Error in form2args(formula, data, ...): argument "data" is missing, with no default

Called by itself, this is interpretable enough, though it took me a few moments to diagnose when situated amongst other tidymodels code, which could feasibly also be passing formulas around:

tune_bayes(
  linear_reg(engine = "glmnet", penalty = tune(), mixture = tune()),
  recipe(mpg ~ .) %>% step_ns(hp, deg_free = tune()),
  bootstraps(mtcars, 2)
)
#> Error in form2args(formula, data, ...): argument "data" is missing, with no default

Created on 2022-09-30 by the reprex package (v2.0.1)

@EmilHvitfeldt EmilHvitfeldt added the upkeep maintenance, infrastructure, and similar label Oct 4, 2022
@github-actions
Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
upkeep maintenance, infrastructure, and similar
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants