Skip to contents

This vignette shows how to usesummarise_hai() to total healthcare-associated infection (HAI) counts by infection type, age group, or sex.

library(haiInsight)
data("hai_data_clean")
head(hai_data_clean)
## # A tibble: 6 × 4
##   Age_Group Sex   Count Infection_Type
##   <chr>     <chr> <int> <chr>         
## 1 [0;0]     F         0 HAP           
## 2 [0;0]     M         0 HAP           
## 3 [1;4]     F         0 HAP           
## 4 [1;4]     M         0 HAP           
## 5 [5;9]     F         0 HAP           
## 6 [5;9]     M         0 HAP

Totals by infection type (with kable feature)

summarise_hai(hai_data_clean, by = "Infection_Type", as_kable = TRUE)
Summary of HAI cases by selected grouping variable.
Infection_Type Total
UTI 155
SSI 111
HAP 88
CDI 37
BSI 23

Totals by age group

summarise_hai(hai_data_clean)
## # A tibble: 5 × 2
##   Infection_Type Total
##   <chr>          <int>
## 1 UTI              155
## 2 SSI              111
## 3 HAP               88
## 4 CDI               37
## 5 BSI               23

Totals by sex (with kable feature)

summarise_hai(hai_data_clean, by = "Sex", as_kable = TRUE)
Summary of HAI cases by selected grouping variable.
Sex Total
F 212
M 202

Notes

  • hai_data_clean is derived from the BHAI package’s German PPS 2011 data.

  • Headline national estimates (cases, deaths, DALYs) are provided separately in hai_headlines for context, sourced from the published study.

Learn More

For more ways to compare or extend your visualisations of HAI data,
see the next vignette: summarising-hai.


Next vignette: Dive deeper into grouping and summarising results in summarising-hai.