我需要一些帮助来理解这些函数的参数。我从帮助中拿出了榜样。 ## To see the transformation counts for the Levenshtein distance:
drop(attr(adist("kitten", "sitting", counts = TRUE), "counts"))
# ins del sub
# 1 0 2
ins,表示插入; del
我正尝试使用agrep命令进行模糊匹配。我有一个数据框,其中一列包含观众响应和另一个数据框,其中列出了段和子段。列受众响应包含作为子段名称的单词。例如: pattern$audience
[1] "(Deleted) Semasio » DE: Intent » Christmas Shopping"
[2] "(Old) AddThis - UK » Auto » General