a positive number, the number of items to choose from. See
‘Details.’
size
a non-negative integer giving the number of items to choose.
replace
should sampling be with replacement?
prob
a vector of probability weights for obtaining the elements
of the vector being sampled.
useHash
logical indicating if the hash-version of
the algorithm should be used. Can only be used for replace =
FALSE, prob = NULL, and size <= n/2, and really
should be used for large n, as useHash=FALSE will use
memory proportional to n.