

   levels {base}                                R Documentation

   LLeevveellss AAttttrriibbuutteess

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

        `levels' provides access to the levels attribute of a
        variable.  The first form returns the value of the lev-
        els of its argument and the second sets the attribute.

        The assignment form (`"levels<-"') of `levels' is a
        generic function and new methods can be written for it.
        The most important method is that for `factor's:

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

        levels(x)
        levels(x) <- value

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

        `levels<-.factor', `nlevels'.

