singlewords: Lookup Table for Replacing Individual Words

Description Usage Format Details References Examples

Description

A table of replacements for words that may be found in dosage texts. This enables different forms of the same word (e.g. tab, tablet, tabs) to be converted to a standardised form, to facilitate downstream processing. The table is converted to a named character vector by as.drugdose_singlewords for use in analysis.

Usage

1

Format

A data frame with observations on the following 2 variables.

replacement

character; replacement for words. If missing (NA), the word is left as it is (equivalent to setting replacement equal to words .

words

character; a single word

Details

Each entry in the 'words' column must be unique and must be a single word or punctuation character.

References

Shah AD, Martinez C. An algorithm to derive a numerical daily dose from unstructured text dosage instructions. Pharmacoepidemiol Drug Saf 2006; 15(3): 161-166. doi: 10.1002/pds.1151 http://onlinelibrary.wiley.com/doi/10.1002/pds.1151/

Examples

1
2
3
4
data("singlewords")

# Convert to singlewords dictionary for analysis
singlewords <- as.drugdose_singlewords(singlewords)

CALIBERdrugdose documentation built on Aug. 5, 2020, 3 p.m.