tidyverse / forcats

🐈🐈🐈🐈: tools for working with categorical variables (factors)
https://forcats.tidyverse.org/
Other
553 stars 126 forks source link

Improved handling of NAs in `fct_reorder()` #341

Closed hadley closed 1 year ago

hadley commented 1 year ago

@DavisVaughan what do you think of this API? It's a bit unusual to default to na.rm = TRUE, but you can't see the result of the computation and including NAs is never useful, so adopting ggplot2's approach makes sense to me. Once you've reviewed this API, I'll also apply it to fct_reorder2().

hadley commented 1 year ago

@DavisVaughan using .default feels a lot nicer, and I like the idea to default .na_rm to NULL.