View source: R/ggplot2_summaries.R
mean_sd | R Documentation |
Compute mean and standard deviation for a given vector. Can be used as
fun.data
in ggplot2's stat_summary
. This comes
in very handy for plotting means and standard deviations as no further
arguments must be submitted.
mean_sd(x)
x |
A numeric vector. |
A tibble with columns ymin
, mean
, and ymax
.
x <- rnorm(200)
mean_sd(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.