gen_along | R Documentation |
This is a generator version of tween_along()
. 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.
gen_along(
.data,
ease,
along,
id = NULL,
range = NULL,
history = TRUE,
keep_last = FALSE
)
.data |
A data.frame with components at different stages |
ease |
The easing function to use. Either a single string or one for each column in the data set. |
along |
The "time" point for each row |
id |
An unquoted expression giving the component id for each row. Will
be evaluated in the context of |
range |
The range of time points to include in the tween. If |
history |
Should earlier datapoints be kept in subsequent frames |
keep_last |
Should the last point of each id be kept beyond its time |
An along_generator
object
Other Other generators:
gen_at()
,
gen_components()
,
gen_events()
,
gen_keyframe()
# Default behaviour
gen <- gen_along(airquality, ease = "linear", along = Day, id = Month)
get_frame(gen, 0.22)
# Overwrite keep_last or history in get_frame
get_frame(gen, 0.67, history = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.