A sequence of named character vectors where the
name gives the new level, and the value gives the old level.
Levels not otherwise mentioned will be left as is.
x <- factor(c("apple", "bear", "banana", "dear"))
fct_recode(x, fruit = "apple", fruit = "banana")
# If you make a mistake you'll get a warningfct_recode(x, fruit = "apple", fruit = "bananana")