Skip to contents

Bernoulli Random Samples

Usage

ran_bern(n = 1, prob = 0.5)

Arguments

n

A non-negative whole number of the number of random samples to generate.

prob

A numeric vector of values between 0 and 1 of the probability of success.

Value

A numeric vector of the random samples.

Examples

ran_bern(10)
#>  [1] 1 1 0 0 0 0 0 1 1 1