The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
The goal of wrswoR is to provide faster implementations of weighted random sampling without replacement in R.
You can install the released version of wrswoR from CRAN with:
install.packages("wrswoR")
And the development version from GitHub with:
# install.packages("devtools")
::install_github("krlmlr/wrswoR") devtools
The functions in this package are a drop-in replacement to
sample.int(n, size, replace = FALSE, prob = prob)
. With
large n
, sample.int()
becomes too slow to be
practical, unlike the functions in this package.
library(wrswoR)
set.seed(20200726)
sample_int_crank(20, 10, 1:20)
#> [1] 8 18 14 17 11 15 10 4 13 5
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.