You may have to install the development version of the animation package from Github: https://github.com/yihui/animation#readme
Last active
July 13, 2017 20:53
-
-
Save yihui/5899181 to your computer and use it in GitHub Desktop.
create and download a GIF animation in Shiny
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(animation) | |
stopifnot(packageVersion('animation') >= '2.2.3') | |
shinyServer(function(input, output) { | |
output$testgif = downloadHandler( | |
filename = 'random.gif', | |
content = function(file) { | |
saveGIF( | |
for (i in 1:30) { | |
plot(rnorm(100)) | |
}, movie.name = 'random.gif', interval = 0.1) | |
file.rename('random.gif', file) | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
shinyUI(basicPage( | |
downloadButton("testgif") | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have the same issue as kmezhoud.