r_bern {rando} | R Documentation |
Generate Bernoulli Distributed Values
Description
Generates a set of Bernoulli distributed values.
Usage
r_bern(prob = 0.5, ..., n = default_n(prob), .seed = NULL)
Arguments
prob |
vector of probability of successes, between 0 & 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 |
Value
A numeric vector of length n
Examples
set_n(5)
r_bern(0.9)
r_bern(seq(0, 1, 0.1))
r_bern(1 / 4, n = 10)
[Package rando version 0.2.0 Index]