animateOn: animateOn

Description Usage Arguments

Description

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=";"))

Usage

1
2
3
animateOn(active = FALSE, fileName, saveFrames = FALSE, width = 480,
  height = 480, units = "px", pointsize = 12, quality = 75,
  bg = "white", res = NA)

Arguments

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 animateOff().

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).


bobverity/bobFunctions documentation built on May 12, 2019, 11:29 p.m.