map: Map Terms

Description Usage Arguments Details Value Author(s) References Examples

View source: R/map.R

Description

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

Usage

1
2
3
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 [email protected]

References

See citation("bibliographica")

Examples

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

rOpenGov/bibliographica documentation built on Nov. 13, 2018, 5:59 a.m.