\begin{Schunk}
\begin{Sinput}
  xf1 <- factor(x)
  xf1
\end{Sinput}
\begin{Soutput}
[1] Y N Y Y F N
Levels: F N Y
\end{Soutput}
\begin{Sinput}
  levels(xf1)
\end{Sinput}
\begin{Soutput}
[1] "F" "N" "Y"
\end{Soutput}
\end{Schunk}
