Conduct one-way ANOVA, Welch ANOVA, or Kruskal-Wallis test with automatic assumption checks, publication-ready visualization, and optional post-hoc comparisons. Designed for comparing two or more independent groups.
quick_anova(
data,
group,
value,
method = c("auto", "anova", "welch", "kruskal"),
post_hoc = c("auto", "none", "tukey", "welch", "wilcox"),
conf.level = 0.95,
plot_type = c("boxplot", "violin", "both"),
add_jitter = TRUE,
point_size = 2,
point_alpha = 0.6,
show_p_value = TRUE,
p_label = c("p.format", "p.signif"),
palette = "qual_vivid",
verbose = TRUE,
...
)An object of class quick_anova_result with elements:
ggplot object of the comparison
List describing the main test
Post-hoc comparison table (if requested)
Character. "anova", "welch", or "kruskal"
Summary statistics by group
Results of normality/variance checks
Details explaining automatic selections
POSIXct timestamp of the analysis
A data frame containing the variables.
Column name for the grouping factor. Supports quoted or unquoted names via tidy evaluation.
Column name for the numeric response variable.
Character. One of "auto" (default), "anova", "welch", or "kruskal". When "auto", the function inspects normality and homogeneity of variances to pick an appropriate test.
Character. Post-hoc procedure: "auto" (default), "none", "tukey", "welch", or "wilcox". "auto" selects Tukey for ANOVA, Welch-style pairwise t-tests for Welch ANOVA, and pairwise Wilcoxon tests for Kruskal-Wallis.
Numeric. Confidence level for the test/intervals. Default is 0.95.
Character. One of "boxplot", "violin", or "both".
Logical. Add jittered points? Default TRUE.
Numeric. Size of jitter points. Default 2.
Numeric. Transparency for jitter points (0-1). Default 0.6.
Logical. Show omnibus p-value on the plot? Default TRUE.
Character. P-value display: "p.format" (default) or "p.signif" (stars).
Character. Palette name from evanverse, or NULL for defaults.
Logical. Print informative messages? Default TRUE.
Reserved for future extensions.
set.seed(123)
df <- data.frame(
group = rep(LETTERS[1:3], each = 40),
value = rnorm(120, mean = rep(c(0, 0.5, 1.2), each = 40), sd = 1)
)
res <- quick_anova(df, group, value)
res$plot
summary(res)
Run the code above in your browser using DataLab