ggemmeans: ggemmeans

ggemmeansR Documentation

ggemmeans

Description

ggplot of estimated marginal means object, with categorical spec variable sorted by estimate

Usage

ggemmeans(em, by = NULL, reorder = T)

Arguments

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

Details

This function is similar to the emmeans plot function, except that it sorts the levels of a categorical variable by the estimated mean

Value

a ggplot object

Examples

## 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)

grasshoppermouse/hagenutils documentation built on Dec. 6, 2024, 8:31 p.m.