gganimate: data present only in some frames
问题 I have a problem animating plots where data in some layers in present only in some of the frames. In the example below, I have a moving point that can be nicely animated along 9 frames. However, when I add another layer with a point present only in some of the frames, I get the following error: Error: time data must be the same class in all layers Example : require(data.table) require(ggplot2) require(gganimate) # 9 points along x=y; present at every time point dtP1 = data.table(x = 1:9, y =