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

validate_vars()? #85

Closed
lionel- opened this issue Jan 11, 2019 · 4 comments
Closed

validate_vars()? #85

lionel- opened this issue Jan 11, 2019 · 4 comments
Labels
feature a feature request or enhancement

Comments

@lionel-
Copy link
Member

lionel- commented Jan 11, 2019

Do we need tidyselect::validate_vars(), that would take a character vector of names and throw appropriate errors if not found?

Using vars_select() for this is a bit awkward because of the need to unquote (and both !! and !!! work, which doesn't help with the awkwardness)

vars <- tidyselect::vars_select(vars, !!sel)
vars <- tidyselect::vars_select(vars, !!!sel)

validate_vars() would take the data (and require names() method? The tbl_vars() generic is in dplyr...) and a character vector:

vars <- tidyselect::validate_vars(data, sel)
@lionel- lionel- added the feature a feature request or enhancement label Sep 9, 2019
@hadley
Copy link
Member

hadley commented Sep 11, 2019

Where would you use this?

@lionel-
Copy link
Member Author

lionel- commented Sep 11, 2019

I don't remember exactly, but this had to do with tidyeval users taking inputs with ensyms() as an attempt to be strict about looking up the symbols only in the data frame. This is not the right way to be strict however, as the symbol will still be looked up inside the execution env of the user's wrapper, all the way up to the search path. I wasn't planning on implementing this now because I haven't thought about the issue for a while.

@hadley
Copy link
Member

hadley commented Sep 11, 2019

I'm in favour of closing issues if you don't remember exactly why you need them 😉

@lionel-
Copy link
Member Author

lionel- commented Sep 12, 2019

I have transferred the issue to tidyverse/tidyeval#34.

@lionel- lionel- closed this as completed Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants