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

[ENH] From "with_groups()" to "by" within verbs.... #193

Open
2 of 3 tasks
coforfe opened this issue Nov 23, 2023 · 2 comments
Open
2 of 3 tasks

[ENH] From "with_groups()" to "by" within verbs.... #193

coforfe opened this issue Nov 23, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@coforfe
Copy link

coforfe commented Nov 23, 2023

Feature Type

  • Adding new functionality to datar

  • Changing existing functionality in datar

  • Removing existing functionality in datar

Problem Description

Hi,

The latest versions of dplyr includes an important design change when grouping.

  • Instead of using a group_by() before an operation (mutate, summarize, etc) and using an ungroup() after completing it.
  • Now the grouping will be another parameter in the verbs like mutate(dataframe, newvar_definition, by = group).
  • This approach simplifies the code significatively.

For your reference Hadley Wikham has recognized recently that using group_by() was a design mistake:
https://news.ycombinator.com/item?id=30067406

Feature Description

So the proposal would be to align datar functionality to dplyr by modifying the verbs (mutate, slice, summarize) in order to include a new parameter by where one can specify the variable/s to use for the grouping.

This new functionality would substitute the current with_groups() and ungroup() functions.

Thank!
Carlos.

Additional Context

No response

@coforfe coforfe added the enhancement New feature or request label Nov 23, 2023
@pwwang
Copy link
Owner

pwwang commented Nov 23, 2023

This feature is still experimental with dplyr.

See:

https://dplyr.tidyverse.org/reference/mutate.html
https://dplyr.tidyverse.org/reference/summarise.html
https://dplyr.tidyverse.org/reference/slice.html

We will introduce it until it's stabilized.

@coforfe
Copy link
Author

coforfe commented Nov 25, 2023

OK. Good!.

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

No branches or pull requests

2 participants