Skip to content

Decreasing option for Vector's sort member function  #525

@nathan-russell

Description

@nathan-russell

Currently sort does not have a parameter controlling the sort direction (ascending vs. descending). I have an update which would provide this option, changing the signature to sort(bool decreasing = false), as is the default in base::sort.

Although it is trivial to do this from client code for NumericVector and IntegerVector with std::sort(..., std::greater<T>()), that is not the case for CharacterVector (#419), so I think an internal implementation is warranted. If there are no objections, I can submit a PR for further review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions