如何添加异常值(将outliers_values.)
添加到每个方框图中。我尝试使用geom_text
但它不起作用!
outlier_values.<-lapply(mtcars[-c(8,9)], function(x){outlier_values <- boxplot.stats(x)$out})
mtcars_m = melt(mtcars[,-c(8,9)])
names(mtcars_m)=c("Models","CI")
box.plot<- ggplot(mtcars_m, aes(Models, CI,fill=Models)) + geom_boxplot(width = 0.1)+ facet_wrap(~ Models,scales = "free")+
guides(fill=FALSE)+labs(x="",y="")
install.packages("reshape2")
library(reshape2)
install.packages("plyr")
install.packages("ggplot2")
library(ggplot2)