A collection of implementations of classical and novel algorithms for weighted sampling without replacement.
A package with different implementations of weighted random sampling without replacement in R.
First CRAN release.
sample.int(replace = FALSE, prob = ...)
sample_int_rej(): A rejective algorithm, in R
sample_int_rank(): One-pass sampling by Efraimidis and Spirakis, in R
sample_int_crank(): One-pass sampling by Efraimidis and Spirakis, in C++
sample_int_expj(): Reservoir sampling with exponential jumps Efraimidis and Spirakis, in C++