ATCtoNumeric {emcAdr}R Documentation

Convert ATC Code for each patients to the corresponding DFS number of the ATC tree

Description

Convert ATC Code for each patients to the corresponding DFS number of the ATC tree

Usage

ATCtoNumeric(patientATC, tree)

Arguments

patientATC

: patients observations, for each patient we got a string containing taken medications (ATC code)

tree

: ATC tree (we assume that there is a column 'ATCCode' )

Value

a matrix of the same size as patientATC but containing integer that are the index of the corresponding ATC code.

Examples

 ATC_code <- c('A01AA30 A01AB03', 'A10AC30')
 ATCtoNumeric(ATC_code, ATC_Tree_UpperBound_2024)


[Package emcAdr version 1.2 Index]