reformulate(pred_cols, outcome_col)
> linear_reg() %>%
+ set_engine("gee") %>%
+ fit(reformulate(pred_cols, outcome_col), data = mtcars)
Error in `gee_formula()`:
! There should be a single 'id' column specified using the `id_vars()` function (e.g. `y ~ x + id_vars(id_col)`
Run `rlang::last_trace()` to see where the error occurred.
Or something like:
Or something like this: https://community.rstudio.com/t/extract-formula-from-recipes-recipe-object/2728/2
Might also be able to use something like formula(rec_obj) since formula is a generic and tidymodels seems to want to use that