\begin{Schunk}
\begin{Sinput}
 N <- 300
 xcat2 <- cut(rnorm(N), breaks=c(-Inf, 0.5, Inf), labels=c("R", "M"))
 xcat2c <- contrasts(xcat2)[xcat2, ]	
 xcat2n <- as.numeric(xcat2)-1
 y <- 2 + 0.1 * xcat2n + 3 * rnorm(N)
 plot.default(y ~ xcat2n, xlim=c(-0.5, 1.5), xlab = "One Categorical Predictor", ylab="An Output Variable", xaxt = "n")
 axis(1, at = c(0, 1), labels = c("L","R"))
\end{Sinput}
\end{Schunk}
