I've made a HTML widget in R that animates through a series of png images using the saveHTML
function like this:
library(animation)
saveHTML({
# List of the images in the 'images' directory
image.list <- list.files('images', pattern = '*.png', full.names = TRUE)
# Loop through and rename this for the animation to recognise it
for (k in 1:length(image.list) ){
file.rename(image.list[k], sprintf(ani.options('img.fmt'), k))
}
}
, use.dev = FALSE, ani.width = 640, ani.height = 480, ani.type = 'png',
interval = 2, single.opts = "'dwellMultiplier': 1")
This creates a html object called index.html
in my working directory. When I double click this, an internet browser opens, and I use controls to animate through the .png files that were in the "images" folder.
My question is, how do I then render this in an R shiny App?