Learn R Programming

purrr (version 1.0.2)

rbernoulli: Generate random sample from a Bernoulli distribution

Description

[Deprecated]

This function was deprecated in purrr 1.0.0 because it's not related to the core purpose of purrr.

Usage

rbernoulli(n, p = 0.5)

Value

A logical vector

Arguments

n

Number of samples

p

Probability of getting TRUE

Examples

Run this code
rbernoulli(10)
rbernoulli(100, 0.1)

Run the code above in your browser using DataLab