Allows the user to match concepts with an already existing ontology, without actually writing into the ontology, but instead storing the resulting matching table as csv.

.editMatches(
  new,
  topLevel,
  source = NULL,
  ontology = NULL,
  matchDir = NULL,
  stringdist = TRUE,
  verbose = TRUE,
  beep = NULL
)

Arguments

new

data.frame(.)
the new concepts that shall be manually matched, includes "label", "class" and "has_broader" columns.

topLevel

logical(1)
whether or not the new concepts are at the highest level only, i.e., have to be matched without context, or whether they are contain columns that must be matched within parent columns.

source

character(1)
any character uniquely identifying the source dataset of the new concepts.

ontology

ontology(1)
either a path where the ontology is stored, or an already loaded ontology.

matchDir

character(1)
the directory where to store source-specific matching tables.

stringdist

logical(1)
whether or not to use string distance to find matches (should not be used for large datasets/when a memory error is shown).

verbose

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

beep

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

Value

A table that contains all new matches, or if none of the new concepts weren't already in the ontology, a table of the already sucessful matches.

Details

In order to match new concepts into an already existing ontology, it may become necessary to carry out manual matches of the new concepts with already harmonised concepts, for example, when the new concepts are described with terms that are not yet in the ontology. This function puts together a table, in which the user would edit matches by hand. Whith the argument verbose = TRUE, detailed information about the edit process are shown to the user. After defining matches, and even if not all necessary matches are finished, the function stores a specific "matching table" with the name match_SOURCE.csv in the respective directory (matchDir), from where work can be picked up and continued at another time.

Fuzzy matching is carried out and matches with 0, 1 or 2 differing charcters are presented in a respective column.