from_zero <- function(x) {x$x <- 0; x}
data <- data.frame(
x = c(1, 2, 2, 1, 2, 2),
y = c(1, 2, 2, 2, 1, 1),
time = c(1, 4, 8, 4, 8, 10),
id = c(1, 1, 1, 2, 2, 2)
)
gen <- gen_components(data, 'cubic-in-out', time = time, id = id,
enter = from_zero, enter_length = 4)
get_frame(gen, 0.3)
Run the code above in your browser using DataLab