\begin{Schunk}
\begin{Sinput}
 x <- c("hot", "hot", "cold", "medium", "medium", "hot")
 zz1 <- ordered(x, levels = c("hot", "medium", "cold"))
 x2 <- revs(zz1)
 table(x2, zz1, dnn = list("x2", "zz1 is the original"))
\end{Sinput}
\begin{Soutput}
        zz1 is the original
x2       hot medium cold
  cold     0      0    1
  medium   0      2    0
  hot      3      0    0
\end{Soutput}
\end{Schunk}
