Skip to content

Better error message when pulled variable is missing #234

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

Closed
lionel- opened this issue Apr 13, 2021 · 1 comment
Closed

Better error message when pulled variable is missing #234

lionel- opened this issue Apr 13, 2021 · 1 comment
Assignees

Comments

@lionel-
Copy link
Member

lionel- commented Apr 13, 2021

(function(arg) pull(mtcars, {{ arg }}))()
#> Error: object '' not found

Maybe:

#> Error: Must select a variable.
#> i Did you forget to supply an argument?
@lionel-
Copy link
Member Author

lionel- commented Apr 13, 2021

Would also be nice to improve:

mtcars %>% pull(all_of(NULL))
#> Error: Must extract column with a single valid subscript.
#> ✖ Subscript `var` has size 0 but must be size 1.

@hadley hadley self-assigned this Aug 11, 2022
hadley added a commit that referenced this issue Aug 11, 2022
@hadley hadley closed this as completed in 33c93d2 Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants