summarise_posterior: Shortcut for summarize variable with quantiles and mean

Description Usage Arguments Details Value Examples

View source: R/tidy_shortcuts.R

Description

Shortcut for summarize variable with quantiles and mean

Usage

1

Arguments

data

tidy data frame

var

variable name (unquoted) to be summarised

...

other expressions to pass to summarise

Details

Notation: pX refers to the X% quantile

Value

data.frame

Examples

1
2
3
4
5
6
7
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))

jsilve24/driver documentation built on Jan. 30, 2022, 12:07 p.m.