geom_barmean | R Documentation |
Plots a summary Barplot of the averaged group values. Optionally can add error bars (SEM) and jittered data points. Does not have full functionality of 'geom_bar()', e.g., cannot pass additional aes() elements or arguments.
geom_barmean(se = TRUE, points = F, barfill = "steelblue")
se |
add SEM bars (TRUE/FALSE) |
points |
add jittered points (uses 'ggbeeswarm::geom_quasirandom()') (TRUE/FALSE) |
barfill |
color for bar fill (as a string, default = "steelblue") |
a ggplot object
library(ggplot2)
p <- ggplot(mtcars, aes(factor(cyl), disp))
p + geom_barmean()
p + geom_barmean(points = T)
p + geom_barmean(points = T, barfill = "purple")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.