existHistory: Verify Existence of an Embedded History Object

Description Usage Arguments Value See Also Examples

Description

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.

Usage

1
existHistory(x, event=NULL)

Arguments

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).

Value

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.

See Also

assignEvent, isProcessRecorded, getHistory, eventHistory.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## 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")

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