Description Usage Arguments Value
Compare the means of two groups using a t-test
1 | compare_means(column_names, by, data, digits = 4L)
|
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 |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.