vgrabovets
10/7/2016 - 1:29 PM

show number of observation on boxplot

show number of observation on boxplot

give.n <- function(x){
     return(c(y = mean(x, na.rm = TRUE), label = length(x)))
}

boxpl = function(){
     geom_boxplot() +
          stat_summary(fun.data = give.n, geom = "text")
}