Skip to content

No way to remove duplicate column names #4615

Description

@jzadra

Some joins will allow a tibble to end up with two columns with identical names. Doing any sort of tidyselect operation on the tibble results in:

Error: Can't bind data because some arguments have the same name

However, there doesn't appear to be any way to remove the duplicated column. It seems to me that using select(-matches("duplicate name")) or select(-contains("duplicated name")) ought to work since they allow catching multiples. In addition, selecting based on the index should also work. If columns 100 and 101 have the same name, I should be able to select(-101) however these all result in the same Error: Can't bind data because some arguments have the same name

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorselection 🧺tidyselect, scoped verbs, etc.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions