animatoR: Plot Block of Animated Commands.

Description Usage Arguments Value Author(s) See Also Examples

Description

Make and plot animated sequence of figures.

Usage

1
2
3
4
5
animator(block, life = 1, fps = 25, pause = 0.5, verbose = FALSE)

as.animator(x, life = 1)

is.animator(x)

Arguments

block, x

character, expression or object of class animator containing graphical timed commands.

life

numerical, duration of animation.

fps

numerical, frames per second.

pause

numerical, length of the pause between plotted frames.

verbose

logical, if TRUE print animation characteristics.

Value

Function animator plots the animation and returns an object of class animator.

as.animator attempts to add the class animator to the argument x.

is.animator returns TRUE if x is an animator object and FALSE otherwise.

Author(s)

Andrej Blejec andrej.blejec@nib.si

See Also

as.animator, is.animator.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
if(interactive())
animator("newplot();tpoints(2,2,5,8,cex=2,pch=16)",life=2,verbose=TRUE)
# block
animator({
  newplot()
  abline(h=c(1,8),v=c(1,8))
 tpoints(1,1,8,8,pch=16,cex=2)
})
t <- 0
as.animator('{
  newplot()
  abline(h=c(1,8),v=c(1,8))
 tpoints(1,1,8,8,pch=16,cex=2)
}')

ablejec/animatoR documentation built on Feb. 21, 2020, 10:09 p.m.