Computes classification table and attaches it to original data. Data stays in long format.

classify_codes(.data, codes, diag_tbl)

## Arguments

.data tibble of register data which we want to study tibble which holds the classification details: needs to have variables 'regex' and 'label' 'regex' must hold a string with a regular expression defining classes. 'regex.rm' is optional, defines exceptions to 'regex' (these are not in the group they are named in) 'label' defines the names of the variables of classes (e.g. comorbidity indicators) name of the variable holding ICD-codes

## Examples

if (FALSE) {
x<-1
}