Learn R Programming

gganimate (version 0.1.1)

gganimate_save: Save a gganimate object to a file

Description

Save a gganimate object to a file

Usage

gganimate_save(g, filename = NULL, saver = NULL, fps = 1, loop = 0, ...)

Arguments

g

A gganimate object

filename

File to write to

saver

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

Details

If saving to a GIF, uses a custom method that takes advantage of redundant backgrounds (scales, static layers, etc).