Adding table to ggplot with facets
Reproducible code: x = sample(1:12,100,replace=TRUE) y = rnorm(100) z = sample(c('Sample A','Sample B'),100,replace=TRUE) d = data.frame(x,y,z) ggplot(data=d, aes(factor(x),y)) + geom_boxplot() + stat_summary(fun.y=mean, geom="line", aes(group=1), color ='red') + stat_summary(fun.y=mean, geom="point", color='red') + xlab('Months') + ylab('Metric') + facet_wrap(~z) I want to add a table at the end of this chart that displays the summary statistics- mean, median, quartiles and number of records for each month on the x-axis. I am not sure how this is possible for a facet layout. This is a