spell_id: Find unique spell IDs

Description Usage Arguments Value Examples

Description

Find unique spell IDs

Usage

1

Arguments

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.

Value

a vector of spell IDs for each observation in x.

Examples

1
2
x <- c(rep('a', 4), rep('b', 3), 'c', rep('a', 2), 'c')
spell_id(x)

christophergandrud/SurvSetup documentation built on May 13, 2019, 7:01 p.m.