

   SSppeecciiaall FFuunnccttiioonnss ooff MMaatthheemmaattiiccss

        beta(a, b)
        lbeta(a, b)
        gamma(a)
        lgamma(a)
        digamma(a)
        trigamma(a)
        tetragamma(a)
        pentagamma(a)
        choose(n,k)
        lchoose(n,k)

   DDeessccrriippttiioonn::

        The functions `beta' and `lbeta' return the beta func-
        tion and the natural logarithm of the beta function.

        The functions `gamma' and `lgamma' return the gamma
        function and the natural logarithm of the gamma func-
        tion.

        The functions `digamma', `trigamma', `tetragamma' and
        `pentagamma' return the first, second, third and fourth
        derivatives of the logarithm of the gamma function.

        The functions `choose' and `lchoose' return binomial
        coefficients and their logarithms.

   SSeeee AAllssoo::

        `Arithmetic' for simple and `Math' for miscellaneous
        mathematical functions.

   EExxaammpplleess::

        choose(5, 2)
        for (n in 0:10) print(choose(n, k = 0:n))

        x <- seq(.1, 4, length = 201); dx <- diff(x)[1]
        par(mfrow = c(2, 3))
        for (ch in c("", "l","di","tri","tetra","penta")) {
          is.deriv <- nchar(ch) >= 2
          if (is.deriv) dy <- diff(y) / dx
          nm <- paste(ch, "gamma", sep = "")
          y <- get(nm)(x)
          plot(x, y, type = "l", main = nm, col = "red")
          abline(h = 0, col = "lightgray")
          if (is.deriv) lines(x[-1], dy, col = "blue", lty = 2)
        }
        par(mfrow = c(2, 2))

