Dear Javier,

Thanks for your questions.

  1. You can move the label up or down by editing `label.y = max(dat[, i], na.rm = TRUE)`. At the moment, the label will be placed at the maximum value.
  2. To not print the post hoc comparisons, remove this line of code `+ stat_compare_means(comparisons = my_comparisons, method = method2, label = “p.format”) # remove if p-value of ANOVA or Kruskal-Wallis test >= alpha`.

Hope this helps.

Best,

Antoine

PhD student and teaching assistant in statistics at UCLouvain (Belgium). Interested in statistics and R, author of statsandr.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store