Suitable for use within ggplot's ggplot2::stat_summary.
mean_ci_t(x, alpha = 0.05, na.rm = TRUE)
A Numeric vector.
Alpha, default is 0.05.
0.05
If TRUE (default), missing values are dropped.
TRUE
A data.frame with y (mean), ymin and ymax values.
data.frame
# NOT RUN { set.seed(42) df <- data.frame(x = runif(100), y = sample(c("A", "B"), 100, TRUE)) mean_ci_t(df$x) # }
Run the code above in your browser using DataCamp Workspace