

   GGeett aanndd SSeett CCoonnttrraasstt MMaattrriicceess

        contrasts(x)
        contrasts(x) <- ctr

   AArrgguummeennttss::

          x: a factor.

        ctr: either a matrix whose columns give coefficients
             for contrasts in the levels of `x', or the
             (quoted) name of a function which computes such
             matrices.

   VVaalluuee::

        These functions are used to set and view the contrasts
        associated with a factor.  If contrasts are not set for
        a factor the default functions from `options("con-
        trasts")' are used.

   SSeeee AAllssoo::

        `C', `contr.helmert', `contr.poly', `contr.sum',
        `contr.treatment', `glm', `aov', `lm'.

   EExxaammpplleess::

        example(factor)
        (fff <- factor(ff))
        contrasts(fff) # treatment
        contrasts(C(fff, sum))

