You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fct_lump_prop() errors with weights and unused levels #292
library(forcats)
f<-factor(c("a", "a", "b", "c"), levels= c("a", "b", "c", "d"))
fct_lump_prop(f, prop=0.25)
#> [1] a a Other Other#> Levels: a Other
fct_lump_prop(f, prop=0.25, w= rep(1, 4))
#> Error in if (prop > 0 && sum(prop_n <= prop) <= 1) {: missing value where TRUE/FALSE needed
changed the title [-]Error in fct_lump_prop with weights and unused levels[/-][+]`fct_lump_prop()` errors with weights and unused levels[/+]on Jan 3, 2023
Activity
hadley commentedon Mar 2, 2022
Reprex:
Created on 2022-03-02 by the reprex package (v2.0.1)
[-]Error in fct_lump_prop with weights and unused levels[/-][+]`fct_lump_prop()` errors with weights and unused levels[/+]Refactor weight computation
Refactor weight computation (#335)