-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Feature Request: add .groups = "drop"
option to mutate
#7066
Comments
I think this is much nicer library(ggplot2)
mpg |>
dplyr::arrange(displ) |>
dplyr::mutate(
avg_hwy = mean(hwy),
.by = displ
) |>
as.data.frame() Same for For |
Thanks @DavisVaughan for the quick response! |
@sbanville-delfi you might enjoy reading https://www.tidyverse.org/blog/2023/02/dplyr-1-1-0-per-operation-grouping/ |
Currently
summarise
provides the.groups = "drop"
parameter (along with other options), to eliminate the need to callungroup
. I think having this option available tomutate
would also be helpful.For example, it would be a useful shortcut to drop groups in mutate by doing the following:
This isn't a high priority of course.
Thanks in advance.
The text was updated successfully, but these errors were encountered: