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

Should tbl_vars() add grouping metadata with grouped tibble? #4106

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

Should tbl_vars() add grouping metadata with grouped tibble? #4106

lionel- opened this issue Jan 11, 2019 · 3 comments
Assignees
Labels
Milestone

Comments

@lionel-
Copy link
Member

@lionel- lionel- commented Jan 11, 2019

Currently select() uses the unexported sel_vars() to create variables passed to tidyselect. These variables contain the metadata necessary for group_cols() to figure out the grouping variables.

While this works for select(), group_cols() can't be used in other selecting functions like tidyr::gather(). Support for grouped tibbles in tbl_vars() would solve this.

@romainfrancois romainfrancois added this to the 0.8.2 milestone May 28, 2019
@romainfrancois romainfrancois self-assigned this May 28, 2019
@romainfrancois
Copy link
Member

@romainfrancois romainfrancois commented May 28, 2019

Do we still need this ?

It's kind of a mess:

  • tbl_vars() is generic with at least implementations in dplyr and dbplyr
  • group_vars() too
  • tbl_nongroup_vars() calls tbl_vars() and group_vars()
  • sel_vars() calls tbl_vars() and group_vars()

Perhaps we can export sel_vars() instead of changing tbl_vars() ?

@lionel-
Copy link
Member Author

@lionel- lionel- commented May 28, 2019

Yes we still need this. Not sure what's the best API for it.

@lock
Copy link

@lock lock bot commented Dec 15, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Dec 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants