

   RReeoorrddeerr LLeevveellss ooff FFaaccttoorr

        relevel(x, ref, ...)

   AArrgguummeennttss::

          x: An unordered factor.

        ref: The reference level.

        ...: Additional arguments for future methods.

   DDeessccrriippttiioonn::

        The levels of a factor are re-ordered so that the level
        specified by `ref' is first and the others are moved
        down. This is useful for `contr.treatment' contrasts
        which take the first level as the reference.

   VVaalluuee::

        A factor of the same length as `x'.

   AAuutthhoorr((ss))::

        B.D. Ripley

   SSeeee AAllssoo::

        `factor', `contr.treatment'

   EExxaammpplleess::

        data(warpbreaks)
        warpbreaks$tension <- relevel(warpbreaks$tension, ref="M")
        summary(lm(breaks ~ wool + tension, data=warpbreaks))

