Convert categorical variables to factors and deal with empty/missing values

empty_level(x)

Arguments

x

Categorical variable used in table

Value

Variable with updated levels