x <- data.frame(
id = c(1, 1, 2, 2),
code = c("I10", "E119", "F200", "E110"),
stringsAsFactors = FALSE
)
comorbidity(x = x, id = "id", code = "code",
map = "charlson_icd10_quan", assign0 = FALSE)
comorbidity(x = x, id = "id", code = "code",
map = "elixhauser_icd10_quan", assign0 = FALSE)
Run the code above in your browser using DataLab