r_gamma {rando} | R Documentation |
Generate Gamma Distributed Values
Description
Generates a set of Gamma distributed values. Can be defined by
one and only one of scale
, rate
or mean.
This must be named in the call.
Usage
r_gamma(
shape,
...,
scale = 1,
rate = NULL,
mean = NULL,
n = default_n(shape, scale, rate, mean),
.seed = NULL
)
Arguments
shape |
vector of shape parameters, strictly positive |
... |
Unused |
scale |
vector of scale parameters, cannot be specified with |
rate |
vector of rate parameters, cannot be specified with |
mean |
vector of mean parameters, cannot be specified with |
n |
number of observations to generate. The |
.seed |
One of the following:
To extract the random seed from a previously generated set of
values, use |
Value
A numeric vector of length n
Examples
set_n(5)
r_gamma(10)
r_gamma(1:10, scale = 2)
r_gamma(1:10, rate = 1 / 2)
r_gamma(1:10, mean = 5)
r_gamma(10, n = 10)