Save a gganimate object to a file
gganimate_save(g, filename = NULL, saver = NULL, fps = 1, loop = 0, ...)
A gganimate object
File to write to
A string such as "mp4" or "gif" that specifies
a function from the animation package such as saveVideo
to use for saving. GIFs are saved manually using ImageMagick.
Additional arguments passed on to the saving function, such as [pkg=ggplot2]{ggsave
If saving to a GIF, uses a custom method that takes advantage of redundant backgrounds (scales, static layers, etc).