geom_barmean: Summary bar plot (with optional error bar, overlying points)

View source: R/geom_barmean.R

geom_barmeanR Documentation

Summary bar plot (with optional error bar, overlying points)

Description

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.

Usage

geom_barmean(se = TRUE, points = F, barfill = "steelblue")

Arguments

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

Value

a ggplot object

Examples

library(ggplot2)
p <- ggplot(mtcars, aes(factor(cyl), disp))
p +  geom_barmean()
p +  geom_barmean(points = T)
p +  geom_barmean(points = T, barfill = "purple") 

JMLuther/tabletools documentation built on July 1, 2024, 2:01 p.m.