\begin{Schunk}
\begin{Sinput}
 SAVEME <- TRUE
 if (SAVEME){
      odir <- rockchalk::dir.create.unique("output/")
      pdf(file = file.path(odir, "histo-100.pdf"), onefile = TRUE)
  } else {
  	par(ask = TRUE)
  }
 set.seed(234)
 for(i in 1:100){
  	x <- rpois(20, lambda = 4)
  	hist(x, main = paste("Run number", i),
           breaks = -0.5:15.5,
           xlim = c(0, 15), xlab = "histogram",
          )
  }
 if (SAVEME) dev.off()
\end{Sinput}
\begin{Soutput}
pdf 
  2 
\end{Soutput}
\end{Schunk}
