Creates a bar chart of total infections by a chosen variable.
Usage
plot_hai_totals(data, by = "Infection_Type", show_prop = FALSE, pal = NULL)
Arguments
- data
Data frame like hai_data_clean
- by
One of "Infection_Type", "Age_Group", or "Sex"
Examples
# data("hai_data_clean", package = "haiInsight")
# plot_hai_totals(hai_data_clean, by = "Infection_Type")
# plot_hai_totals(hai_data_clean, by = "Age_Group")
# plot_hai_totals(hai_data_clean, by = "Sex")