compare_means: Compare the means of two groups using a t-test

Description Usage Arguments Value

Description

Compare the means of two groups using a t-test

Usage

1
compare_means(column_names, by, data, digits = 4L)

Arguments

column_names

Column names of variables

by

Name of a grouping variable with exactly two levels

data

Data frame containing variables 'column_names' and 'by'

digits

Number of decimal digits in 'pval' column

Value

A data frame with columns "variable", "by", "pval", "pvalue". The "variable" column contains the name of the variables whose means were compared between the two levels of the 'by' variable whose name is contained in the "by" column. The "pval" column contains the p-value resulting from the comparison using a t-test, rounded to 'digits' decimal digits for better readability. The "pvalue" column contains the exact p-value.


cbaumbach/manyregs documentation built on May 13, 2019, 1:48 p.m.