{"action":"created","issue":{"url":"https://api.github.com/repos/IRkernel/IRkernel/issues/127","labels_url":"https://api.github.com/repos/IRkernel/IRkernel/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/IRkernel/IRkernel/issues/127/comments","events_url":"https://api.github.com/repos/IRkernel/IRkernel/issues/127/events","html_url":"https://github.com/IRkernel/IRkernel/issues/127","id":74377169,"number":127,"title":"Setting data.table column outputs whole table to screen","user":{"login":"abielr","id":168236,"avatar_url":"https://avatars.githubusercontent.com/u/168236?v=3","gravatar_id":"","url":"https://api.github.com/users/abielr","html_url":"https://github.com/abielr","followers_url":"https://api.github.com/users/abielr/followers","following_url":"https://api.github.com/users/abielr/following{/other_user}","gists_url":"https://api.github.com/users/abielr/gists{/gist_id}","starred_url":"https://api.github.com/users/abielr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abielr/subscriptions","organizations_url":"https://api.github.com/users/abielr/orgs","repos_url":"https://api.github.com/users/abielr/repos","events_url":"https://api.github.com/users/abielr/events{/privacy}","received_events_url":"https://api.github.com/users/abielr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-08T14:15:29Z","updated_at":"2015-05-12T00:32:48Z","closed_at":null,"body":"If I run the code below, the second line will cause the entire `dat` object to be output, whereas at an R console it wouldn't return anything. The syntax used is the special syntax for setting columns with the popular `data.table` package. I'm using the 1.9.5 devel version of `data.table`. \r\n\r\n```\r\nlibrary(data.table)\r\ndat <- data.table(x1=1:10)\r\ndat[, x2 := 1:10]\r\n```"},"comment":{"url":"https://api.github.com/repos/IRkernel/IRkernel/issues/comments/101081965","html_url":"https://github.com/IRkernel/IRkernel/issues/127#issuecomment-101081965","issue_url":"https://api.github.com/repos/IRkernel/IRkernel/issues/127","id":101081965,"user":{"login":"abielr","id":168236,"avatar_url":"https://avatars.githubusercontent.com/u/168236?v=3","gravatar_id":"","url":"https://api.github.com/users/abielr","html_url":"https://github.com/abielr","followers_url":"https://api.github.com/users/abielr/followers","following_url":"https://api.github.com/users/abielr/following{/other_user}","gists_url":"https://api.github.com/users/abielr/gists{/gist_id}","starred_url":"https://api.github.com/users/abielr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abielr/subscriptions","organizations_url":"https://api.github.com/users/abielr/orgs","repos_url":"https://api.github.com/users/abielr/repos","events_url":"https://api.github.com/users/abielr/events{/privacy}","received_events_url":"https://api.github.com/users/abielr/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T00:32:48Z","updated_at":"2015-05-12T00:32:48Z","body":"Fixing this on the IRkernel side is probably not reasonable. Under the hood, when you run a statement with the data.table `:=` syntax, it sets a global variable equal to `address(x)`, which is then checked inside of the `print.data.table` command to see if the output should be suppressed. In other words, when you run the command\r\n\r\n`dat[, x2 := 1:10]`\r\n\r\nIt is triggering `[.data.table` followed by `print.data.table`, where `print.data.table` sees that it should not print this time, after which it resets the state of the global variable so that other print statements will run. However, when IRkernel is running `evaluate()`, the `print.data.table` statement never gets called, so all you see is the regular `data.table` object."}}