rep_sample_n: Repeating Sampling from a Tibble

Description Usage Arguments Value Examples

View source: R/rep_sample_n.R

Description

Repeating Sampling from a Tibble

Usage

1
rep_sample_n(tbl, size, replace = FALSE, reps = 1)

Arguments

tbl

tbl of data.

size

The number of rows to select.

replace

Sample with or without replacement?

reps

The number of samples to collect.

Value

A tbl_df that aggregates all created samples, with the addition of a replicate column that the tbl_df is also grouped by

Examples

1
2
data(nc)
rep_sample_n(nc, size=10, replace=FALSE, reps=1)

StatsWithR/statsr documentation built on Jan. 24, 2021, 10:12 a.m.