summarise_posterior | R Documentation |
Shortcut for summarize variable with quantiles and mean
summarise_posterior(data, var, ...)
data |
tidy data frame |
var |
variable name (unquoted) to be summarised |
... |
other expressions to pass to summarise |
Notation: pX
refers to the X
% quantile
data.frame
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.