Description Usage Arguments Functions Examples
Basic ordered bar plot showing counts of each comorbidity
1 2 3 4 5 6 7 8 9 10 | 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
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()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.