=> Try to install gganimate in CoLab, it is unavailable.
=> try in RStudio,
File access error:
Warning: file_renderer failed to copy frames to the destination directory
file_renderer(dir = ".", prefix = "gganim_plot", overwrite = FALSE)
The frame sources:
/var/folders/bw/k6_tkc2142v1wh5r_1yhkqhc0000gp/T//RtmpIopU0P/1eec3399c50d/gganim_plot0001.png
I tried to change file permission in Finder, but my username is not allowed.
The following codes worked:
file_renderer(dir = "/Users/hqin/github/R-animation-sandbox/tmp/", prefix = "gganim_plot", overwrite = TRUE)
anim <- p + transition_time(year) +
labs(title = "Year: {frame_time}")
gganimate::animate( anim, renderer=ffmpeg_renderer())
anim <- p + transition_time(year) +
labs(title = "Year: {frame_time}")
gganimate::animate( anim, renderer=ffmpeg_renderer())
I tested and found out that I have ffmpeg installed.
Reference:
https://ottverse.com/create-video-from-images-using-ffmpeg/
No comments:
Post a Comment