Translate a character SEIR status into an integer index equivalent to the factor level

get_seir_level(x)

Arguments

x

a character or character vector with values "S", "E", "I", or "R".

Value

An integer value

Examples

get_seir_level("I")
#> I #> 3