Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better name / alias for fct_reorder2() #264

Open
jennybc opened this issue Jun 22, 2020 · 2 comments
Open

Better name / alias for fct_reorder2() #264

jennybc opened this issue Jun 22, 2020 · 2 comments
Labels
feature a feature request or enhancement

Comments

@jennybc
Copy link
Member

jennybc commented Jun 22, 2020

I'm a huge fan of fct_reorder2(), for the reasons highlighted here:

If you make a line plot, make the legend order match some notion of the data order (or use direct labelling). Linked gist shows how to do this in #rstats with forcats::fct_reorder2().https://t.co/1IHbG7wIG8 pic.twitter.com/hadqsmfLO6

— Jenny Bryan (@jennybryan) March 30, 2020

Gist: https://gist.github.com/jennybc/847c6b43c4e35cec2e5bb30a3f38af73

image

Maybe the under-appreciation for fct_reorder2() is partially due to its name? It doesn't really evoke what the function does.

I don't have a great alternative but something along the lines of fct_reorder_for_legend()?

@ahcyip
Copy link

ahcyip commented Aug 7, 2020

Agreed, and I believe the names of the functions fct_relevel, fct_recode, fct_reorder all need some re-consideration. I discussed it in: #269

@hadley
Copy link
Member

hadley commented Dec 9, 2020

If it helps, you can think of the 2d as "2d"

@hadley hadley added the feature a feature request or enhancement label May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants