I'm using gganimate for the first time and I'm just trying to run the example code from the github, which is this:
library(ggplot2)
library(gganimate)
ggplot(mtcars, aes(factor(cyl), mpg)) +
geom_boxplot() +
# Here comes the gganimate code
transition_states(
gear,
transition_length = 2,
state_length = 1
) +
enter_fade() +
exit_shrink() +
ease_aes('sine-in-out')
But I get an error when I try to run it. (It's the same error I try to do anything with gganimate.) It's this:
Error in gifski_first_error <<- FALSE :
cannot change value of locked binding for
'gifski_first_error'
Thanks!
I had a similar issue. Try installing the "gifski" and "png" packages, then running the provided code.
The error happens because gifski_renderer() is the current default renderer.
Go here for more information: https://github.com/thomasp85/gganimate/commit/8248357809860c0e1a90eaf1f2ac1cdee1a95a64
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With