powered by
Generate random samples from a Bernoulli distribution
rbernoulli(n, p = 0.5)
Number of samples
Probability of getting TRUE
TRUE
A logical vector
# NOT RUN { rbernoulli(10) rbernoulli(100, 0.1) # }
Run the code above in your browser using DataLab