Description Usage Arguments Details Value See Also Examples
Create animated gif or video from simulation result.
1 | ca_animate(x, filename, type = "gif", speed = 1, directory = getwd(), ...)
|
x |
A ca_result object (generated by |
filename |
A character value specifying relative path and filename. File endings will be ignored and replaced by value in |
type |
A character value specifying the type of output. Either "gif" (tiny animated gif), "mp4", "wmv", or "avi". |
speed |
A numeric value specifying the relative speed of the output (defaults to 1). |
directory |
A character string specifying the absolute or relative target path. Defaults to current working directory. |
... |
further parameters will be handed to the function saveGIF or saveVIDEO. |
This requires R-package [animation] and the additional software ImageMagick (for animated .gif) and FFMPEG (for .mpeg videos).
Returns an animated gif or video.
animate.ca_model
1 2 3 4 5 | # 1. run simulation and save full landsape at each timestep. create animated gif.
l <- init_landscape(c("1","0"), c(0.6,0.4), 100)
r <- ca(l, model = life, t_max = 500)
ca_animate(r, "life01.gif")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.