Use this function to determine if a drug combination is part of a vector of other drug combinations. We take care only of pair-wise drug combinations and an internal check is done for alternative drug names, e.g. we check if A-B combination is included, but also for B-A.
is_comb_element_of(drug.comb, comb.vector)
drug.comb | a string in the form A-B (no spaces between the names and the hyphen '-') |
---|---|
comb.vector | a character vector of drug combinations, each one in the form drugname.1-drugname.2 |
logical, depending if the drug combination is element of the given vector or not.
#> [1] TRUE#> [1] TRUE#> [1] FALSE#> [1] FALSE