cdfgam.RdDistribution function and quantile function of the gamma distribution.
The gamma distribution with shape parameter \(\alpha\) and scale parameter \(\beta\) has probability density function $$f(x)={x^{\alpha-1} \exp(-x/\beta) \over \beta^\alpha \Gamma(\alpha)}$$ for \(x\ge0\), where \(\Gamma(.)\) is the gamma function.
cdfgam gives the distribution function;
quagam gives the quantile function.
The functions expect the distribution parameters in a vector,
rather than as separate arguments as in the standard R functions
pgamma and qgamma.
# Random sample from the gamma distribution
# with shape parameter 4 and mean 1.
quagam(runif(100), c(4,1/4))
#> [1] 0.8235288 1.1417335 0.9271620 1.1289449 0.9321397 1.4641986 1.2049811
#> [8] 1.5768969 0.2144718 1.6253605 2.8479856 0.9182434 0.7569174 1.3256515
#> [15] 1.0232377 1.0906243 1.5284510 1.0004665 0.6373071 1.7527356 1.5549233
#> [22] 0.6321315 0.8060701 1.3150735 0.4664153 0.5676402 0.5292333 1.1331983
#> [29] 1.5222849 1.7918083 0.9820492 1.0135750 1.1704581 0.6276805 0.3287749
#> [36] 1.7115422 0.3848436 2.9008621 1.0598520 0.5396367 1.7097280 0.3102940
#> [43] 1.0352147 0.6186138 1.6961742 1.4223946 1.1902800 0.5984717 1.2376848
#> [50] 0.5949724 0.8667503 0.7277081 1.0023353 0.6363899 0.8757489 1.7472555
#> [57] 2.1621915 1.4228994 1.6820716 1.0191710 1.3218157 2.7526345 1.2086278
#> [64] 0.5923939 0.6816240 1.2268941 1.5526276 0.6203473 0.1630054 1.8924745
#> [71] 0.8459947 1.2784813 1.1401362 0.8118023 0.7483047 1.2555770 1.1348165
#> [78] 0.4114031 1.5209890 0.3966608 1.5114737 0.4463074 0.9000223 0.6305958
#> [85] 1.1690730 0.5279896 1.9601656 0.7154673 0.7597825 1.6234514 1.4448890
#> [92] 0.4372521 1.6951320 1.3212577 0.7841830 3.5966154 0.7461289 1.9187857
#> [99] 0.5937881 0.2950969