compress_lookup {DOPE} | R Documentation |
Collapse Redundant Rows of a Lookup Table
Description
Given a Drug Lookup table as returned by the function
lookup
, collapse rows from unwanted columns
Usage
compress_lookup(
lookupTable,
compressOriginalWord = FALSE,
compressClass = FALSE,
compressCategory = FALSE,
compressSynonym = TRUE
)
Arguments
lookupTable |
A lookup table with category |
compressOriginalWord |
Should the search word(s) be collapsed? Defaults to
|
compressClass |
Should the drug class be collapsed? Defaults to
|
compressCategory |
Should the drug category be collapsed? Defaults to
|
compressSynonym |
Should the drug synonym / street name be collapsed?
Defaults to |
Value
A compressed lookup table, with unwanted columns removed.
Examples
longExampleTable <- lookup("dope", "methamphetamine")
compress_lookup(longExampleTable)
compress_lookup(longExampleTable, compressCategory = TRUE)
[Package DOPE version 2.1.0 Index]