First of two functions needed to create mpg from static images. Run this function, then run the code needed to create a sequence of plots, then run animateOff()
. Individual plots will be saved as jpg with a four-character number on the end (for example myFile0012.jpg), and can either be saved in the local directory or in a temporary directory. The animateOff()
function should have the same shared arguments as animateOn()
(for example the same fileName).
Note that this function requires ImageMagick to be installed, and has only been tested on Windows. If running for the first time you will likely need to add ImageMagick to the path using something like the following:
Sys.setenv(PATH=paste(Sys.getenv("PATH"),"C:\Program Files\ImageMagick-6.9.3-Q16",sep=";"))
1 2 3 |
active |
allows function to be selectively de-activated using a variable. |
fileName |
the filename of input files (without extension or number). The same name is used for the final video file. |
saveFrames |
if FALSE then images are saved to a temporary location before being deleted in |
width |
width of video. |
height |
height of video. |
units |
units of jpg files that make up video (see ?jpeg). |
pointsize |
pointsize of jpg files that make up video (see ?jpg). |
quality |
quality of jpg files that make up video (see ?jpg). |
bg |
background of jpg files that make up video (see ?jpg). |
res |
resolution of jpg files that make up video (see ?jpg). |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.