\begin{Schunk}
\begin{Sinput}
 eg <- expand.grid(x = c("a", "b", "c"), y = c("j", "k"), z = c(1, 2, 3))
 ## In document production, this causes an error. Should be OK interactively
 ## str(eg)
 lapply(eg, class)
\end{Sinput}
\begin{Soutput}
$x
[1] "factor"

$y
[1] "factor"

$z
[1] "numeric"
\end{Soutput}
\end{Schunk}
