\Header{levels}{Levels Attributes}
\alias{levels<\Rdash}{levels}
\methalias{levels<\Rdash.default}{levels}
\keyword{category}{levels}
\begin{Description}\relax
\code{levels} provides access to the levels attribute of a variable.
The first form returns the value of the levels of its argument
and the second sets the attribute.

The assignment form (\code{"levels<-"}) of \code{levels} is a generic
function and new methods can be written for it.
The most important method is that for \code{\Link{factor}}s:\end{Description}
\begin{Usage}
\begin{verbatim}
levels(x)
levels(x) <- value
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] an object, for example a factor.
\end{ldescription}
\end{Arguments}
\begin{SeeAlso}\relax
\code{\Link{levels<\Rdash.factor}}, \code{\Link{nlevels}}.\end{SeeAlso}

