Skip to content

select_if doesn't work if a column in the tibble is named "i" #4380

@alejandroschuler

Description

@alejandroschuler

This one took me a few minutes to track down... It appears that if a column in the tibble is named i, select_if will fail. This also applies to mutate_if and possibly others.

packageVersion("dplyr")
[1] ‘0.8.1iris %>% 
rename(i=Sepal.Length) %>% 
select_if(is.numeric)

Error in tibble_vars[[i]] : 
  attempt to select more than one element in vectorIndex

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