( knitr rmarkdown) , LaTeX :
---
title: "test_animations"
author: "Colours"
date: "27/10/2017"
classoption: landscape
output:
pdf_document:
keep_tex: true
includes:
in_header: header_ani.tex
---
```{r setup, include=FALSE}
Vectorize(require)(package = c("knitr"),
character.only = TRUE)
opts_chunk$set(echo = FALSE,
cache = TRUE)
pacman::p_load(gganimate, gapminder, ggplot2)
```
```{r sample_ani, message=TRUE, warning=TRUE, echo=TRUE, }
p2 <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop)) +
geom_point() +
geom_point(aes(frame = year), color = "red") +
scale_x_log10()
gganimate(p2, filename = "animation2.gif", title_frame = TRUE) -> amimate
```
<!-- Notes on the answer: https:
```{r convert_shele, echo=TRUE, message=TRUE, warning=TRUE, paged.print=FALSE}
system(command = "convert -coalesce animation2.gif something.png")
```
\animategraphics[loop,controls,width=\linewidth]{12}{something-}{0}{12}
Figures 0 - 12 should reflect frames
~~~
\animategraphics[loop,controls,width=\linewidth]{12}{something-}{0}{12}
~~~
. .
.

convert
. , , .{12}{something-}{0}{12}
, ( ) something-
, convert
, something-0.png ... something-n.png
{0}{12}
.