powered by
A version of sample() which does not treat positive scalar integer x differently. See example.
sample()
x
shuffle(x, n = length(x), ...)
(vector()) Vector to sample elements from.
vector()
(integer()) Number of elements to sample.
integer()
(any) Arguments passed down to base::sample.int().
any
base::sample.int()
x = 2:3 sample(x) shuffle(x) x = 3 sample(x) shuffle(x)
Run the code above in your browser using DataLab