workflows icon indicating copy to clipboard operation
workflows copied to clipboard

(Re)export `fit()`

Open hfrick opened this issue 2 years ago • 0 comments

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

hfrick avatar Dec 01 '23 19:12 hfrick