Merge two or more anim.frames objects to create a new anim.frames object
anim.frames objects returned from, e.g.
speed for the merged object. This may be left unspecified only if all objects have the same speed.
If two or more calls in the merged animation are at the same time, calls
from the earlier object in
... will be run first.
If you merge two animations from
anim.plot, plot.window will be
called before each frame of the merged animation. This may not be what
you want. Instead, use
anim.points or similar for all but the first
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
tmp <- anim.plot(1:5, 1:5, speed=2) tmp2 <- anim.plot(1:5, 5:1, col="red", speed=2) ## Not what you want: replay(merge(tmp, tmp2)) ## better: tmp3 <- anim.points(1:5, 5:1,col="red", speed=2) newf <- merge(tmp, tmp3) replay(newf) ## NB: result of the merge looks different from the two ## individual animations ## not the same: newf2 <- merge(tmp2, tmp) ## points will be called before plot! replay(newf2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.