function takes a data frame with Charlson diagnosis groups as columns and generates a Charlson comorbidity index score for each row
1 | charl_score(x, cats = F)
|
x |
is a data frame with columns corresponding to the names defined in comorbs$charl_names |
cats |
is a logical indication of whether output should be the categorical 0, 1, 2 score or just the default count variable @return returns a vector of length = nrow(x) with charlson scores @export |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.