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

Use the new "select" and "relocate" subscript actions #300

Merged
merged 6 commits into from Aug 18, 2022

Conversation

DavisVaughan
Copy link
Member

@DavisVaughan DavisVaughan commented Aug 17, 2022

Closes #271
Requires r-lib/vctrs#1619 (I'll merge that first and then update here)

Note that this means tidyselect now relies on dev vctrs.

@@ -1,6 +1,4 @@
with_subscript_errors <- function(expr,
type = "select",
call = caller_env()) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't use the call here so I've removed it

Comment on lines 36 to 41
(expect_error(relocate_loc(x, a, before = c)))
Output
<error/vctrs_error_subscript_oob>
Error in `relocate_loc()`:
! Can't subset columns that don't exist.
! Can't select columns that don't exist.
x Column `c` doesn't exist.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good enough for OOB errors in before and after

Error in `vec_as_location2_result()`:
Error:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improvements from over on the vctrs side

@DavisVaughan DavisVaughan force-pushed the feature/select-relocate-actions branch from dbff421 to a4e4c51 Compare August 18, 2022 13:32
@DavisVaughan DavisVaughan merged commit 48eb2fe into r-lib:main Aug 18, 2022
@DavisVaughan DavisVaughan deleted the feature/select-relocate-actions branch August 18, 2022 14:12
hadley added a commit that referenced this pull request Sep 15, 2022
@hadley hadley mentioned this pull request Sep 15, 2022
hadley added a commit that referenced this pull request Sep 15, 2022
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

Successfully merging this pull request may close these issues.

Use "select" subscript action
2 participants