I just need a function that operates a custom model with me with one free variable.
model <- function(x){
lmer(paste("cyl ~", x, "+ (1|disp)"), data = .)
}
And after that, I want to use this in dplyr's do():
mtcars %>%
do(x = model("hp"))
How should I approach this problem?