This function takes a table to replace the values of various columns with harmonised values listed in the project specific gazetteer.

matchOntology(
  table = NULL,
  columns = NULL,
  dataseries = NULL,
  ontology = NULL,
  beep = NULL,
  colsAsClass = TRUE,
  groupMatches = FALSE,
  verbose = FALSE
)

Arguments

table

[`data.frame(1)`][data.frame]
a table that contains columns that should be harmonised by matching with the gazetteer.

columns

[`character(1)`][character]
the columns containing the concepts

dataseries

[`character(1)`][character]
the source dataseries from which territories are sourced.

ontology

[onto]
path where the ontology/gazetteer is stored.

beep

[`integerish(1)`][integer]
Number specifying what sound to be played to signal the user that a point of interaction is reached by the program, see beep.

colsAsClass

[`logical(1)`][logical]
whether to match columns by their name with the respective classes, or with concepts of all classes.

groupMatches

[`logical(1)`][logical]
whether or not to group harmonized concepts when there are more than one match (for example for broader or narrower matches).

verbose

[`logical(1)`][logical]
whether or not to give detailed information on the process of this function.

Value

Returns a table that resembles the input table where the target columns were translated according to the provided ontology.