{"action":"created","issue":{"url":"https://api.github.com/repos/Rdatatable/data.table/issues/1684","repository_url":"https://api.github.com/repos/Rdatatable/data.table","labels_url":"https://api.github.com/repos/Rdatatable/data.table/issues/1684/labels{/name}","comments_url":"https://api.github.com/repos/Rdatatable/data.table/issues/1684/comments","events_url":"https://api.github.com/repos/Rdatatable/data.table/issues/1684/events","html_url":"https://github.com/Rdatatable/data.table/pull/1684","id":151782649,"number":1684,"title":"attempt at fixing #1683","user":{"login":"MichaelChirico","id":7606389,"avatar_url":"https://avatars.githubusercontent.com/u/7606389?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelChirico","html_url":"https://github.com/MichaelChirico","followers_url":"https://api.github.com/users/MichaelChirico/followers","following_url":"https://api.github.com/users/MichaelChirico/following{/other_user}","gists_url":"https://api.github.com/users/MichaelChirico/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelChirico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelChirico/subscriptions","organizations_url":"https://api.github.com/users/MichaelChirico/orgs","repos_url":"https://api.github.com/users/MichaelChirico/repos","events_url":"https://api.github.com/users/MichaelChirico/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelChirico/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-04-29T02:36:28Z","updated_at":"2016-05-02T12:59:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Rdatatable/data.table/pulls/1684","html_url":"https://github.com/Rdatatable/data.table/pull/1684","diff_url":"https://github.com/Rdatatable/data.table/pull/1684.diff","patch_url":"https://github.com/Rdatatable/data.table/pull/1684.patch"},"body":"Probably not exactly the way we want to do this, but it gets the job done.\r\n\r\nThe core of the issue is that `DT[ , .(.I[1L], V2[1L]), by = V1]` currently gets `GForce = TRUE` because the `.ok` helper function doesn't check that the subsetted variable (i.e., `.I`) is actually part of `ansvars`. But then when passing to`` `g[` ``only the things in `ansvars` are passed to the evaluating environment. `.I` is not part of `ansvars`, so we get this error.\r\n\r\nIs there a particular reason `.I` is excluded from `ansvars`?\r\n\r\nShould `GForce` be activated on `DT[ , .I[1L], by = V1]` as well?"},"comment":{"url":"https://api.github.com/repos/Rdatatable/data.table/issues/comments/216228297","html_url":"https://github.com/Rdatatable/data.table/pull/1684#issuecomment-216228297","issue_url":"https://api.github.com/repos/Rdatatable/data.table/issues/1684","id":216228297,"user":{"login":"MichaelChirico","id":7606389,"avatar_url":"https://avatars.githubusercontent.com/u/7606389?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelChirico","html_url":"https://github.com/MichaelChirico","followers_url":"https://api.github.com/users/MichaelChirico/followers","following_url":"https://api.github.com/users/MichaelChirico/following{/other_user}","gists_url":"https://api.github.com/users/MichaelChirico/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelChirico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelChirico/subscriptions","organizations_url":"https://api.github.com/users/MichaelChirico/orgs","repos_url":"https://api.github.com/users/MichaelChirico/repos","events_url":"https://api.github.com/users/MichaelChirico/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelChirico/received_events","type":"User","site_admin":false},"created_at":"2016-05-02T12:59:40Z","updated_at":"2016-05-02T12:59:40Z","body":"Then I guess we need to assign `sort(irows)`; will test later"}}