Sample values from a set of elements.
sample(), this function also works as
expected when there is only one element in the set to be sampled, cf. .
This function originates from the example code of
as of R v2.12.0.
Additional arguments passed to
Returns a sampled
vector of the same data types as argument
 Henrik Bengtsson,
Using sample() to sample one value from a single value?,
R-devel mailing list, 2010-11-03.
sample.int() is used.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.