{"action":"opened","issue":{"url":"https://api.github.com/repos/Rdatatable/data.table/issues/1181","labels_url":"https://api.github.com/repos/Rdatatable/data.table/issues/1181/labels{/name}","comments_url":"https://api.github.com/repos/Rdatatable/data.table/issues/1181/comments","events_url":"https://api.github.com/repos/Rdatatable/data.table/issues/1181/events","html_url":"https://github.com/Rdatatable/data.table/issues/1181","id":89093773,"number":1181,"title":"(some?) eval expressions have issues with :=","user":{"login":"eantonya","id":691190,"avatar_url":"https://avatars.githubusercontent.com/u/691190?v=3","gravatar_id":"","url":"https://api.github.com/users/eantonya","html_url":"https://github.com/eantonya","followers_url":"https://api.github.com/users/eantonya/followers","following_url":"https://api.github.com/users/eantonya/following{/other_user}","gists_url":"https://api.github.com/users/eantonya/gists{/gist_id}","starred_url":"https://api.github.com/users/eantonya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eantonya/subscriptions","organizations_url":"https://api.github.com/users/eantonya/orgs","repos_url":"https://api.github.com/users/eantonya/repos","events_url":"https://api.github.com/users/eantonya/events{/privacy}","received_events_url":"https://api.github.com/users/eantonya/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Rdatatable/data.table/labels/bug","name":"bug","color":"DF3A2C"},{"url":"https://api.github.com/repos/Rdatatable/data.table/labels/Low","name":"Low","color":"772950"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-17T18:38:19Z","updated_at":"2015-06-17T18:38:19Z","closed_at":null,"body":"```R\r\ndt1 = data.table(a = 1, key = 'a')\r\ndt2 = data.table(c = 1, fn = list(quote(5*a)), key = 'c')\r\n\r\n# this works\r\ndt1[, eval(dt2[a]$fn[[1]], .SD)]\r\n[1] 5\r\n\r\n# this doesn't\r\ndt1[, n := eval(dt2[a]$fn[[1]], .SD)]\r\n#Error in eval(expr, envir, enclos) : object 'a' not found\r\n```\r\n\r\nRelevant SO post - http://stackoverflow.com/a/30899285/817778"}}