Skip to content

no error or warning on incorrect usage of between() #7792

@EmilHvitfeldt

Description

@EmilHvitfeldt

The main title of the function reads "Detect where values fall in a specified range" which, if you don't read further, suggest that the following code could also be okay. Which it of cause isn't because it is shorthand for x >= left & x <= right

dplyr::between(4, 10, 2)
#> [1] FALSE

Would it be unreasonably to ask that a warning/error is thrown if right < left? I would imagine it would catch some issues for people

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