\begin{Schunk}
\begin{Sinput}
 for (i in 1:10){
    fn <- paste("fig", i, ".pdf", sep="")
    mm <- 3*i; msd <- i^2;
    mtitle <- paste("Histogram", i, "m =", mm, "sd =", msd)
    pdf(file = fn)
    hist(rnorm(1000, mean = 3*i, sd = i^2),  main = mtitle)
    dev.off()
   }
\end{Sinput}
\end{Schunk}
