Calculate the Charlson Comorbidity Index

Share:

Description

generate_charlson_index_df merges a data frame of Charlson comorbidities with charlson_weights and sums the results per patient.

Usage

1
2
generate_charlson_index_df(df, idvar = "id",
  weights = medicalrisk::charlson_weights)

Arguments

df

a data frame with ID column idvar and logical columns for each comorbidity, such as that generated by generate_comorbidity_df

idvar

string with name of ID variable within df

weights

defaults to charlson_weights

Value

a dataframe with two columns, idvar and "index"

See Also

generate_comorbidity_df, charlson_weights, charlson_weights_orig

Examples

1
2
3
# calculate Charlson Comorbidity Index for all patients in the \code{\link{vt_inp_sample}}
data(vt_inp_sample)
generate_charlson_index_df(generate_comorbidity_df(vt_inp_sample))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.