| existHistory {msProcess} | R Documentation |
Checks for the existence of an object of class eventHistory
attached an as attribute to the input object. Additionally,
the user can seek the existence of a particular event within
that history.
existHistory(x, event=NULL)
x |
an object of arbitrary class. |
event |
a character string defining a registered event to query.
If no such event has been registered in a history object (or the history
object does not exist) then a FALSE is returned. Default: NULL
(do not search for a specific event). |
a logical value. A TRUE value is returned if a history object
exists as an attribute of the primary input object x.
If event is also specified, the output will be a logical value
defining whether or not that event has been registered in the
history object.
assignEvent, isProcessRecorded, getHistory, eventHistory.
## check for the existence of a registered history
## in an object without one (FALSE)
z <- 1:5
existHistory(z)
## create a simple history
z <- eventHistory(z, "Event A"=list(number="first", positive="yes"),
"Event B"=list(horse="mustang"))
## check for a registered history (TRUE)
existHistory(z)
## check to see if "Event A" has been registered
## (TRUE)
existHistory(z,"Event A")
## check to see if "Event D" has been registered
## (FALSE)
existHistory(z,"Event D")