draw_samples: Generates samples of different sizes

Description Usage Arguments Value Examples

View source: R/draw_samples.R

Description

This function draws samples of various sizes from a population.

Usage

1
draw_samples(pop, reps, sample_size)

Arguments

pop

the virtual population as a tibble

reps

the number of replication for each sample size as an integer value

sample_size

the sample size for each one of the samples as an array

Value

a tibble containing the sample numbers and sample values tibble columns are replicate, string from pop, size and rep_size rep_size will contain repeated number of reps, used for plotting in other functions

Examples

1
2
pop <- generate_virtual_pop(100, "Variable", rnorm, 0, 1)
samples <- draw_samples(pop, 3, c(1, 10))

tguo9/samplingsimulatorr documentation built on May 5, 2020, 12:10 a.m.