binom: Generate n pseudo random numbers from a binomial...

View source: R/binom.R

binomR Documentation

Generate n pseudo random numbers from a binomial distribution.

Description

Generate n pseudo random numbers from a binomial distribution.

Usage

binom(n = 1, p = 0.5, k = 5, seed = as.integer(Sys.time()))

Arguments

n

the number of pseudo random binomial variants to generate. Defaults to 1.

p

probability of success. Defaults to 0.5.

k

Number of n independent Bernoulli trials. Defaults to 5.

seed

Seed for pseudo random number generating algorithm. Defaults to a integer generated from the system time

Value

vector of binomial random variants of length n

Examples

binom(n=1e5, p= 0.2, k=5)

donovanquimby/simulationRNG documentation built on March 19, 2022, 12:46 p.m.