QUOTE –> Animating a ggplot visualization with gganimate can be as simple as adding one gganimate function. Even more complex visualisations, with multiple geoms and facetting for example, are no problem for gganimate.
But if you want to animate between multiple states, you need to provide data for the intermediate states, which might mean reshaping your data.
This tutorial only scratched the surface of what gganimate is capable of. <– END QUOTE –> Read the whole thing: Maarten Lambrechts: How to Make Animated Histograms in R, with ggplot and gganimate <— a fantastic tutorial well worth the $10/month subscription fee