Weighted Random Sampling without Replacement

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.

library(devtools)
install_github("krlmlr/wrswoR")

News

Version 1.0-1 (2016-02-26)

  • Finally submitted version of the paper.

Version 1.0 (2016-02-22)

First CRAN release.

  • Alternative implementations for weighted random sampling, as implemented by R's 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++
    • Two more experimental functions.
  • Article for submission to JStatSoft as vignette.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.