Data Science, Machine Learning, Rstats.
Wickham, which makes it easier to work with ‘factor’ data type. We can use one of the functions called ‘fct_relevel’, with which you can convert a given column to ‘factor’ type (if not ‘factor’ yet) and set the base value like below. mutate(<column_name> = fct_relevel(<column_name>, "<base_value"))