Problem:
Hi, I try to make an animated plot in a rmarkdown document. Here is my code:
```{r lmSim, fig.show=\'animate\'}
library(animation)
library(p
Have you tried with ggplot and gganimation? For example:
library(gapminder)
library(gganimate)
library(ggplot)
head(gapminder)
theme_set(theme_bw())
p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = 1, color = continent, frame = year)) +
geom_point() +
scale_x_log10()
animation<-gganimate(p, "your_animation.gif")#Or to your path
See that you need to save first your animation. You need to have establish your work directory.
After you can call it from the chat or html in markdown (not from the R chuck) like:
