\begin{Schunk}
\begin{Sinput}
 ## Categorical, unordered
 nes2002$educf <- factor(nes2002$V023131, levels = 1:7, 
          labels = c("Elem.","Some HS","HS","Some coll.","AA","BA","Grad"))
 ## Ordered categories
 nes2002$educo <- factor(nes2002$V023131, levels = 1:7, 
          labels = c("Elem.","Some HS","HS","Some coll.","AA","BA","Grad"),
          ordered = TRUE)
 ## Numeric
 nes2002$educn <- nes2002$V023131
 table("Education(ordered)" = nes2002$educo, 
        "Education (orig)" = nes2002$V023131, exclude = NULL)
\end{Sinput}
\begin{Soutput}
                  Education (orig)
Education(ordered)   1   2   3   4   5   6   7 <NA>
        Elem.       36   0   0   0   0   0   0    0
        Some HS      0  70   0   0   0   0   0    0
        HS           0   0 399   0   0   0   0    0
        Some coll.   0   0   0 313   0   0   0    0
        AA           0   0   0   0 155   0   0    0
        BA           0   0   0   0   0 347   0    0
        Grad         0   0   0   0   0   0 178    0
        <NA>         0   0   0   0   0   0   0   13
\end{Soutput}
\end{Schunk}
