'How to add significance markers (*) when comparing means and confidence interval in R
I need to compare the mean of each yeast with the reference(Rf) mean at a 90% confidence interval. I have plotted the graph below with the following code. The red crosses are the means.
ggplot(ANOVA_POST, aes(x=Yeasts, y=POF, fill=Yeasts)) +
geom_boxplot(alpha=0.1) +
stat_summary(fun=mean, geom="point", shape="+", size=6, color="red", fill="red") +
theme(legend.position="none") +
scale_fill_brewer(palette="Set1")

However, I was not able to place the "*" for the significance in the right places, as displayed. How could I do that, please?
I've tried also the steps from this post without success (Multiple comparisons with geom_signif function, R)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
