{"action":"created","issue":{"url":"https://api.github.com/repos/mtennekes/treemap/issues/14","labels_url":"https://api.github.com/repos/mtennekes/treemap/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/mtennekes/treemap/issues/14/comments","events_url":"https://api.github.com/repos/mtennekes/treemap/issues/14/events","html_url":"https://github.com/mtennekes/treemap/issues/14","id":57476961,"number":14,"title":"Weird error in combination with dplyr::rowwise / df grouped by row","user":{"login":"srenatus","id":870638,"avatar_url":"https://avatars.githubusercontent.com/u/870638?v=3","gravatar_id":"","url":"https://api.github.com/users/srenatus","html_url":"https://github.com/srenatus","followers_url":"https://api.github.com/users/srenatus/followers","following_url":"https://api.github.com/users/srenatus/following{/other_user}","gists_url":"https://api.github.com/users/srenatus/gists{/gist_id}","starred_url":"https://api.github.com/users/srenatus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srenatus/subscriptions","organizations_url":"https://api.github.com/users/srenatus/orgs","repos_url":"https://api.github.com/users/srenatus/repos","events_url":"https://api.github.com/users/srenatus/events{/privacy}","received_events_url":"https://api.github.com/users/srenatus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-12T15:46:03Z","updated_at":"2015-06-24T20:12:46Z","closed_at":"2015-06-24T20:12:46Z","body":"Hi,\r\n\r\nThe following behaviour confused me a lot today (maybe just for future reference)\r\n\r\n```R\r\n> library(dplyr)\r\n> library(treemap)\r\n> df <- data.frame(x=1:2, y=3:4, z=c(\"foo\", \"bar\"))\r\n> treemap(df, index=\"z\", vSize=\"x\", type=\"index\") # all good!\r\n\r\n> df <- df %>% rowwise %>% mutate(y = x+y) # for this example only\r\n> df\r\nSource: local data frame [2 x 3]\r\nGroups: <by row>\r\n\r\n  x y   z\r\n1 1 4 foo\r\n2 2 6 bar\r\n> class(df)\r\n[1] \"rowwise_df\" \"tbl_df\"     \"tbl\"        \"data.frame\"\r\n> treemap(df, index=\"z\", vSize=\"x\", type=\"index\")\r\nError in `:=`(vColor.temp, 1) : \r\n  Check that is.data.table(DT) == TRUE. Otherwise, := and `:=`(...) are defined for use in j, once only and in particular ways. See help(\":=\").\r\n> ungroup(df) %>% treemap(index=\"z\", vSize=\"x\", type=\"index\") # all good!\r\n```\r\n\r\nI don't suggest that treemap does the ungroup'ing, but I'd not have expected it to be that harmful ;)\r\n\r\nThanks for the great library :)"},"comment":{"url":"https://api.github.com/repos/mtennekes/treemap/issues/comments/114996833","html_url":"https://github.com/mtennekes/treemap/issues/14#issuecomment-114996833","issue_url":"https://api.github.com/repos/mtennekes/treemap/issues/14","id":114996833,"user":{"login":"mtennekes","id":2444081,"avatar_url":"https://avatars.githubusercontent.com/u/2444081?v=3","gravatar_id":"","url":"https://api.github.com/users/mtennekes","html_url":"https://github.com/mtennekes","followers_url":"https://api.github.com/users/mtennekes/followers","following_url":"https://api.github.com/users/mtennekes/following{/other_user}","gists_url":"https://api.github.com/users/mtennekes/gists{/gist_id}","starred_url":"https://api.github.com/users/mtennekes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtennekes/subscriptions","organizations_url":"https://api.github.com/users/mtennekes/orgs","repos_url":"https://api.github.com/users/mtennekes/repos","events_url":"https://api.github.com/users/mtennekes/events{/privacy}","received_events_url":"https://api.github.com/users/mtennekes/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T20:12:46Z","updated_at":"2015-06-24T20:12:46Z","body":"dplyr works now!"}}