sample_all: A wrapper of sample

Description Usage Arguments Value Examples

Description

If replace = TRUE and all = TRUE, sampling length(x) of items without replacement first, then sampling with replacement

Usage

1
sample_all(x, size, replace = TRUE, prob = NULL, all = TRUE)

Arguments

x

Either a vector of one or more elements from which to choose, or a positive integer

size

a non-negative integer giving the number of items to choose

replace

Should sampling be with replacement?

prob

A vector of probability for obtaining the elements of the vector being sampled

all

If replace = TRUE and all = TRUE, sampling length(x) of items without replacement first, then sampling with replacement

Value

For sample a vector of length size with elements drawn from either x or from the integers 1:x.

Examples

1
sample_all(1:5, 6)

fountainer/fountainr documentation built on May 16, 2019, 1:51 p.m.