if (interactive()) {
stream <- DSD_Benchmark(1)
animate_data(stream, horizon = 100, n = 5000, xlim = c(0,1), ylim = c(0,1))
### animations can be replayed with the animation package
library(animation)
animation::ani.options(interval = .1) ## change speed
ani.replay()
### animations can also be saved as HTML, animated gifs, etc.
saveHTML(ani.replay())
}
Run the code above in your browser using DataLab