tadaatoolbox (version 0.16.0)

mean_ci_t: Get mean and CI for a numeric vector

Description

Suitable for use within ggplot's ggplot2::stat_summary.

Usage

mean_ci_t(x, alpha = 0.05, na.rm = TRUE)

Arguments

x

A Numeric vector.

alpha

Alpha, default is 0.05.

na.rm

If TRUE (default), missing values are dropped.

Value

A data.frame with y (mean), ymin and ymax values.

Examples

Run this code
# 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