{"action":"created","issue":{"url":"https://api.github.com/repos/tidyverse/ggplot2/issues/2378","repository_url":"https://api.github.com/repos/tidyverse/ggplot2","labels_url":"https://api.github.com/repos/tidyverse/ggplot2/issues/2378/labels{/name}","comments_url":"https://api.github.com/repos/tidyverse/ggplot2/issues/2378/comments","events_url":"https://api.github.com/repos/tidyverse/ggplot2/issues/2378/events","html_url":"https://github.com/tidyverse/ggplot2/issues/2378","id":284083002,"node_id":"MDU6SXNzdWUyODQwODMwMDI=","number":2378,"title":"grouped_df should not require a \".group\" variable for data on the other layers","user":{"login":"yutannihilation","id":1978793,"node_id":"MDQ6VXNlcjE5Nzg3OTM=","avatar_url":"https://avatars3.githubusercontent.com/u/1978793?v=4","gravatar_id":"","url":"https://api.github.com/users/yutannihilation","html_url":"https://github.com/yutannihilation","followers_url":"https://api.github.com/users/yutannihilation/followers","following_url":"https://api.github.com/users/yutannihilation/following{/other_user}","gists_url":"https://api.github.com/users/yutannihilation/gists{/gist_id}","starred_url":"https://api.github.com/users/yutannihilation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yutannihilation/subscriptions","organizations_url":"https://api.github.com/users/yutannihilation/orgs","repos_url":"https://api.github.com/users/yutannihilation/repos","events_url":"https://api.github.com/users/yutannihilation/events{/privacy}","received_events_url":"https://api.github.com/users/yutannihilation/received_events","type":"User","site_admin":false},"labels":[{"id":17279,"node_id":"MDU6TGFiZWwxNzI3OQ==","url":"https://api.github.com/repos/tidyverse/ggplot2/labels/bug","name":"bug","color":"e02a2a","default":true},{"id":526758881,"node_id":"MDU6TGFiZWw1MjY3NTg4ODE=","url":"https://api.github.com/repos/tidyverse/ggplot2/labels/layers%20:chart_with_upwards_trend:","name":"layers :chart_with_upwards_trend:","color":"eeeeee","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/tidyverse/ggplot2/milestones/16","html_url":"https://github.com/tidyverse/ggplot2/milestone/16","labels_url":"https://api.github.com/repos/tidyverse/ggplot2/milestones/16/labels","id":3301464,"node_id":"MDk6TWlsZXN0b25lMzMwMTQ2NA==","number":16,"title":"v3.0.0","description":"Any regressions that must be fixed prior to 2.3.0 release","creator":{"login":"hadley","id":4196,"node_id":"MDQ6VXNlcjQxOTY=","avatar_url":"https://avatars3.githubusercontent.com/u/4196?v=4","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":53,"state":"open","created_at":"2018-04-26T14:23:54Z","updated_at":"2018-07-05T21:52:31Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2017-12-22T06:30:20Z","updated_at":"2018-11-06T15:42:10Z","closed_at":"2018-05-10T15:41:40Z","author_association":"MEMBER","body":"Due to the change in response to #2351, a grouped_df now creates a variable called `.group`. This may be problematic because ggplot2 treats the first layer so special as all the following layers are required to contain all mapped variables except when another mapping is specified individually. Here is an example:\r\n\r\n``` r\r\nreprex::reprex_info()\r\n#> Created by the reprex package v0.1.1.9000 on 2017-12-22\r\n\r\nlibrary(dplyr, warn.conflicts = FALSE)\r\nlibrary(ggplot2)\r\n\r\ndf <- data.frame(\r\n  x = 1:10,\r\n  y = 1:10,\r\n  type = rep(c(\"a\", \"b\"), 5),\r\n  stringsAsFactors = FALSE\r\n) %>%\r\n  group_by(type)\r\n\r\ndf_labels <- data.frame(\r\n  x = 1,\r\n  y = 2,\r\n  text = \"foo!\"\r\n)\r\n\r\nggplot(df, aes(x, y)) +\r\n  geom_point(aes(colour = type)) +\r\n  geom_label(data = df_labels, aes(label = text))\r\n#> Error in FUN(X[[i]], ...): object '.group' not found\r\n\r\nggplot(ungroup(df), aes(x, y)) +\r\n  geom_point(aes(colour = type)) +\r\n  geom_label(data = df_labels, aes(label = text))\r\n```\r\n\r\n![](https://i.imgur.com/GHZwsYn.png)\r\n\r\nThough I'm not sure this is just a bug, I'm afraid #2351 needs a bit more considerations (better error messages, at least)."},"comment":{"url":"https://api.github.com/repos/tidyverse/ggplot2/issues/comments/436298385","html_url":"https://github.com/tidyverse/ggplot2/issues/2378#issuecomment-436298385","issue_url":"https://api.github.com/repos/tidyverse/ggplot2/issues/2378","id":436298385,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjI5ODM4NQ==","user":{"login":"lock[bot]","id":33595554,"node_id":"MDM6Qm90MzM1OTU1NTQ=","avatar_url":"https://avatars1.githubusercontent.com/in/6672?v=4","gravatar_id":"","url":"https://api.github.com/users/lock%5Bbot%5D","html_url":"https://github.com/apps/lock","followers_url":"https://api.github.com/users/lock%5Bbot%5D/followers","following_url":"https://api.github.com/users/lock%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/lock%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/lock%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lock%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/lock%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/lock%5Bbot%5D/repos","events_url":"https://api.github.com/users/lock%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/lock%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-11-06T15:42:10Z","updated_at":"2018-11-06T15:42:10Z","author_association":"NONE","body":"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. <https://reprex.tidyverse.org/>\n"}}
{"actor":{"display_login":"lock"}}