R/Misc_tools.R
quick_sample.Rd
Quick optimized equivalent to sample(x,size,replace=TRUE)
quick_sample(x, size)
a vector
number of elements to sample
sample of size "size" taken from x
quick_sample(1:20,5) #> [1] 13 20 7 10 20