Skip to content

select should be able to drop columns by number when duplicate names exist #94

@WilDoane

Description

@WilDoane

When a data.frame contains columns with the same name, select can't be used to correct the problem by dropping columns.

Even if rename and other verbs are problematic in this regard, dropping duplicate columns should (in principle) be possible.


Consider these error cases:

tibble::tribble(
  ~a, ~a, ~b,
  1, 2, 3
) %>% 
  select(-1)

or

tibble::tribble(
  ~a, ~a, ~b,
  1, 2, 3
) %>% 
  select(starts_with("a"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions