string_list_to_int_cocktails {emcAdr} | R Documentation |
Function used to convert a string vector of drugs in form "drug1:drug2" to a vector of index of the ATC tree ex: c(ATC_index(drug1), ATC_index(drugs2))
Description
Function used to convert a string vector of drugs in form "drug1:drug2" to a vector of index of the ATC tree ex: c(ATC_index(drug1), ATC_index(drugs2))
Usage
string_list_to_int_cocktails(ATC_name, lines)
Arguments
ATC_name |
the ATC_name column of the ATC tree |
lines |
A string vector of drugs cocktail in the form "drug1:drug2:...:drug_n" |
Value
An R List that can be used by other algorithms (e.g. clustering algorithm)
Examples
data("ATC_Tree_UpperBound_2024")
string_list = c('hmg coa reductase inhibitors:nervous system',
'metformin:prasugrel')
string_list_to_int_cocktails(ATC_Tree_UpperBound_2024$Name,
string_list)
[Package emcAdr version 1.2 Index]