I am trying to perform a linear regression fit using tidymodels
,parsnip
but encounters the following error:
Error: No tidy method for objects of class function
routine:
library(tidymodels)
library(parsnip)
library(broom.mixed)
linear_reg() %>%
set_engine("lm") %>%
fit(formula = cnt ~ temp_raw, data = bikeshare)
fit %>% tidy()
fit %>% glance()
Having read this post Tidy function gives this error: No tidy method for objects of class lmerMod. It will not work on my computer, but works in pdf with same code
and I tried broom.mixed
but still the error persists.