brgen: generate bernoulli distribution

Description Usage Arguments Value Author(s) See Also

View source: R/randomFunctions.R

Description

This function get a float number between 0 and 1, then generate a bernoulli distribution. This function use cugen function. This function generate 0 if the number that cugen generated is bigger than p, Otherwise it generate 1.

Usage

1
myvar <- brgen(0.5)

Arguments

p

The probability for bernoulli distribution.

Value

This function return 0 or 1.

Author(s)

HamidReza Zare (hzare@ce.sharif.ir)

See Also

See Also as cugen


shahrooz1997/ProbDist documentation built on May 14, 2019, 7:37 a.m.