I have a function using savegif to generate gif in my space. But how can I display this gif in the Shiny? I have tried read.gif, but it does not work. Could someone help me?
Thanks!
Code:
mainPanel(
imageOutput('animated_image')
)
)
),
server = function(input, output, session)
{
observeEvent(input$go,{
saveGIF(plotfire(State, year, month),
movie.name = paste0(input$State,input$year,input$month,'.gif'))
}
)
output$animated_image <- renderImage({
input$go
filename <- paste0(input$State,input$year,input$month,'.gif')
list(src=filename)
}, deleteFile = FALSE)