meanci: meanci

Description Usage Arguments Examples

View source: R/meanci.R

Description

Calculate n, mean and upper/lower confidence intervals for one or more variables, while grouping by one or more variables

Usage

1
meanci(dataset, group_by_vars, ...)

Arguments

dataset

The dataset to use

group_by_vars

The grouping variable(s) to use, given as a character vector

...

The variable(s) to calculate means and CIs for

Examples

1
2
3
4
5
# Calculate mean and CI for `disp`, grouping by `cyl`, using mtcars data
mtcars %>% meanci(group_by_vars = c('cyl'), hp)

# Calculate mean and CI for `hp`, grouping by `cyl` and `gear`, using mtcars data
mtcars %>% meanci(group_by_vars = c('cyl', 'gear'), hp)

tylerburleigh/tyleR documentation built on Nov. 5, 2019, 11:02 a.m.