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.



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.


1.0-1 by Kirill Müller, 2 years ago


Report a bug at https://github.com/krlmlr/wrswoR/issues

Browse source code at https://github.com/cran/wrswoR

Authors: Kirill Müller [aut, cre]

Documentation:   PDF Manual  

GPL-3 license

Imports Rcpp, logging

Suggests wrswoR.benchmark, import, kimisc, testthat, roxygen2, knitr, rmarkdown, rticles, knitcitations, metap, tidyr, microbenchmark, sampling, BatchExperiments, dplyr, ggplot2, tikzDevice

Linking to Rcpp

Imported by rakeR.

See at CRAN