ggemmeans | R Documentation |
ggplot of estimated marginal means object, with categorical spec variable sorted by estimate
ggemmeans(em, by = NULL, reorder = T)
em |
An emmeans object |
by |
String indicating "by" term (conditioning variable) |
reorder |
If TRUE (default), reorder levels of a categorical predictor by values of the estimate |
This function is similar to the emmeans plot function, except that it sorts the levels of a categorical variable by the estimated mean
a ggplot object
## Not run:
if(interactive()){
data(starwars, package='dplyr')
m <- lm(height ~ eye_color, starwars)
em <- emmeans(m, specs = 'eye_color')
ggemmeans(em)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.