[R] Tuning string matching

adi@roda.ro adi at roda.ro
Wed Jan 5 18:35:58 CET 2005


Dear list,

I spent about two hours searching on the message archive, with no avail.
I have a list of people that have to pass an on-line test, but only a fraction
of them do it. Moreover, as they input their names, the resulting string do not
always match the names I have in my database.

I would like to do two things:

1. Match any strings that are 90% the same
Example:
name1 <- "Harry Harrington"
name2 <- "Harry Harington"
I need a function that would declare those strings as a match (ideally having an
argument that would allow introducing 80% instead of 90%)

2. Arrange a final table that would take me from:

Table1 (the complete list of people from my database)
No Name
1  Byron C. Andrew
2  Friedman Bob
3  Harrington Harry

Table2 (the people having been tested)
No Name               Score
1  Harry Harington    13
2  Byron Andrew       28

to:

No Name1              Name2              Score
1  Byron C. Andrew    Byron Andrew       28
2  Friedman Bob
3  Harrington Harry   Harry Harington    13

Thank you in advance, any help is highly appreciated.
Adrian




More information about the R-help mailing list