Learn R Programming

animation (version 2.0-5)

ani.pause: Pause for a while

Description

If this function is called in an interactive graphics device, it will pause for a time interval (specified in ani.options('interval')); otherwise it will do nothing.

Arguments

Value

  • Invisible NULL.

See Also

dev.interactive, Sys.sleep

Examples

Run this code
## pause for 2 seconds
oopt = ani.options(interval = 2)

for (i in 1:5) {
    plot(runif(10), ylim = c(0, 1))
    ani.pause()
}

ani.options(oopt)

## see demo('Xmas2', package = 'animation') for another
#   example}

Run the code above in your browser using DataLab