diff --git a/boxplot_stat_function.R b/boxplot_stat_function.R index 8233c44..91d251d 100644 --- a/boxplot_stat_function.R +++ b/boxplot_stat_function.R @@ -45,14 +45,14 @@ doMyPlots <- function(df) { group_by(timepoint, mediator) %>% wilcox_test(value ~ obesity, paired = F) %>% add_significance("p") - stat_df + stat_df$p_format = round(stat_df$p, digits = 3) stat_df <- stat_df %>% add_xy_position(x = "timepoint", dodge = 0.8) cat("printing p") p2 = p + stat_pvalue_manual(stat_df #, y.position = max_y - , label = "{p} {p.signif}" + , label = "{p_format} {p.signif}" , hide.ns = T , tip.length = 0)+ scale_y_continuous(expand = expansion(mult = c(0.05, 0.25)))