Learn R Programming

convdistr (version 1.6.1)

BINOMIAL: Factory for a BINOMIAL distribution object

Description

Returns a BINOMIAL distribution object that produce random numbers from a binomial distribution using the rbinom function

Usage

new_BINOMIAL(p_size, p_prob, p_dimnames = "rvar")

Value

An object of class DISTRIBUTION, BINOMIAL

Arguments

p_size

integer that represent the number of trials

p_prob

probability of success

p_dimnames

A character that represents the name of the dimension

Author

John J. Aponte

Examples

Run this code
myDistr <- new_BINOMIAL(1000,0.3)
myDistr$rfunc(10)

Run the code above in your browser using DataLab