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

group_by works with string args, but it shouldn't #410

Closed
wch opened this Issue Apr 30, 2014 · 0 comments

Comments

Projects
None yet
2 participants
@wch
Member

wch commented Apr 30, 2014

If the grouping var is a string, it should be treated as a new column, or something like that.

These shouldn't have identical results, but they are:

g <- group_by(mtcars, cyl) %>% summarise(foo = n())
# Source: local data frame [3 x 2]
# 
#   cyl foo
#1   4  11
#2   6   7
#3   8  14
gs <- group_by(mtcars, "cyl") %>% summarise(foo = n())
identical(g, gs)
# TRUE

@hadley hadley added the bug label Aug 1, 2014

@hadley hadley added this to the 0.3 milestone Aug 1, 2014

@hadley hadley self-assigned this Aug 1, 2014

@hadley hadley closed this in d98337a Aug 1, 2014

@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.