| test_t | R Documentation |
Performs Student's t-test to compare the means of two independent groups, with automatic checks for normality and homogeneity of variances. If the assumptions are violated, the Mann-Whitney U test is applied automatically, without generating a plot.
test_t(
...,
title = TRUE,
title_text = "t-test",
xlab = "Group",
ylab = "Value",
style = c("boxplot", "violin", "mono", "halfeye"),
colors = NULL,
help = FALSE,
verbose = TRUE
)
... |
Two numeric vectors or a data frame containing exactly two columns. |
title |
Logical. If |
title_text |
Character string specifying the plot title.
Default: |
xlab |
Character string specifying the x-axis label.
Default: |
ylab |
Character string specifying the y-axis label.
Default: |
style |
Character string specifying the plot style generated by the
function. One of |
colors |
Optional character vector specifying the box colors. |
help |
Logical. If |
verbose |
Logical. If |
An object of class test_t containing the following components:
summary: Summary statistics, including group means,
standard deviations (SD), and group information.
result: Test results, including the test statistic,
degrees of freedom (DF), and p-value.
method: The statistical method selected for the analysis.
normality: Results of the normality assessment.
homogeneity: Results of the homogeneity of variances assessment.
plot: Plot parameters and related information.
set.seed(123)
df <- data.frame(
control = rnorm(30, mean = 10),
treatment = rnorm(30, mean = 15)
)
test_t(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.