{"action":"closed","issue":{"url":"https://api.github.com/repos/matthieugomez/statar/issues/4","labels_url":"https://api.github.com/repos/matthieugomez/statar/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/matthieugomez/statar/issues/4/comments","events_url":"https://api.github.com/repos/matthieugomez/statar/issues/4/events","html_url":"https://github.com/matthieugomez/statar/issues/4","id":74805531,"number":4,"title":"Inputs to the fuzzy_join function","user":{"login":"xyya","id":12376900,"avatar_url":"https://avatars.githubusercontent.com/u/12376900?v=3","gravatar_id":"","url":"https://api.github.com/users/xyya","html_url":"https://github.com/xyya","followers_url":"https://api.github.com/users/xyya/followers","following_url":"https://api.github.com/users/xyya/following{/other_user}","gists_url":"https://api.github.com/users/xyya/gists{/gist_id}","starred_url":"https://api.github.com/users/xyya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xyya/subscriptions","organizations_url":"https://api.github.com/users/xyya/orgs","repos_url":"https://api.github.com/users/xyya/repos","events_url":"https://api.github.com/users/xyya/events{/privacy}","received_events_url":"https://api.github.com/users/xyya/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-10T01:52:17Z","updated_at":"2015-05-10T02:23:42Z","closed_at":"2015-05-10T02:23:42Z","body":"I'm having an issue with how the exact argument work in the fuzzy_join function. For example:\r\nHere' are the datasets:\r\n\r\n    x <- data.table(id=c(4,5),name=c('sa','qwr'),num=c(1,2))\r\n    y <- data.table(id=c(4,5),name=c('saq','qwrw'),num=c(2,2))\r\n\r\nThis works as expected:\r\n\r\n    test1 <- fuzzy_join(x,y,fuzzy='name')\r\nresults:\r\n\r\n         distance id.x name.x num.x id.y name.y num.y\r\n    1: 0.08888889    4     sa     1    4    saq     2\r\n    2: 0.05833333    5    qwr     2    5   qwrw     2\r\n\r\nThis doesn't work as expected:\r\n\r\n    test2 <- fuzzy_join(x,y,exact='id',fuzzy='name')\r\n\r\nresults:\r\n\r\n        distance id.x name.x num.x id.y name.y num.y\r\n    1: 0.3333333    4     sa     1   NA     NA    NA\r\n    2: 0.3333333    5    qwr     2   NA     NA    NA\r\n\r\nAlso this isn't what I expected either:\r\n\r\n    test3 <- fuzzy_join(x,y,exact=c('id','num'),fuzzy='name')\r\n\r\nI get the following error message with this example:\r\n\r\n    Error in .subset2(x, i, exact = exact) : subscript out of bounds\r\n\r\nIt'd be much appreciated if you can shed some light on how the exact argument works. Thank you."}}