| test.t | R Documentation |
Performs Student's t-test to compare means between two independent groups, with automatic checks for normality and homogeneity of variances. If assumptions are violated, the Mann-Whitney test is automatically applied (without generating a plot).
test.t(
...,
title = TRUE,
title_text = "t-test",
xlab = "Group",
ylab = "Value",
style = c("boxplot", "violin", "mono", "halfeye"),
help = FALSE,
verbose = TRUE
)
... |
Two numeric vectors or a data frame with exactly two columns. |
title |
Logical. If true, return a plot entitled. |
title_text |
Plot title (string). Default: "t-test". |
xlab |
X-axis label in the plot (string). Default: "Group". |
ylab |
Y-axis label in the plot (string). Default: "Value". |
style |
Plot aesthetic generated by the function. |
help |
Logical. If TRUE, shows a detailed explanation of the function. Default: FALSE. |
verbose |
Logical. If TRUE, prints detailed messages. Default: TRUE. |
Invisible list with summary, test test_result, method and (optionally) plot.
set.seed(123)
df <- data.frame(
control = rnorm(30, 10),
treatment = rnorm(30, 15)
)
test.t(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.