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

Inconsistent behaviour of group_by/summarise_at in version 0.7.5 #3613

privefl opened this issue May 29, 2018 · 2 comments

Inconsistent behaviour of group_by/summarise_at in version 0.7.5 #3613

privefl opened this issue May 29, 2018 · 2 comments


Copy link

@privefl privefl commented May 29, 2018

In new version (0.7.5),

iris %>%
  group_by(Species) %>%
  summarise_at(-1, mean)

Error in summarise_impl(.data, dots) :
Column Species can't be modified because it's a grouping variable

I'm pretty sure that the grouping variable was automatically excluded in previous versions.

Is this a bug or a feature? (in order for me to change my code only if necessary)

Copy link

@romainfrancois romainfrancois commented May 29, 2018

We are currently thinking about scoped verbs as a whole. This feels like a 🐛 .

In the meantime, you can also exclude Species e.g. :

> iris %>%
+   group_by(Species) %>%
+   summarise_at(vars(-1, -Species), mean)
# A tibble: 3 x 4
  Species    Sepal.Width Petal.Length Petal.Width
  <fct>            <dbl>        <dbl>       <dbl>
1 setosa            3.43         1.46       0.246
2 versicolor        2.77         4.26       1.33 
3 virginica         2.97         5.55       2.03 


romainfrancois added a commit that referenced this issue May 30, 2018
`summarise_at()` excludes grouping variables. closes #3613
Copy link

@lock lock bot commented Nov 26, 2018

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.


@lock lock bot locked and limited conversation to collaborators Nov 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants