tween_along | R Documentation |
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
)
.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. |
nframes |
The number of frames to calculate for the tween |
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 |
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.