tween_at: Get a specific position between two states

Description Usage Arguments Value Examples

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

1
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 from

ease

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

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

1
tween_at(mtcars[1:6, ], mtcars[6:1, ], runif(6), 'cubic-in-out')

thomasp85/tweenr documentation built on May 31, 2019, 11:16 a.m.