Skip to content

Better name / alias for fct_reorder2() #264

@jennybc

Description

@jennybc

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()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions