I have a ggpubr boxplot and I want the middle line to be the mean and not the median, does anyone has an idea how to do it? What I have right now is the median as the line and the mean as a dot, I want to remove the median and add the mean as the line.
> head(my_data)
# A tibble: 6 x 3
SHM_level Batch_number Isotypes
<dbl> <dbl> <chr>
1 11 4 IgM
2 3 4 IgM
3 5 4 IgM
4 20 4 IgM
5 5 4 IgM
6 5 4 IgM
my code:
#perform test
compare_means(SHM_level ~ Isotypes, data = my_data, group.by = "Batch_number")
#plot
p1<- ggboxplot(my_data, x = "Batch_number", y = "SHM_level",
color = "Isotypes", palette = "jco", add = "mean")+ggtitle("DLN")+ylim(0,40)+
stat_compare_means(aes(group = Isotypes), label = "p.signif")+xlab("Batch number")+
ylab("SHM level")
Thanks!