tween_at {tweenr} | R Documentation |
Get a specific position between two states
Description
This tween allows you to query a specific postion between two states rather than generate evenly spaced states. It can work with either data.frames or single vectors and each row/element can have its own position and easing.
Usage
tween_at(from, to, at, ease)
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 |
at |
A numeric between 0 and 1 recycled to match the nrow/length of
|
ease |
A character vector giving valid easing functions. Recycled to
match the ncol of |
Value
If from
/to
is a data.frame then a data.frame with the same
columns. If from
/to
is a vector then a vector.
Examples
tween_at(mtcars[1:6, ], mtcars[6:1, ], runif(6), 'cubic-in-out')
[Package tweenr version 2.0.3 Index]