assignEvent {msProcess} | R Documentation |
Updates a history event previously thrown to a specified frame (or envirnoment in R).
Typically, a caller function will have thrown the event
while the callee(s) update the event information
using the assignEvent
function. That information
can then be retrieved (typically by the caller) using
catchEvent
.
assignEvent(record, process=NULL, histname="event.history", envir=NULL)
record |
a list containing named character vectors describing
the event in the form
list(proc2="Description 1", proc2="Description 2") and so on.
Here, EventName is a character string defining the name of the event,
and the named list variables proc1 and proc2 are character strings
that define the specific proceedings for that event. Each of these proceedings
is descibed more thoroughly by the assigned character string.
If, for a given event, the user wishes only to register the name
of the event sans extra proceedings information, set this variable
to a blank character string "" and specify only the second event
argument. |
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" . |
process |
a character string defining a title for the current
information being recorded. This typically serves as a flag
for other functions so that the same process is not written
more than once. This can be checked using the isProcessRecorded function. |
no output is returned directly. Instead, the variable histname
in frame frame
is updated with the supplied event information.
If assignable, the specified histname
object is updated in the specified
frame with the new process information.
throwEvent
, catchEvent
, isProcessRecorded
.
## throw an event in the global frame envir <- msGlobalEnv() throwEvent("The 2005 British Open Championship", envir=envir) ## assign data to the thrown event record <- list(Winner="Tiger Woods") process <- "champion" assignEvent(record, "champion", envir=envir) ## verify process has been recorded: TRUE isProcessRecorded(process, envir=envir) ## catch event catchEvent(NULL, envir=envir)