Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ani.pause

Pause for a while and flush the current graphical device


Description

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

Usage

ani.pause(interval = ani.options("interval"))

Arguments

interval

a time interval to pause (in seconds)

Value

Invisible NULL.

Author(s)

Yihui Xie

See Also

Examples

## 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

animation

A Gallery of Animations in Statistics and Utilities to Create Animations

v2.6
GPL
Authors
Yihui Xie [aut, cre], Christian Mueller [ctb], Lijia Yu [ctb], Weicheng Zhu [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.