Skip to content

Argument inconsistency between case_when() and recode_values()/replace_values() #7806

@sonicseamus

Description

@sonicseamus

Hello, I am excited about the new dplyr verbs recode_values() and replace_values() and have been experimenting with working them into my code. However, when I was writing code, I noticed that I naturally wrote .default = as an argument for recode_values() and was surprised not to get an autocomplete. After checking the documentation, I realized that the .default, .ptype, and .unmatched arguments do not have period prefixes for these new verbs, even though they do for case_when().

I don't really care whether there's the prefix or not (I'm not up on my dplyr lore enough to know what qualifies an argument for having a . prefix), but can we have consistency in the arguments across these three verbs? This may well have been an intentional choice, in which case I'm curious what the rationale was! And am here to report that it was confusing, at least for this useR.

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