as.drugdose_multiwords | R Documentation |
Converts its argument into an object of the class drugdose_multiwords for use by the dose conversion algorithm.
as.drugdose_multiwords(multiwords)
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. |
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
A data.frame with class drugdose_multiwords
.
Anoop Shah
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/
as.drugdose_singlewords
, as.drugdose_multiwords
as.drugdose_patterns
, as.drugdose_lookups
,
export
, addterm
data(multiwords)
# Convert to multiwords dictionary for analysis
multiwords <- as.drugdose_multiwords(multiwords)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.