Changing factor levels with dplyr mutate January 29, 2023 by Tarik With the forcats package from the tidyverse this is easy, too. mutate(dat, x = fct_recode(x, "B" = "A"))