When using the fct_relevel function, the "Argument 2 can't be empty" error occurs

When using the fct_relevel function, you may encounter the “Argument 2 can’t be empty” error as shown below:

Error in mutate(., business_travel = fct_relevel(business_travel, "non_travel",  : 
  ℹ In argument: `business_travel = fct_relevel(...)`.
Caused by error in `dots_values()`:
! Argument 2 can't be empty.

This issue occurs when you have consecutive commas like “,” in the fct_relevel function arguments, specifying empty values.

fct_relevel(business_travel, "non_travel",,"travel_rarely","travel_frequently")

Therefore, please ensure there are no empty values by avoiding consecutive commas in your input.