calculate: Calculate summary statistic for multiple samples

Description Usage Arguments Value Examples

Description

Calculate summary statistic for multiple samples

Usage

1
calculate(x, column, stat = "mean")

Arguments

x

a tibble. Tibble containing all resampled observations. It must have a column called "sample_id"

column

a string. The name of the reponse column.

stat

a string. Specifies what type of summary statistic is to be calculated. For now, only mean is available.

Value

Tibble containing the summarized data, one row for each resampled group (n_samples specified in generate)

Examples

1
2
3
4
5
library(dplyr)
mtcars %>%
specify(response = "hp") %>%
generate(n_samples = 10,type = "bootstrap") %>%
calculate(column = "hp",stat="mean")

UBC-MDS/rfer documentation built on May 14, 2019, 11:02 p.m.