I'm relatively new to gganimate and I'm trying to create a simple polynomial time-series graph on R studio.
x <- 1:100
f <- function (x){
return(-(x)^2)
}
df <- data.frame(x, y= -(x)^2)
ggplot(df, aes(x, y)) +
geom_line() +
stat_function(fun=f) +
transition_states(x, transition_length = 1, state_length = 2 )
My error shows:
" Error in transform_path(all_frames, next_state, ease, params$transition_length[i], :
transformr is required to tween paths and lines "
I'm wondering if there's something missing in transition_state() ? It appears fine as a static graph but I'd like to make it a time-series graph.
Appreciate any advice / help!! Thank you !
transition_states
come from? Please edit the question with a call tolibrary(pkgname)
loading the package wheretransition_states
is. – Gauvin