Learn R Programming

ndtv (version 0.13.4)

effectFun: functions to manipulate graphic attributes of network for 'special effects'

Description

Functions that can return appropriate graphic attributes (i.e. color interpolation) based on properties of the network (ages of edges,etc)

Usage

effectFun(name, ...)
effect.edgeAgeColor (net, onset, fade.dur, 
                     start.color = "#000000FF", end.color = "#00000000", 
                     na.color = "#CCCCCC55")
effect.vertexAgeColor (net, onset, fade.dur, start.color = "#000000FF", 
                      end.color = "#00000000", na.color = "#CCCCCC55")

Value

effectFun returns the function named by its first argument, with any arguments matching in ... substituted.

Arguments

name

the short name of the effect function to be returned. i.e 'edgeAgeColor' will return the effect.edgeAgeColor function

...

additional arguments to be passed in to effect functions

net

a network object to be evaluated

onset

the time at which the network should be evaluated

fade.dur

(effect property) numeric value giving the color duration of the interpolation

start.color

(effect property) color name for color value to be used at start of interpolation

end.color

(effect property) color name for color value to be used at start of interpolation

na.color

(effect property) default color name for color value to be used for edge/vertices that are not currently active

Author

skyebend@uw.edu

Details

The special effects functions can be called directly for use as graphic parameters with standard network plots, or via effectFun which will return the effect in a functional form so that it can evaluated/substituted at each time point as plot control function to render.animation

effect.edgeAgeColor calculates the edge of each edge in net at the time onset and uses the value to return a color interpolated between start.color and end.color by comparing the time of each edge to the fade.dur parameter

effect.vertexAgeColor does the same, but for vertices.

Users can also define functions to be called in this way