loop {animate} | R Documentation |
Playback option for the functions rmd_animate and insert_animate.
loop(times = 1, wait = 20)
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. |
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)