split_animation: Split an animation into chunks

Description Usage Arguments Value

View source: R/post_process.R

Description

Sometimes it is of interest to split an animation out in smaller chunks so they can be orchestrated, e.g. in a presentation. This function lets you provide a 'factor' to split by in the same way as base::split() though this one will be evaluated in the context of the animations frame_vars() data, so you can split directly on frame metadata.

Usage

1

Arguments

animation

The animation to extract metadata from. Defaults to the last rendered animation

by

An unquoted expression to be evaluated in the context of the frame metadata. The result must be of equal length to the number of frames in the animation and define a grouping

Value

Depending on the output type of the renderer used to produce the animation. Often a list with elements referencing the chunks of the animation. that can then be saved individually.


gganimate documentation built on Oct. 23, 2020, 8:04 p.m.