componentfunctions: componentfunctions

componentfunctionsR Documentation

componentfunctions

Description

An S4 class for functions that operate on components or their parameters

Usage

## S4 method for signature 'componentfunction'
initialize(
  .Object,
  fun = function(x) {     x },
  repeats = 1,
  returnComponents = TRUE,
  frames = integerSet()
)

componentfunction(...)

runComponentFunction(input, inputFun, frameNumber)

Details

action.data, action.comp, build.data, build.comp, display.data and display.comp are convenient ways to add componentfunctions to components.

Slots

fun

the name of a function or an function.

repeats

numeric. The number of times the function runs per frame when it runs.

returnComponents

logical. If TRUE the function in fun accepts and returns component objects. If FALSE it accepts parameters like a normal R function and returns a named list of parameters.

frames

an integerSet object. Controls on which frames the function runs. The default behaviour is that it runs on all frames.

Examples

print(1+1)

R-graphic-design/RGD documentation built on Jan. 2, 2023, 10:30 p.m.