I want to add p values to a ggplot. They should have three 3 decimals and if p < 0.001 then it should display that ("p < 0.001"). And the "p" should be in italics. Somehow one has to do it with sprintf but how exactly?
library(ggplot2)
library(tidyverse)
library(ggpubr)
ggboxplot(ToothGrowth, x = "dose", y = "len")+
stat_compare_means(label = "p.format")
