Learn R Programming

distributions3 (version 0.1.2)

random: Draw a random sample from a probability distribution

Description

Draw a random sample from a probability distribution

Usage

random(x, n = 1L, ...)

Arguments

x

A probability distribution object such as those created by a call to Bernoulli(), Beta(), or Binomial().

n

The number of samples to draw. Should be a positive integer. Defaults to 1L.

...

Unused. Unevaluated arguments will generate a warning to catch mispellings or other possible errors.

Examples

Run this code
# NOT RUN {
X <- Normal()

random(X, 10)
# }

Run the code above in your browser using DataLab