I am trying to colour or label the outliers (in red) of the following plot with the corresponding column "protein", but the output says that "protein" is an unknown object.
Thank you in advance for your kind help!
DF$conc_sig_lip<-as.factor(DF$conc_sig_lip)
p<- ggplot(DF,aes(x=conc_sig_lip, y=nbi))+
geom_boxplot(outlier.colour= "red")+
stat_summary(fun.y = mean, geom="point")+
scale_y_log10()
this is the code that doesn't work:
DF$conc_sig_lip<-as.factor(DF$conc_sig_lip)
p<- ggplot(DF,aes(x=conc_sig_lip, y=nbi))+
geom_boxplot(outlier.colour= protein)+
stat_summary(fun.y = mean, geom="point")+
scale_y_log10()