errorbars: (Deprecated) Make ggplot error bars and mean with a single...

View source: R/ggplot_functions.R

errorbarsR Documentation

(Deprecated) Make ggplot error bars and mean with a single function

Description

Deprecated! Use stat_errorbar instead!
Often, automatically bootstrapped error bars in ggplot2 are accompanied by a dot indicating the mean of the errorbars. Generally, this is done with two calls of stat_summary, one for the bars and one for the dot. This function is just a shortcut that will add both.

Usage

errorbars(gg_obj, ...)

Arguments

gg_obj

The ggplot object (i.e., what is built up from ggplot(...)). If errorbars() does not immediately follow ggplot(...), use %+% instead of + to add the intervening ggplot layers until the ggplot object is piped into the function.

...

Additional arguments for the stat_summary pair.

Examples

## Not run: 
ggplot(df, aes(x = x, y = y)) %+%
   geom_point() %>%
   errorbars() +
   xlab("WHAAAT")

## End(Not run)

burchill/zplyr documentation built on Feb. 2, 2023, 11:01 a.m.