test.u: Mann-Whitney U Test

View source: R/U_test.R

test.uR Documentation

Mann-Whitney U Test

Description

Performs the Mann-Whitney (Wilcoxon rank-sum) test for comparing two independent groups, with statistical summary and graphical visualization.

Usage

test.u(
  ...,
  title = "Mann-Whitney Test",
  xlab = "Group",
  ylab = "Value",
  style = c("boxplot", "violin", "mono", "halfeye"),
  help = FALSE,
  verbose = TRUE
)

Arguments

...

Two numeric vectors or a data.frame with two numeric columns.

title

Plot title. Default: "Mann-Whitney Test".

xlab

Label for x-axis. Default: "Group".

ylab

Label for y-axis. Default: "Value".

style

Plot aesthetic style.

help

Logical. If TRUE, prints a detailed explanation. Default: FALSE.

verbose

Logical. If TRUE, prints detailed messages. Default: TRUE.

Value

Invisible list with:

summary

Group-wise statistical summary

test

Test result (htest object)

plot

ggplot2 visualization object

Examples

x <- c(1, 3, 5, 6)
y <- c(7, 8, 9, 12)
data <- data.frame(groupA = x, groupB = y)
test.u(data)

autotestR documentation built on April 29, 2026, 1:09 a.m.