Learn R Programming

tweenr (version 2.0.3)

tween_at_t: Get several specific position between two states

Description

This tween is a variation of tween_at(). Instead of having at refer to the tweening position of each row, each at will interpolate the full data at that position.

Usage

tween_at_t(from, to, at, ease)

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.

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 vector with values between 0 and 1.

ease

A character vector giving valid easing functions. Recycled to match the ncol of from

Examples

Run this code
tween_at_t(mtcars[1:6, ], mtcars[6:1, ], runif(3), 'cubic-in-out')

Run the code above in your browser using DataLab