mean_ci_t: Get mean and CI for a numeric vector

Description Usage Arguments Value Examples

View source: R/confint.R

Description

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

Usage

1
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

1
2
3
set.seed(42)
df <- data.frame(x = runif(100), y = sample(c("A", "B"), 100, TRUE))
mean_ci_t(df$x)

tadaatoolbox documentation built on July 2, 2020, 2:30 a.m.