Closed guoyi-smh closed 8 months ago
comorbidity_index() does not fill in 0 in the result index score properly when at_admission is set to TRUE. In the following part
comorbidity_index()
0
at_admission
TRUE
if (at_admission) { res <- all_diagnoses %>% select(genc_id) %>% unique() %>% full_join(res, by = c("genc_id" = "genc_id")) %>% tidyr::replace_na(list(score = 0)) }
replace_na(list(score = 0)) should be tidyr::replace_na(list(scores = 0))
replace_na(list(score = 0))
tidyr::replace_na(list(scores = 0))
comorbidity_index()
does not fill in0
in the result index score properly whenat_admission
is set toTRUE
. In the following partreplace_na(list(score = 0))
should betidyr::replace_na(list(scores = 0))