[R] Tuning string matching
bogdan romocea
br44114 at yahoo.com
Wed Jan 5 20:46:11 CET 2005
This is a rather complex problem. I'm not aware of an R function /
package that can do something like this, but in case you need to build
it from scratch read
http://support.sas.com/documentation/periodicals/obs/obswww15/index.html
If you're familiar with SAS you could translate the code to R.
HTH,
b.
-----Original Message-----
From: adi at roda.ro
Sent: Wednesday, January 05, 2005 12:36 PM
To: r-help at stat.math.ethz.ch
Subject: [R] Tuning string matching
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
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list