workflows
workflows copied to clipboard
(Re)export `fit()`
I was expecting to be able to fit a workflow with loading only {workflows} but while the fit.workflow() method is exported, the generic is not.
library(workflows)
library(magrittr)
workflow() %>%
add_formula(mpg ~ cyl + disp + hp) %>%
add_model(linear_reg(penalty = 0.1, engine = "glmnet"), formula = mpg ~ .) %>%
fit(data = mtcars)
#> Error in fit(., data = mtcars): could not find function "fit"
Created on 2023-12-01 with reprex v2.0.2