Lump factor levels below a minimum count
Collapses factor levels whose counts fall below a minimum threshold.
x (Vector[Factor]): A factor
vector.
min (Int): Minimum count threshold.
Levels below this are lumped.
other_level (String): = “Other”
Name for the collapsed catch-all level.
A factor vector with rare levels lumped.
fct_lump_min(fct, min = 5)