Skip to content

Review advice for unnamed arguments #124

@grahamison

Description

@grahamison

"Example 2: multiple inputs" shows:

# Good
sum_squares(3, y = 5)

# Acceptable
sum_squares(y = 5, x = 3)

# Bad
sum_squares(3, 5)

I would question the advice for this example, where x and y are equivalent. I think the first example is "bad" and the second two are "good".

Advanced R says

In general, use positional matching only for the first one or two arguments

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