This adds data_grid_ as a standard evalution version of the NSE function data_grid.
A use case for this is looping over different predictors in a model to calculate changes holding everything else constant:
mod <- lm(mpg ~ wt + cyl + vs, data = mtcars)
## currently
for (i in c("wt", "cyl", "vs")) {
data_grid_(mtcars, eval(quote(i)), .model = mod)
}
# with data_grid_
for (i in c("wt", "cyl", "vs")) {
data_grid_(mtcars, i, .model = mod)
}
This adds
data_grid_
as a standard evalution version of the NSE functiondata_grid
.A use case for this is looping over different predictors in a model to calculate changes holding everything else constant: