\begin{Schunk}
\begin{Sinput}
 nes2002$partyid <- factor(nes2002$V023036, levels = c(3,1, 2), labels = c("I", "D", "R"))
 table(nes2002$partyid, nes2002$V023036, exclude = NULL)
\end{Sinput}
\begin{Soutput}
         1   2   3   4   5 <NA>
  I      0   0 429   0   0    0
  D    502   0   0   0   0    0
  R      0 474   0   0   0    0
  <NA>   0   0   0  27  59   20
\end{Soutput}
\end{Schunk}
