\Header{levels}{Levels Attributes}
\alias{levels$\leftarrow $}{levels}
\keyword{category}{levels}
\begin{Usage}
\begin{verbatim}
levels(x)
levels(x) <- value
\end{verbatim}
\end{Usage}
\begin{Description}
\texttt{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 for of \texttt{levels} is a generic function and new methods
can be written for it.  The most important method is that for factors.\end{Description}
\begin{SeeAlso}
\texttt{\Link{levels<-.factor}}, \texttt{\Link{nlevels}}.\end{SeeAlso}

