-
Notifications
You must be signed in to change notification settings - Fork 135
Closed
Labels
featurea feature request or enhancementa feature request or enhancementtidy-dev-day 🤓Tidyverse Developer Day rstd.io/tidy-dev-dayTidyverse Developer Day rstd.io/tidy-dev-day
Description
While fct_lump() keeps all the levels if you set n equal to a character, it sets them all to other when you set prop equal to a character.
Reprex:
library(forcats)
x <- factor(letters[rpois(10, 5)])
# this keeps all the levels
fct_lump(x, n = "a")
#> [1] c c b f e c b c n h
#> Levels: b c e f h n
# this makes everything "Other"
fct_lump(x, prop = "a")
#> [1] Other Other Other Other Other Other Other Other Other Other
#> Levels: OtherCreated on 2019-01-19 by the reprex package (v0.2.1)
My personal opinion is that these should both result in an error instead, but I think they should at least be consistent.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancementtidy-dev-day 🤓Tidyverse Developer Day rstd.io/tidy-dev-dayTidyverse Developer Day rstd.io/tidy-dev-day