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) )