Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting nonexistent columns prints confusing error message #99

Open
mschubert opened this issue Jan 10, 2023 · 0 comments
Open

Selecting nonexistent columns prints confusing error message #99

mschubert opened this issue Jan 10, 2023 · 0 comments

Comments

@mschubert
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant