Translate an integer index to an SEIR factor

decode_seir(x)

Arguments

x

An integer (or vector) with values 1--4.

Value

A factor with levels "S", "E", "I", or "R"

Examples

decode_seir(3)
#> [1] I #> Levels: S < E < I < R