Description Usage Arguments Value Examples
Mark changes in spells as events
1 | spell_event(x, right_censored = TRUE)
|
x |
a time ordered vector with values identifying a spell. It is assumed that when a value in this vector changes that the spell has ended. |
right_censored |
logical. If |
a vector of event codes for each observation in x
.
0
indicates that there was no spell change. 1
indicates a
spell change.
1 2 3 | x <- c(rep('a', 4), rep('b', 3), 'c', rep('a', 2), 'c')
spell_event(x)
spell_event(x, right_censored = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.