tween_fill | R Documentation |
This tween fills out NA
elements (or NULL
elements if data
is a list)
by interpolating between the prior and next non-missing values.
tween_fill(data, ease)
data |
A data.frame or vector. |
ease |
A character vector giving valid easing functions. Recycled to
match the ncol of |
If data
is a data.frame then a data.frame with the same
columns. If data
is a vector then a vector.
# Single vector
tween_fill(c(1, NA, NA, NA, NA, NA, 2, 6, NA, NA, NA, -2), 'cubic-in-out')
# Data frame
tween_fill(mtcars[c(1, NA, NA, NA, NA, 4, NA, NA, NA, 10), ], 'cubic-in')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.