This function is a wrapper around dplyr::case_when that ensures that factor levels are ordered in the same way as the case_when statement.

fct_case_when(...)

Arguments

...

a series of formulas to pass to dplyr::case_when

Value

a factor