library(tidyverse)
library(ggpubr)
p <- ggboxplot(airquality,
x = "Month",
y = "Ozone",
color = "Month",
add = "jitter",
shape = "Month")
my_comparisons <- list( c("5", "6"),c("7","8"))
p + stat_compare_means(comparisons = my_comparisons)+ # Add pairwise comparisons p-value
stat_compare_means(label.y = 50)
kruskal.test(Ozone ~ Month, data = airquality)
https://rpkgs.datanovia.com/ggpubr/