

   Constants {base}                             R Documentation

   BBuuiilltt--iinn CCoonnssttaannttss

   UUssaaggee::

        LETTERS
        letters
        month.abb
        month.name
        pi

   VVaalluuee::

        R has a limited number of built-in constants (there is
        also a rather larger library of data sets which can be
        loaded with the function `data').

        The following constants are available:

    LETTERS: the 26 upper-case letters of the Roman alphabet;

    letters: the 26 lower-case letters of the Roman alphabet;

   month.abb: the three-letter abbreviations for the English
             month-names;

   month.name: The English names for the months of the year;

         pi: the ratio of the circumference of a circle to its
             diameter.

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

        `data'.

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

         all(nchar(letters) == 1)                    # TRUE
         all(month.abb == substr(month.name, 1, 3))  # TRUE

        eps <- .Machine$double.eps
        all.equal(pi, 4*atan(1), tol= 2*eps)

        # John Machin (1705) computed 100 decimals of pi :
        all.equal(pi/4, 4*atan(1/5) - atan(1/239), 4*eps)

