Description Usage Arguments Value Author(s) See Also Examples
Displays a single movie-frame in the R-console, exactly as used in a movie generated with makemovie.
1 2 3 4 5 6 7  | 
frame.draw | 
 function that plots an individual frame. This function must have exactly one argument 'x', which can be integer (e.g. a simple frame index) or real (e.g. a time).  | 
frame.index | 
 list of frame indices 'x' to be included in the movie  | 
width | 
 number of pixels along the horizontal axis  | 
height | 
 number of pixels along the vertical axis  | 
keep.frame | 
 logical flag specifying whether to keep the temporary png-file of the frame  | 
None
Danail Obreschkow
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  | ## Example: Movie of a manual clock
# Function to draw a single clock face with two hands
frame = function(time) {
  par(mar=c(0,0,0,0))
  nplot(xlim=c(-1.1,1.1),ylim=c(-1.1,1.1),pty='s')
  plotrix::draw.circle(0,0,1,col='#aaaaff')
  radius = c(0.5,0.9)
  speed = 2*pi/c(720,60)
  lwd = c(4,2)
  graphics::arrows(0,0,radius*sin(speed*time),radius*cos(speed*time),lwd=lwd)
}
# Produce movie
## Not run: 
makeframe(frame,15,200,200)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.