The function rbernou generates Bernoulli Random Variables faster than using
rbinom(n, 1, prob) or
runif(n) <= prob by using a C-level integer comparison.
integer, number of simulations.
prob = 0.5 is twice time faster than the general case
0 <= proba <= 1, using a specific C-level binary algorithm.
A vector of i.i.d. Bernoulli random variables.
For a big number of simulations, it is approximately eleven times faster than the usual
rbinom(n, 1, prob).
Nicolas Baradel - PGM Solutions
 1 1 1 0 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.