manageLookups: Manage the Freetext Matching Algorithm lookup tables

Description Usage Arguments Value Author(s) References See Also Examples

Description

Import, export and modify lookup tables for the Freetext Matching Algorithm. Currently these functions do not verify that the format of the lookup is correct, but this feature may be added in the future. The format of the lookup tables is specified here: https://github.com/anoopshah/freetext-matching-algorithm-lookups/blob/master/README.md

Usage

1
2
3
importLookup(filename, use_CALIBERfma_dir_R)
exportLookup(lookup, filename)
addtoLookup(lookup, valuelist)

Arguments

lookup

a data.table containing a lookup table for the Freetext Matching Algorithm

valuelist

a list or data.frame containing the additional row(s) to append to the end of the lookup table

filename

file name to import or export lookup (either a full file path, or the file name alone if importing / exporting to the current directory or use_CALIBERfma_dir_R = TRUE)

use_CALIBERfma_dir_R

TRUE if the lookup table should be sought in the folder specified in the option 'CALIBERfma_dir_R'.

Value

importLookup and addtoLookup return the lookup as a data.table. exportLookup has no return value.

Author(s)

Anoop Shah

References

https://github.com/anoopshah/freetext-matching-algorithm-lookups/

See Also

fmaTest, doAnalysis, downloadFMA

Examples

1
2
3
4
5
6
mylookup <- data.table(medcode=1:2, readcode=c('246..00', '22A..00'))
addtoLookup(mylookup, list(medcode=3:4, readcode=c('229..00', '423..00')))
addtoLookup(mylookup,
	data.frame(medcode=3:4, readcode=c('229..00', '423..00')))
# any column not supplied is considered to be missing
addtoLookup(mylookup, data.table(medcode=3:4))

CALIBERfma documentation built on May 2, 2019, 5:25 p.m.