powered by
SampleOne() is a fast alternative to sample() that avoids some checks.
SampleOne()
sample()
SampleOne(x, len = length(x))
A vector to sample.
(Optional) Integer specifying length of x.
x
SampleOne() returns a length one vector, randomly sampled from x.
# NOT RUN { SampleOne(9:10) SampleOne(letters[1:4]) # }
Run the code above in your browser using DataLab