test.anova: ANOVA test with automated assumption checking

View source: R/ANOVA_test.R

test.anovaR Documentation

ANOVA test with automated assumption checking

Description

Performs ANOVA (and Tukey HSD) if data meet normality and homogeneity assumptions. Otherwise, automatically recommends Kruskal-Wallis/Dunn.

Usage

test.anova(
  ...,
  title = "ANOVA/Tukey HSD",
  xlab = "Group",
  ylab = "Value",
  style = c("boxplot", "violin", "mono", "halfeye"),
  help = FALSE,
  verbose = TRUE
)

Arguments

...

Vectors or a data.frame with >= 2 columns.

title

Plot title.

xlab

X-axis label.

ylab

Y-axis label.

style

Aesthetic style of the generated plot.

help

If TRUE, shows help.

verbose

If TRUE, shows detailed messages.

Value

An aov object or a recommendation message.

Examples

df <- data.frame(
  control = rnorm(30, 10),
  treatment = rnorm(30, 12),
  test = rnorm(30, 11)
)
test.anova(df)

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