My aim is to make boxplot with stats between different groups using ggpubr. I use the following code to make the boxplot, but I am not sure how can I include stats for comapirsions between for ex, Control Major against Stress Major or Major against Minor under Control.
intensity<-read.table("light_intensity.txt",header = TRUE)
ggboxplot(intensity, x = "Treatment", y = "Intensity",
color = "Allele", palette = "jco")
From this previous question, I know that adding
stat_compare_means(comparisons = my_comparisons)
could solve my problem. But how to design the my_comparison for my specific dataset?
My dataset look like,
Allele Intensity Treatment
Minor 6723.05258 Control
Minor 7022.128191 Control
Minor 6617.97381 Control
.
.
.
Major 5743.119742 STRESS
Major 5379.326667 STRESS
Major 7256.877569 STRESS
Major 5588.727273 STRESS