\begin{Schunk}
\begin{Sinput}
> N <- 2000
> calcMean <- function(i) mean(rbinom(N, 1, 0.3))
> means <- sapply(1:1000, calcMean)
> hist(means, xlab = "estimates of proportion of success")
> m1 <- round(mean(means), 4)
> legend("top", c(paste("Mean of means=", m1)))
\end{Sinput}
\end{Schunk}
