【发布时间】:2019-11-14 00:14:37
【问题描述】:
我正在使用recordlinkeage 来查找重复项。我正在使用几种不同的搜索来识别对。我想合并我的成对集,以删除两种方法之间的重复项。我想拥有所有独特的对,它们在getPairs(y) 或getPairs(z) 中。作为最终产品,我想要一个包含所有独特组合的 data.frame。
library(RecordLinkage)
# Making some synthetic data
x <- rbind( mtcars , mtcars[2,])
x$name <- rownames( x )
x$nrid <- sample( 1:1000000 , nrow( x))
y = compare.dedup(
x,
blockfld=c("gear", "carb", "am", "name") ,
phonetic = "name" ,
phonfun = soundex)
z = compare.dedup(
x,
blockfld=c( "am", "name") ,
phonetic = "name" ,
phonfun = soundex)
# I know that I can see the details of my pairs
summary(y)
y <- getPairs(y)
z <- getPairs(z)
【问题讨论】:
标签: r record-linkage