export {CALIBERdrugdose} | R Documentation |
Exports the singlewords, multiwords, patterns and lookups dictionaries to .csv files.
export(x, ...) ## S3 method for class 'drugdose_singlewords' export(x, filename) ## S3 method for class 'drugdose_multiwords' export(x, filename) ## S3 method for class 'drugdose_patterns' export(x, filename) ## S3 method for class 'drugdose_lookups' export(x, filename)
x |
An R object of class |
filename |
Name of .csv file to export to. |
... |
Generic arguments for |
Exports the dictionary as a comma separated values text file.
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
,
addterm
# Testing singlewords roundtrip data(singlewords) old_singlewords <- as.drugdose_singlewords(singlewords) export(old_singlewords, paste(tempdir(), 'singlewords.csv', sep = '/')) new_singlewords <- as.drugdose_singlewords(paste(tempdir(), 'singlewords.csv', sep = '/')) str(new_singlewords) # Testing multiwords roundtrip data(multiwords) old_multiwords <- as.drugdose_multiwords(multiwords) export(old_multiwords, paste(tempdir(), 'multiwords.csv', sep = '/')) new_multiwords <- as.drugdose_multiwords(paste(tempdir(), 'multiwords.csv', sep = '/')) str(new_multiwords) # Testing patterns roundtrip data(patterns) old_patterns <- as.drugdose_patterns(patterns) export(old_patterns, paste(tempdir(), 'patterns.csv', sep = '/')) new_patterns <- as.drugdose_patterns(paste(tempdir(), 'patterns.csv', sep = '/')) str(new_patterns)