title: How to add Benjamini-Hochberge corrected p value to boxplots, not the default 'holm'-corrected p value in R?
body: <p>I plan to compare four groups of dataset using Kruskal Wallis test, do pairwise comparison and then using Benjamin-Hochberg to correct the p value. I have used <code>stat_compare_mean()</code> to show the global p value successfully, however, the p value resulted from pairwise comparison needed to be corrected using BH in my study whereas all the <code>p.adj</code> value in R seems to be 'holm'-corrected p value, according to this website (<a href="http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/76-add-p-values-and-significance-levels-to-ggplots/" rel="nofollow noreferrer">http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/76-add-p-values-and-significance-levels-to-ggplots/</a>). </p>
  
  <p>I've tried stat_compare_means(comparisons = comparisons, aes(label = ..p.adj.. ), method = "wilcox.test", p.adjust.method = "BH"). </p>
  
  <p>Here are my full codes:</p>
  
  <pre class="lang-r prettyprint-override"><code>comparisons &lt;- lapply(as.data.frame(combn(Treatment, m =2 , simplify = TRUE)), function(pair) {
    as.character(pair)
  }) 
  
  for (metabolite in metabolites) {
    metabolite_dat_during &lt;- setNames(subset(dat_P_BI_QUANT_during, select = c(metabolite, "Treatment")), nm = c("metabolite", "Treatment"))
  
    gg_during &lt;- ggboxplot(metabolite_dat_during, x = "Treatment", y = "metabolite",title = metabolite, color = "Treatment", palette = "jco",
                           add = c("median_iqr", "jitter")) +
      stat_compare_means(comparisons = comparisons, aes(label = ..p.adj.. ), method = "wilcox.test", p.adjust.method = "BH")+ 
      stat_compare_means(label.y=0.0001) + 
      scale_y_continuous(name = "conc(mmol/L)")
    ggsave(filename = paste0(save_dir, "metabolite-", metabolite, ".png"), plot = gg_during)
  
  }
  </code></pre>
  
  <p>I expected to the p value can be corrected using BH using my above code. However, p values seem not to be corrected, even not using 'holm' as the p values are the same as the uncorrected p value. Beside, I also encounter some errors:</p>
  
  <blockquote>
    <p>In wilcox.test.default(c(0.07, 0.07, 0.06, 0.08, 0.06,  ... : cannot compute exact p-value with ties.</p>
  </blockquote>