Description Usage Arguments Value See Also
rgamma_vec()
allows vector inputs for shape
and rate
. Unlike
rgamma()
, it always returns a tibble
, not a
vector, and does not accept a scale
parameter (if you have a scale
parameter, use 1/scale
to get the rate). It also uses the notion of "size",
rather than "length", but this difference is not likely to affect end users.
1 | rgamma_vec(n, shape, rate = 1)
|
n |
Number of observations. If |
shape, rate |
Shape and rate parameters for the gamma distribution.
Both must be positive, |
A tibble
of random deviates with n
rows and columns corresponding
to the values in the vectors supplied to shape
, rate
(named with the
pattern gamma{i}
, where i
is the i
th value in the recycled shape
and rate
vectors, padded by zeros to ensure consistent length).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.