If shape
or rate
are not specified they assume the default values of 2 and 1, respectively.
The Gamma distribution has density:
$$ \frac{1}{b^a\Gamma(a)}x^{a-1}exp^{-x/b} $$
for \(x \ge 0\), a > 0 and b > 0; where \(a\) is the shape
parameter and \(b\) is the rate
parameter.
Here \(\Gamma(a)\) is the gamma
function implemented by R and defined in its help.