oopt = ani.options(interval = 1, nmax = 30)
op = par(mar = rep(1, 4), lwd = 2)
sample.system()
par(op)
# HTML animation page
ani.options(ani.height = 350, ani.width = 500, outdir = getwd(), nmax = 30,
interval = 1, title = "Demonstration of the systematic sampling",
description = "Sampling with equal distances.")
ani.start()
par(mar = rep(1, 4), lwd = 2)
sample.system()
ani.stop()
ani.options(oopt)
Run the code above in your browser using DataLab