-
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
Still cannot mutate a grouping column if using across()
#6127
Comments
Making this work would require an amount of effort that I don't think is commensurate with the payoff, so we don't plan to work on this currently. |
Hello @hadley and @DanChaltiel I faced the same issue. The problem to me is that everything() silently bypass the grouping column, while naming it properly doesn't.
But to be honest, i understand the decision not to correct it. solution proposed : use rlang synthax to make it work ( !!group_var, any_of(group_var) or quo(cyl) )
Thanks for this thread, I couldn't see where it went wrong :) |
…eserved, then regrouped and reattributed. maelstrom-research/Rmonize#72 tidyverse/dplyr#6127
Hi,
Since #4709 and version 1.0.0,
mutate()
andsummarise()
allow modification of grouping variables, which is very useful.However, while this works nice and clean using the standard syntax, I get an error when I try to use
across()
.Indeed, as said in #5963,
?across()
tells us that:This feels a bit inconsistent, and if it is still a real limitation today (I hope not), I guess at least that the justification in the doc is inadequate.
Here is a little reprex anyway (I use the dev version of
dplyr
) :Created on 2021-12-12 by the reprex package (v2.0.1)
PS: BTW, in case you are interested, I just made a little GitHub Action that bumps the dev-level package version at each push (link). This would make it easier to tell you the exact version I'm running, as for now it will almost always be x.x.x.9000. I can make a PR if you want.
The text was updated successfully, but these errors were encountered: