powered by
arma_sample takes a sample of the specified size from the elements of x using either with or without replacement.
arma_sample
x
arma_sample(x, size, replace)
a vector of elements from which to choose.
a non-negative integer giving the number of items to choose.
should sampling be with replacement.
A vector of length size with elements drawn from x.
size
# NOT RUN { x <- 1:12 size <- 5 arma_sample(x, size, replace = TRUE) # }
Run the code above in your browser using DataLab