r_hyper {rando} | R Documentation |
Generate Hypergeometric Distributed Values
Description
Generates a set of Hypergeometric distributed values.
Usage
r_hyper(
total,
positives,
num,
...,
n = default_n(total, positives, num),
.seed = NULL
)
Arguments
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 |
Value
A numeric vector of length n
Examples
set_n(5)
r_hyper(10, 5, 5)
r_hyper(10:20, 10, 5)
r_hyper(10, 5, 5, n = 10)