I would be nice to have to option to turn off warnings by adding the argument warn = TRUE.
I work with surveys where people have the option of choosing "Other" in a multiple choice question. I'd like that to be the last category in plots, but sometimes no-one has chosen "Other", and I don't want to have a warning in my knitted Markdown doc every time that happens. So an option such as this would be nice:
factor(Alternative) %>% fct_relevel("Other", after = Inf, warn = FALSE)
I have implemented this myself by adding an if:
if (warn)
warning("Unknown levels in `f`: ", paste(unknown, collapse = ", "), call. = FALSE)
It should not break any code as long as the default is TRUE.
I would be nice to have to option to turn off warnings by adding the argument
warn = TRUE
.I work with surveys where people have the option of choosing "Other" in a multiple choice question. I'd like that to be the last category in plots, but sometimes no-one has chosen "Other", and I don't want to have a warning in my knitted Markdown doc every time that happens. So an option such as this would be nice:
I have implemented this myself by adding an if:
It should not break any code as long as the default is
TRUE
.