powered by
Draw a random sample from a probability distribution
random(x, n = 1L, drop = TRUE, ...)
Random samples drawn from the distriubtion x.
x
A probability distribution object such as those created by a call to Bernoulli(), Beta(), or Binomial().
Bernoulli()
Beta()
Binomial()
The number of samples to draw. Should be a positive integer. Defaults to 1L.
1L
logical. Should the result be simplified to a vector if possible?
Unused. Unevaluated arguments will generate a warning to catch mispellings or other possible errors.
X <- Normal() random(X, 10)
Run the code above in your browser using DataLab