How to create and display an animated GIF in Shiny?
<p>I'm able to load a saved file as an image but unable to use <code>gganimate</code> to do it directly. Alternate ways of rendering GIFs would be nice to know but knowing how to render <code>gganimate</code> specifically would really solve my problem.</p>

<pre><code>library(gapminder)
library(ggplot2)
library(shiny)
library(gganimate)
theme_set(theme_bw())

ui &lt;- basicPage(
    plotOutput("plot1")
)

server &lt;- function(input, output) {
    output$plot1 &lt;- renderPlot({
        p = ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent, frame = year)) +
  geom_point() +
  scale_x_log10()

       gg_animate(p)

    })

}

shinyApp(ui, server)
</code></pre>