dgamma(x, shape) pgamma(q, shape) qgamma(p, shape) rgamma(n, shape)
Gamma Distribution. In Encyclopedia of Statistical Sciences. S. Kotz and N. L. Johnson, eds.
rgamma(20,10) # sample of 20 with shape parameter 10 pgamma(1.2, 1.5) # the probability that a value from the gamma # distribution with shape 1.5 is less than 1.2 x <- qgamma(seq(.001, .999, len = 100), 1.5) # compute a vector of quantiles# be sure that you have an open graphics window plot(x, dgamma(x, 1.5), type = "l") # density plot for shape 1.5