gen_at {tweenr} | R Documentation |
Generator for interpolating between two data frames
Description
This is a generator version of tween_at()
with the additional functionality
of supporting enter and exit functions. It returns a generator that can be
used with get_frame()
and get_raw_frames()
to extract frames for a
specific time point scaled between 0 and 1.
Usage
gen_at(from, to, ease, id = NULL, enter = NULL, exit = NULL)
Arguments
from , to |
A data.frame or vector of the same type. If either is of length/nrow 1 it will get repeated to match the length of the other |
ease |
A character vector giving valid easing functions. Recycled to
match the ncol of |
id |
The column to match observations on. If |
enter , exit |
functions that calculate a start state for new observations
that appear in |
Value
A keyframe_generator
object
See Also
Other Other generators:
gen_along()
,
gen_components()
,
gen_events()
,
gen_keyframe()
Examples
gen <- gen_at(mtcars[1:6, ], mtcars[6:1, ], 'cubic-in-out')
get_frame(gen, 0.3)