{"action":"created","issue":{"url":"https://api.github.com/repos/hadley/dplyr/issues/1230","labels_url":"https://api.github.com/repos/hadley/dplyr/issues/1230/labels{/name}","comments_url":"https://api.github.com/repos/hadley/dplyr/issues/1230/comments","events_url":"https://api.github.com/repos/hadley/dplyr/issues/1230/events","html_url":"https://github.com/hadley/dplyr/issues/1230","id":90292914,"number":1230,"title":"left_join with large dataset and multiple matching columns crashes R if adding new rows (cartesian product)","user":{"login":"nickbond","id":3093082,"avatar_url":"https://avatars.githubusercontent.com/u/3093082?v=3","gravatar_id":"","url":"https://api.github.com/users/nickbond","html_url":"https://github.com/nickbond","followers_url":"https://api.github.com/users/nickbond/followers","following_url":"https://api.github.com/users/nickbond/following{/other_user}","gists_url":"https://api.github.com/users/nickbond/gists{/gist_id}","starred_url":"https://api.github.com/users/nickbond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickbond/subscriptions","organizations_url":"https://api.github.com/users/nickbond/orgs","repos_url":"https://api.github.com/users/nickbond/repos","events_url":"https://api.github.com/users/nickbond/events{/privacy}","received_events_url":"https://api.github.com/users/nickbond/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-23T05:35:17Z","updated_at":"2015-08-13T02:15:27Z","closed_at":null,"body":"The above crash occurred for me on both OS X and windows, but was alleviated by specifying the number of rows in the second table being joined (df2 below had exactly 1130 rows). The first join column was formatted as POSIXct. It is a large dataset and I have not been able to reproduce with a simpler example, but happy to provide the data if you need a reproducible example.\r\n\r\n```\r\nleft_join(df1, df2[1:1130,], by = c('date'='date', 'site.2014'='site')).\r\n```\r\n\r\nThanks,\r\nNick"},"comment":{"url":"https://api.github.com/repos/hadley/dplyr/issues/comments/130508741","html_url":"https://github.com/hadley/dplyr/issues/1230#issuecomment-130508741","issue_url":"https://api.github.com/repos/hadley/dplyr/issues/1230","id":130508741,"user":{"login":"nickbond","id":3093082,"avatar_url":"https://avatars.githubusercontent.com/u/3093082?v=3","gravatar_id":"","url":"https://api.github.com/users/nickbond","html_url":"https://github.com/nickbond","followers_url":"https://api.github.com/users/nickbond/followers","following_url":"https://api.github.com/users/nickbond/following{/other_user}","gists_url":"https://api.github.com/users/nickbond/gists{/gist_id}","starred_url":"https://api.github.com/users/nickbond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickbond/subscriptions","organizations_url":"https://api.github.com/users/nickbond/orgs","repos_url":"https://api.github.com/users/nickbond/repos","events_url":"https://api.github.com/users/nickbond/events{/privacy}","received_events_url":"https://api.github.com/users/nickbond/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T02:15:27Z","updated_at":"2015-08-13T02:15:27Z","body":"Dear François,\r\nI've made a copy of the data frames in question, which can be downloaded at the following link (https://www.dropbox.com/s/yw0lyu5dng6r1vb/bond_example.RData?dl=0). \r\n\r\nThe code below joins the two dataframes. What I discovered by accident is that including 'zone' in the list of join terms avoids the error (example 1), as does specificying the length of the second data frame (example 2). Example 3 causes a crash. Importantly, 'zone' is not essential (other than maintaining it as a unique field in the joined table) because sites codes are unique within each zone, and thus I would expect the join to work regardless. The main question is why example 2 works, but not example 3. \r\n\r\nRegards, Nick\r\n\r\nlibrary(dplyr)\r\nload(\"bond_example.RData\")\r\nleft_join(df1, df2, by = c('date'='date', 'zone'='zone', 'site'='site')) #Example 1\r\nleft_join(df1, df2[1:1130,], by = c('date'='date', 'site'='site')) #Example 2\r\nleft_join(df1, df2, by = c('date'='date', 'site'='site')) #Example 3 "}}