Sample a vector of Bernoulli variables with higher speed
(same length with "p"
).
The Bernoulli random variables can have different means.
Examples
rvbern(c(0.9,0.1,0.2,0.3))
#> [1] 1 0 0 1
Sample a vector of Bernoulli variables with higher speed
(same length with "p"
).
The Bernoulli random variables can have different means.
rvbern(c(0.9,0.1,0.2,0.3))
#> [1] 1 0 0 1