\begin{Schunk}
\begin{Sinput}
 xnew2 <- as.numeric(as.character(xf2))
 xnew2
\end{Sinput}
\begin{Soutput}
[1] 1 2 1 2 2 7
\end{Soutput}
\begin{Sinput}
 table(xnew2, x)
\end{Sinput}
\begin{Soutput}
     x
xnew2 1 2 7
    1 2 0 0
    2 0 3 0
    7 0 0 1
\end{Soutput}
\end{Schunk}
