resample differs from the S/R sample function in
resample always considers x to be a vector of elements
to select from, while sample treats a vector of length one as a
special case and samples from 1:x. Otherwise, the functions
have identical behavior.
## Sample behavior differs if first argument is scalar vs vectorsample(c(10))
sample(c(10, 10))
## Resample has the consistent behavior for both casesresample(c(10))
resample(c(10, 10))