animUnit: Generate a set of animation values.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

These functions can be used to generate a set of values for use with grid.animate() to animate some feature of a grob.

Usage

1
2
3
4
animUnit(x, timeid = NULL, id = NULL)
animValue(x, timeid = NULL, id = NULL)
as.animUnit(x, ...)
as.animValue(x, ...)

Arguments

x

A set of animation values. Could be a numeric vector, a character vector, a unit vector, a matrix, a list of units.

timeid

A vector that associates each value of x with a time point.

id

A vector that associates each value of x with a different (numeric) identifier.

...

For future use.

Details

A set of animation values is ultimately either a numeric or character vector OR a unit vector. Subsets of the animation values can be defined per time point, or per identifier, or both.

The as functions allow animation values to be specified as matrices or lists, which are converted to formal animation value sets. The grid.animate() function calls these functions so the conversion typically happens automatically.

These functions should only have to be called directly in relatively complex cases where multiple values need to be specified per time point AND per identifier.

Value

An animUnit or animValue object.

Author(s)

Paul Murrell

See Also

grid.animate

Examples

1
2
3
4
5
6
require(grid)

animValue(c("visible", "hidden"))
animUnit(unit(1:24, "in"),
         timeid=rep(1:3, each=8),
         id=rep(1:2, 12))

sachsmc/gridSVG documentation built on May 29, 2019, 12:44 p.m.