2

I have to identify payments that are not always transferred with the same combination of NAME - IBAN.

Let's say I have a table called "payments" that looks like this:

IBAN       NAME
ABCD       James Dito
ABCD       James D.
ABCD       J Dito
ABCD       Peter Oliver
EDFG       Ana Pirez
EDFG       ANA P.

What I would like to identify is that the iban "ABCD" corresponds normally to James Dito (or its fuzzy match) but one payment was transfer to the iban "ABCD" with a complete different name: Peter Oliver.

My idea is to do a group_by with fuzzy matching within each IBAN group, but I don't know how to do that.

Thus, the ideal output should look like this:

IBAN       NAME
ABCD       James Dito
ABCD       Peter Oliver
EDFG       Ana Pirez

Any help would be greatly appreciated.

Richard Telford
  • 9,558
  • 6
  • 38
  • 51
AllanLC
  • 167
  • 2
  • 11
  • 2
    Try the `stringdist` package. It has various methods for measuring distance between strings. You can probably use it to create a custom function for your requirements – Rohit Jun 15 '18 at 10:15

0 Answers0