Generates a set of Hypergeometric distributed values.
r_hyper( total, positives, num, ..., n = default_n(total, positives, num), .seed = NULL )
total | size of the population (e.g. number of balls) |
---|---|
positives | number of elements with the desirable feature (e.g number of black balls) |
num | number of draws to make |
... | Unused |
n | number of observations to generate. The |
.seed | One of the following:
To extract the random seed from a previously generated set of
values, use |
A numeric vector of length n
#> [1] 1 4 3 2 2r_hyper(10:20, 10, 5)#> [1] 5 5 3 4 5 3 2 2 3 3 2r_hyper(10, 5, 5, n = 10)#> [1] 3 1 3 3 2 3 3 2 3 4