# NOT RUN {
mydf <- data.frame(visit_name = c("a", "b", "c"),
icd9 = c("441", "412.93", "044.9"))
icd_charlson(mydf)
cmb <- icd9_comorbid_quan_deyo(mydf)
cmb
# can specify short_code directly instead of guessing
icd_charlson(mydf, short_code = FALSE, return_df = TRUE)
icd_charlson_from_comorbid(cmb)
# }
# NOT RUN {
# let's do five million patients and benchmark
big <- icd:::generate_random_pts(5E6)
microbenchmark::microbenchark(
icd_charlson(big),
times = 5
)
# }
Run the code above in your browser using DataLab