R/funPharm.R
, R/getRxCuiViaATC.R
getRxCuiViaATC.Rd
This is a function to get RxCui via Anatomical Therapeutic Chemical Classification System(ATC) code
getRxCuiViaATC(df, AtcColName = ATC, cores = 8)
df | data.frame, a drug ingredient ATC code of the specific indication |
---|---|
AtcColName | a column name for ATC code of df |
cores | number of parallel operation |
Differ_ColName | if colum for NHINo of df is not named ATC |
A new data.table sample_atc_rxcui
with following columns.
RxCui
drug RxCui
ATC
drug ATC code
Users can obtain additional drug information via other drug integrated by RxCui, such as the contraindications and indications for drugs available in the MED-RT database of the US Veterans Bureau integrated by RxNorm. User inputs the data frame with drug column which encoded in ATC code, then the output will add a column named RxCui in the original input data frame.
# sample of getting RxCui via ATC. sample_atc_rxcui <- getRxCuiViaATC(df = sample_ATC,AtcColName = ATC,cores = 2)#> Error in df %>% select("ATC") %>% unique(): 沒有這個函數 "%>%"#> Error in head(sample_atc_rxcui): 找不到物件 'sample_atc_rxcui'