Learn R Programming

hidetify (version 0.0.1)

arma_sample: Arma Samples and Permutations

Description

arma_sample takes a sample of the specified size from the elements of x using either with or without replacement.

Usage

arma_sample(x, size, replace)

Arguments

x

a vector of elements from which to choose.

size

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

replace

should sampling be with replacement.

Value

A vector of length size with elements drawn from x.

Examples

Run this code
# NOT RUN {
x <- 1:12
size <- 5
arma_sample(x, size, replace = TRUE)
# }

Run the code above in your browser using DataLab