rbern {causact} | R Documentation |
Density, distribution function, quantile function and random generation for the benoulli distribution with parameter prob
.
rbern(n, prob)
n |
number of observations. If |
prob |
probability of success of each trial |
A vector of 0's and 1's representing failure and success.
#Return a random result of a Bernoulli trial given \code{prob}. rbern(n =1, prob = 0.5)