data(mtcars)
model <- lm(mpg ~ wt * factor(cyl), data = mtcars)
if (require("emmeans", quietly = TRUE)) {
emm <- emmeans(model, "cyl")
get_parameters(emm)
emm <- emmeans(model, pairwise ~ cyl)
get_parameters(emm)
}
Run the code above in your browser using DataLab