ci_df: Calculate mean with confidence intervals.

View source: R/ci_df.R

ci_dfR Documentation

Calculate mean with confidence intervals.

Description

Calculate mean with confidence intervals.

Usage

ci_df(.data, .summary_var, ..., ci = 0.95, groups_col = FALSE)

Arguments

.data

A data frame

.summary_var

Variable that is being summarized

...

Grouping variable(s)

ci

Confidence interval. Defaults to 0.95

groups_col

List grouping variable under column named 'group'. Defaults to FALSE.

Value

A data frame with variables mean, ci_low, ci_high, sd, n. If the data frame is grouped, grouping variable will also be listed.

See Also

smean.cl.normal which this function utilizes

Examples

ci_df(mtcars, mpg, cyl, gear)

sbw78/sbwtools documentation built on May 20, 2024, 9 a.m.