d <- data.frame("a"=sample(1:10, 50, TRUE),
"b"=rnorm(50))
# Summarize posterior for b over grouping of a and also calcuate
# minmum of b (in addition to normal statistics returned)
d <- dplyr::group_by(d, a)
summarise_posterior(d, b, mean.b = mean(b), min=min(b))
Run the code above in your browser using DataLab