| tidypredict_fit {tidypredict} | R Documentation |
It parses a model or uses an already parsed model to return a Tidy Eval formula that can then be used inside a dplyr command.
tidypredict_fit(model)
model |
An R model or a tibble with a parsed model. It currently supports lm(), glm() and randomForest() models. |
library(dplyr)
df <- mutate(mtcars, cyl = paste0("cyl", cyl))
model <- lm(mpg ~ wt + cyl * disp, offset = am, data = df)
tidypredict_fit(model)