
expr
, then makes use of the command convert
in `ImageMagick' to convert these images to a single animated movie (in formats such as GIF and MPG, etc).saveMovie(expr, interval = 1, moviename = "movie", movietype = "gif",
loop = 0, dev = png, filename = "Rplot", fmt = "%03d",
outdir = tempdir(), convert = "convert",
ani.first = NULL, para = par(no.readonly = TRUE), ...)
brownian.motion()
) in this package or a custom expression (e.g. for(i in 1:10) plot(runif(10), ylim = 0:1)
).loop
times (N.B. for GIF only!)%3d
convert
, but might be imconvert
under some Windows platforms)ani.first = par(pch = 20)
par
; note ani.first
can override this argumentheight
and width
, ...system
).interval
. So just go ahead with this function to create your movies if you don't mind these two points.saveSWF
, system
, png
, jpeg
and bmp
## make sure ImageMagick has been installed in your system
saveMovie(for(i in 1:10) plot(runif(10), ylim = 0:1), loop = 1)
oopt = ani.options(nmax = 100)
saveMovie(brownian.motion(pch = 21, cex = 5, col = "red", bg = "yellow"),
width = 600, height = 600)
ani.options(oopt)
Run the code above in your browser using DataLab