loop {animate}R Documentation

Loop through the available frames n times

Description

Playback option for the functions rmd_animate and insert_animate.

Usage

loop(times = 1, wait = 20)

Arguments

times

An integer; the number of times to loop.

wait

A number; the number of milliseconds to wait for before the next frame is drawn.

Examples


input <- tempfile(fileext = ".Rmd")
output <- tempfile(fileext = ".html")
writeLines('
```{r, echo = FALSE, message = FALSE}
# Run / include the following in a code chunk of an R Markdown document
library(animate)
insert_animate(system.file("tests/Lorenz_system.json.gz", package = "animate"),
               options = loop(times = 2, wait = 15))
```
', input)
knitr::knit(input, output)
# browseURL(output)



[Package animate version 0.3.9.4 Index]