merge.anim.frames {anim.plots} | R Documentation |
Merge anim.frames objects
Description
Merge two or more anim.frames objects to create a new anim.frames object
Usage
## S3 method for class 'anim.frames'
merge(..., speed = NULL)
Arguments
... |
anim.frames objects returned from, e.g. |
speed |
speed for the merged object. This may be left unspecified only if all objects have the same speed. |
Details
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
animation.
Examples
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)
[Package anim.plots version 0.2.2 Index]