Weighted Random Sampling without Replacement

A collection of implementations of classical and novel algorithms for weighted sampling without replacement.

Travis CI status AppVeyor Build Status codecov.io

A package with different implementations of weighted random sampling without replacement in R.



wrswoR 1.1 (2018-02-02)

  • Use microbenchmark package conditionally.
  • Remove dependency on cluster.
  • Use native method registration.
  • Prepare for submission to R Journal.
  • Improve vignette.
  • Internal tweaks.

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.1 by Kirill Müller, 17 days 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 logging, Rcpp

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

Linking to Rcpp

Imported by rakeR.

See at CRAN