[Rd] uniform sampling without replacement algorithm

Pavel S. Ruzankin ruzankin at math.nsc.ru
Wed Oct 18 16:54:54 CEST 2017


The binary tree algorithm does not need additional scrambling. I have 
written the R code for the algorithm in the last answer at:
https://stackoverflow.com/questions/311703/algorithm-for-sampling-without-replacement/46807110#46807110

However, the algorithm will probably be outperformed by hash table 
algorithms for relatively large sample sizes.



More information about the R-devel mailing list