R: Generate random samples from a Bernoulli distribution

rbernoulli {purrr} | R Documentation

## Generate random samples from a Bernoulli distribution

### Description

Generate random samples from a Bernoulli distribution

### Usage

    rbernoulli(n, p = 0.5)

### Arguments

`n` | Number of samples
`p` | Probability of getting `TRUE`

### Value

A logical vector

### Examples

    rbernoulli(10)
    rbernoulli(100, 0.1)

[Package purrr version 0.2.2 Index]