View source: R/Paired_T_test.R
| test.tpaired | R Documentation |
Performs a paired t-test between two numeric vectors (e.g., before vs after) or between two numeric columns of a data frame. Includes four visualization styles (boxplot, violin, mono, and half-eye).
test.tpaired(
...,
title = "Paired t-test",
xlab = "",
ylab = "Value",
style = c("boxplot", "violin", "mono", "halfeye"),
connect = TRUE,
help = FALSE,
verbose = TRUE
)
... |
Two numeric vectors of equal length, or a data frame with exactly two numeric columns. |
title |
Plot title. |
xlab |
X-axis label. |
ylab |
Y-axis label. |
style |
Plot style:
|
connect |
Logical. If TRUE, connects paired observations. |
help |
If TRUE, displays detailed help. |
verbose |
If TRUE, prints progress messages. |
An invisible list containing:
Group means and standard deviations
t-test result object (stats::t.test)
Data frame used for plotting
ggplot2 object
before <- c(13, 12, 15, 14)
after <- c(9, 11, 10, 10)
test.tpaired(before, after)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.