Basic ordered bar plot showing counts of each comorbidity
plot_comorbid(x, comorbid_fun = icd::comorbid_ahrq, ...) plot_comorbid_results( x, sort = TRUE, fix_margin = FALSE, las = 2, cex.names = 0.75, ... )
x | input patient data |
---|---|
comorbid_fun | Character name of function or function itself, default
being |
... | Passed to |
sort | Logical, default |
fix_margin | Logical, default |
las | Integer, default is 2 which rotates the x axis labels appropriately |
cex.names | Numeric, default is 0.75 which scales the text size for labels appropriately |
plot_comorbid_results
: Plot the results of a call to one of the
comorbidity settings.
if (FALSE) { library(icd) plot_comorbid(vermont_dx) plot_comorbid(uranium_pathology) # Or calculate the comorbidities, then plot the results cmb <- comorbid_ahrq(vermont_dx) # plot with full, not abbreviated names plot_comorbid_results(cmb, names.arg = names_ahrq) # or return with full names, and plot those: comorbid_ahrq(vermont_dx, abbrev_names = FALSE) %>% plot_comorbid_results() }