library(gganimate)
#> Loading required package: ggplot2
library(ggplot2)
ggplot(diamonds, aes(cut, carat)) +
geom_point(col = "red") +
geom_boxplot() +
transition_layers(layer_length = 1, transition_length = 1)
#> Error in `$<-.data.frame`(`*tmp*`, ".phase", value = "raw"): replacement has 1 row, data has 0
Created on 2018-09-02 by the reprex package (v0.2.0).