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
)

Arguments

authors

author names to be approximately matched.

table

lookup table for matching.

weight

weights associated with differences in family names and in first names.

max.dist

maximum distance between strings to be matched.

attr.dist

logical; indicating whether to optionally return the distances (weighted proporpion of names coincidences) as the "dist" attribute of the return value.

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.

See also