library(animation) if (interactive()) { ani.options(nmax = 25, interval=1) ## bootstrap for 20 random numbers from U(0, 1) boot.iid(runif(20)) }