Dear FJCC,
Thank you for your reply, I really like the idea!
I applied it to my code, but unfortunately it doesn't work.
my_comperisons<-list(c("0","1"),c("1","2"),c("0","2"))
snp_rs9303277<-as.factor(age16_RV_SNP_Rawdata$rs9303277_C)
levels(snp_rs9303277)<-c("TT","CT","CC")
p1<ggplot(aes(x=as.factor(rs9303277_C),y=IFN_beta_RV1B),data=age16_RV_SNP_Rawdata)+theme(axis.text.y=element_text(size = 12),axis.text.x = element_text(size = 12),axis.title = element_text(size = 16))+geom_boxplot(outlier.size = -1)+xlab("rs9303277_C")+ylab("pg/ml")+ ggtitle("RV1B IFN-beta age16")+
scale_x_discrete(labels=c("0" = "TT", "1" = "CT", "2" = "CC"))
A1<-p1+stat_compare_means(comparisons = my_comperisons,lebel.y = c(22, 25, 35))+
geom_jitter(position = position_jitter(0.15),aes(color=snp_rs9303277))
A1
It doesn't give me an error message either. I'm sorry but I don't know how to use reprex packed to make my codes sharable.
Thank you for your time and I will keep trying to sort it out.
Kind Regards,
Eteri