catchEvent: Catch a History Event that has been Thrown

Description Usage Arguments Value Note See Also Examples

Description

Catches a history event that has been thrown, extracts the history, and attaches/updates the history in the primary input object.

Usage

1
catchEvent(x, histname="event.history", envir=NULL)

Arguments

x

an object of arbitrary class. Optionally, this input may already contain an event history in which case the history is updated after being caught. Otherwise the new history is attached.

envir

the frame in S-PLUS (or environment in R) designated for the processing and storage of pipeline history data. Default: msProcessEnv, a global environment impicitly set by a previous call to throwEvent. In general, the user should rely on the specified default value.

histname

a character string defining the name of the history variable stored in the specified frame. Default: "event.history".

Value

a replication of x with the event history updated/attached.

Note

If available, the last entry of the specified histname object (a list located in the specified frame) is extracted and written to the input x via the msSet constructor function. If no other entries exist after extraction, the histname list is deleted from the specified frame.

See Also

throwEvent, assignEvent, isProcessRecorded, eventHistory.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## throw an event 
envir <- msGlobalEnv()
throwEvent("Superbowl XL", envir=envir)

## assign data to the thrown event 
record  <- list(NFC="Seattle Seahawks", AFC="Pittsburgh Steelers")
assignEvent(record)

## catch event 
catchEvent(NULL)

zeehio/msProcess documentation built on May 4, 2019, 10:15 p.m.