Hi I want to merge df1 and df2 based on x.
df1<-tibble(x=c("TRP OVERSEAS STOCK |","PIMCO TOTAL RETURN FUND"),y=c(1,2))
df2<-tibble(x=c("AB Portfolios: AB Growth Fund; Class K Shares","PIMCO TOTAL RETURN FUND"),z=c(2020,2021))
However, when I use
fuzzy_join(df1, df2, match_fun = function(x,y) str_detect(y, x), by = "x")
It gives me the following output,
"TRP OVERSEAS STOCK |"
should not be matched with anything. But they are listed in the output. I'm wondering why does that happen and how to solve this issue? Thank you!!