Description Usage Arguments Value See Also Examples
Extracts a registered event history from an arbitrary object or a specified event within that history.
1 | getHistory(x, event=NULL)
|
x |
an object of any class. |
event |
a character string or integer defining a specific event to query.
If no such event has been registered in a history object (or the history
object does not exist) then a |
an object of class msHistory
. If event
is specified, only
that event is returned in the history.
assignEvent
, isProcessRecorded
, existHistory
, eventHistory
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## create a simple history
z <- 1:5
z <- eventHistory(z, "Event A"=list(number="first", positive="yes"),
"Event B"=list(horse="mustang"),
"Event C"=list(string="violins and cellos", percussion="drums",
reed="flutes and oboes"))
## extract the entire event history
getHistory(z)
## extract only Event B (each method is
## equivalent)
getHistory(z,"Event B")
getHistory(z,2)
getHistory(z)["Event B"]
getHistory(z)[2]
## return entire history except the second event
## (each method is equivalent)
getHistory(z,-2)
getHistory(z)[-2]
## attempt to extract a non-existent event (NA is
## returned)
getHistory(z)["dogs"]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.