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.
Examples
x <- rnorm(200)
mean_sd(x)
#> y ymin ymax
#> 1 0.005611582 -0.9817063 0.9929295