generate_charlson_index_df: Calculate the Charlson Comorbidity Index

Description Usage Arguments Value See Also Examples

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))


Search within the medicalrisk package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.