nice_diff_means: Difference in means

View source: R/nice_diff_means.R

nice_diff_meansR Documentation

Difference in means

Description

Calculates a difference in means between two groups

Usage

nice_diff_means(data, var, by)

Arguments

data

A data frame

var

A numeric variable containing the data for the calculation of the means

by

A grouping variable with only two values

Value

A numeric value for the difference in means

Examples

data(sleep)
sleep$group <- as.numeric(sleep$group)
nice_diff_means(data = sleep, var = "extra", by = "group")

simonthelwall/nicethings documentation built on Feb. 27, 2023, 3:15 p.m.