Description Usage Arguments Value Note See Also Examples
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
.
1 | assignEvent(record, process=NULL, histname="event.history", envir=NULL)
|
record |
a list containing named character vectors describing
the event in the form
|
envir |
the |
histname |
a character string defining the name of the history
variable stored in the specified frame. Default: |
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 |
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
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.