This function is intended for use when you have a data.frame of events at
different time points. This could be the appearance of an observation for
example. This function replicates your data nframes times and
calculates the duration of each frame. At each frame each row is
assigned an age based on the progression of frames and the entry point of in
time for that row. A negative age means that the row has not appeared yet.
Usage
tween_appear(data, time, timerange, nframes)
Value
A data.frame as data but repeated nframes times and
with the additional columns .age and .frame
Arguments
data
A data.frame to tween
time
The name of the column that holds the time dimension. This does
not need to hold time data in the strictest sence - any numerical type will
do
timerange
The range of time to create the tween for. If missing it
will defaults to the range of the time column
nframes
The number of frames to create for the tween. If missing it
will create a frame for each full unit in timerange (e.g.
timerange = c(1, 10) will give nframes = 10)
See Also
Other data.frame tween:
tween_along(),
tween_components(),
tween_elements(),
tween_events(),
tween_states()