Skip to content

Selecting nonexistent columns prints confusing error message #99

Open
@mschubert

Description

@mschubert

Starting from your "Quick Overview" example (with plyranges=1.18.0),

library(plyranges)
df <- data.frame(start = 1:5, width = 5)
ir = as_iranges(df)

when I try to select a nonexistent column

ir %>% select(this_col_does_not_exist)

I get the error message:

Error in select_rng(.data, .drop_ranges, ...) :
Cannot select/rename the following columns: start, end, width

This should probably print something like this instead:

Error in select_rng(.data, .drop_ranges, ...) :
The following column does not exist: this_col_does_not_exist

This happens irrespective of using an IRanges or GRanges object.

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