as.drugdose_multiwords: Import or Convert a drugdose_multiwords Table

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

View source: R/importexport.R

Description

Converts its argument into an object of the class drugdose_multiwords for use by the dose conversion algorithm.

Usage

1

Arguments

multiwords

Either a drugdose_multiwords object (in which case it is returned unchanged), a data.frame, data.table or filename of a csv file in the appropriate format, see 'Details' below.

Details

The data.frame, data.table or file should have the following columns:

words

character; regular expression to match dosage text in a standardised format (one space between words, no capitals)

replacement

character; replacement text

comments

character; comments

order

numeric; order in which the rules are applied

Value

A data.frame with class drugdose_multiwords.

Author(s)

Anoop Shah

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/

See Also

as.drugdose_singlewords, as.drugdose_multiwords as.drugdose_patterns, as.drugdose_lookups, export, addterm

Examples

1
2
3
4
data(multiwords)

# Convert to multiwords dictionary for analysis
multiwords <- as.drugdose_multiwords(multiwords)

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