Generates a set of Geometric distributed values.
r_geom(prob = 0.5, ..., n = default_n(prob), .seed = NULL)
prob | vector of probability of success, must strictly greater than 0 and (non-strictly) less than 1, i.e. 0 < prob <= 1 |
---|---|
... | 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] 2 3 21 9 15#> [1] 1 0 10 1 1 0 0 1 0 0r_geom(0.1, n = 10)#> [1] 6 26 11 15 1 0 0 4 13 3