How to add line for connecting the means of first quantile and fifth quantile in ggboxplot
ggboxplot(testdf, x = "N4_levels", y = "C8",
add = "jitter",
order = c("0", "0.25", "0.5", "0.75", "1"),
ylab = "C8 Expres ", xlab = "N4 Expres", bxp.errorbar=TRUE, notch=TRUE)+
stat_summary(fun=mean, colour="red", shape = 16, size=0.7)
And I was trying to add the following piece of code for adding Line conneting of means of each Quantile, but this is connecting all the means of Quantiles but that's not what I want; the Just first and Fifth Quantile (picture attached).
stat_summary(fun=mean, colour="red", geom="line", lty="dotdash", lwd =1, aes(group=1))