Closed
Description
when no values in f triggers the generation of "Other" then a warning message is emitted. This is particularly troublesome on very large grouped datasets because you get a warning for each group and it takes forever to process it.
library(forcats)
fct_other(c("A"), keep="A")
#> Warning: Unknown levels in `f`: Other
#> [1] A
#> Levels: A
fct_other(c("A", "B"), keep="A")
#> [1] A Other
#> Levels: A Other
Created on 2020-07-02 by the reprex package (v0.3.0)