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)
recipes:::recipe.formulacalled without adataargument gives a base missing argument error from an internal function: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:
Created on 2022-09-30 by the reprex package (v2.0.1)