map: Map Terms

mapR Documentation

Map Terms

Description

Map between two sets of terms; used to harmonize data.

Usage

map(
  x,
  synonymes,
  remove.unknown = FALSE,
  mode = "exact.match",
  verbose = FALSE,
  from = "synonyme",
  to = "name",
  keep.names = FALSE
)

Arguments

x

A character vector

synonymes

synonyme table with the fields 'synonyme' and 'name'

remove.unknown

Logical. Remove terms that do not have synonymes.

mode

'exact.match' replaces the terms based on the synonyme list if an exact match is found; 'match' replaces the parts that match synonymes; 'recursive' replaces all (sub)strings recursively in the same order as in the synonyme table

verbose

verbose

from

field that will be replaced

to

field that contains the final names

keep.names

Keep the original names in the returned vector (may slow down analysis in large data sets)

Details

Map the input vector to harmonized versions based on the synonyme table.

Value

Vector of harmonized terms

Author(s)

Leo Lahti leo.lahti@iki.fi

References

See citation("bibliographica")

Examples

## Not run: x2 <- map(x, synonymes)

rOpenGov/bibliographica documentation built on April 10, 2022, 8:51 p.m.