Approximate string matching between character vectors containing authors' names
(equivalents of R's native match
).
match_authors(
authors,
table,
weight = c(family = 0.9, name = 0.1),
max.dist = 0.2,
attr.dist = FALSE
)
author names to be approximately matched.
lookup table for matching.
weights associated with differences in family names and in first names.
maximum distance between strings to be matched.
logical; indicating whether to optionally return the distances
(weighted proporpion of names coincidences) as the "dist"
attribute of the return value.
Returns a vector of the positions of the closest matches of its first argument in its second.
When multiple matches with the same smallest distance exist, the first one is returned.
When no match is found NA_integer_
is returned.