This tween takes groups of rows along with the time for each row and calculates the exact value at each at each frame. Further it allows for keeping the subsequent raw data from previous frame as well as letting the final row linger beyond its time. It especially useful for data that should be visualised as lines that are drawn along the x-axis, but can of course also be used for other dimensions as well (even dimensions not corresponding to any axis).
tween_along(
.data,
ease,
nframes,
along,
id = NULL,
range = NULL,
history = TRUE,
keep_last = FALSE
)
A data.frame with components at different stages
The easing function to use. Either a single string or one for each column in the data set.
The number of frames to calculate for the tween
The "time" point for each row
An unquoted expression giving the component id for each row. Will
be evaluated in the context of .data
so can refer to a column from that
The range of time points to include in the tween. If NULL
it
will use the range of time
Should earlier datapoints be kept in subsequent frames
Should the last point of each id be kept beyond its time
A data.frame with the same columns as .data
along with .id
giving
the component id, .phase
giving the state of each component in each frame,
and .frame
giving the frame membership of each row.
Other data.frame tween:
tween_appear()
,
tween_components()
,
tween_elements()
,
tween_events()
,
tween_states()