This is an example R Markdown file to show the use of
antibiogram()
of the AMR package.
For starters, this is what our example_isolates
data set
looks like:
example_isolates
## # A tibble: 2,000 × 46
## date patient age gender ward mo PEN
## <date> <chr> <dbl> <chr> <chr> <mo> <sir>
## 1 2002-01-02 A77334 65 F Clini… B_ESCHR_COLI R
## 2 2002-01-03 A77334 65 F Clini… B_ESCHR_COLI R
## 3 2002-01-07 067927 45 F ICU B_STPHY_EPDR R
## 4 2002-01-07 067927 45 F ICU B_STPHY_EPDR R
## 5 2002-01-13 067927 45 F ICU B_STPHY_EPDR R
## 6 2002-01-13 067927 45 F ICU B_STPHY_EPDR R
## 7 2002-01-14 462729 78 M Clini… B_STPHY_AURS R
## 8 2002-01-14 462729 78 M Clini… B_STPHY_AURS R
## 9 2002-01-16 067927 45 F ICU B_STPHY_EPDR R
## 10 2002-01-17 858515 79 F ICU B_STPHY_EPDR R
## # … with 1,990 more rows, and 39 more variables: OXA <sir>,
## # FLC <sir>, AMX <sir>, AMC <sir>, AMP <sir>, TZP <sir>,
## # CZO <sir>, FEP <sir>, CXM <sir>, FOX <sir>, CTX <sir>,
## # CAZ <sir>, CRO <sir>, GEN <sir>, TOB <sir>, AMK <sir>,
## # KAN <sir>, TMP <sir>, SXT <sir>, NIT <sir>, FOS <sir>,
## # LNZ <sir>, CIP <sir>, MFX <sir>, VAN <sir>, TEC <sir>,
## # TCY <sir>, TGC <sir>, DOX <sir>, ERY <sir>, …
## # ℹ Use `print(n = ...)` to see more rows, and `colnames()` to see all variable names
Traditional Antibiogram
antibiogram(example_isolates,
antibiotics = c(aminoglycosides(), carbapenems()))
CNS (43-309) |
0 |
86 |
52 |
0 |
52 |
22 |
E. coli (0-462) |
100 |
98 |
100 |
|
100 |
97 |
E. faecalis (0-39) |
0 |
0 |
100 |
0 |
|
0 |
K. pneumoniae (0-58) |
|
90 |
100 |
|
100 |
90 |
P. aeruginosa (17-30) |
|
100 |
|
0 |
|
100 |
P. mirabilis (0-34) |
|
94 |
94 |
|
|
94 |
S. aureus (2-233) |
|
99 |
|
|
|
98 |
S. epidermidis (8-163) |
0 |
79 |
|
0 |
|
51 |
S. hominis (3-80) |
|
92 |
|
|
|
85 |
S. pneumoniae (11-117) |
0 |
0 |
|
0 |
|
0 |
Combined Antibiogram
antibiogram(example_isolates,
antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"))
CNS (29-274) |
30 |
97 |
|
E. coli (416-461) |
94 |
100 |
99 |
K. pneumoniae (53-58) |
89 |
93 |
93 |
P. aeruginosa (27-30) |
|
100 |
100 |
P. mirabilis (27-34) |
|
100 |
100 |
S. aureus (7-231) |
|
100 |
100 |
S. epidermidis (5-128) |
|
100 |
100 |
S. hominis (0-74) |
|
100 |
100 |
S. pneumoniae (112-112) |
100 |
100 |
100 |
Syndromic Antibiogram
antibiogram(example_isolates,
antibiotics = c(aminoglycosides(), carbapenems()),
syndromic_group = "ward")
Clinical |
CNS (23-205) |
|
89 |
57 |
|
57 |
26 |
ICU |
CNS (10-73) |
|
79 |
|
|
|
|
Outpatient |
CNS (3-31) |
|
84 |
|
|
|
|
Clinical |
E. coli (0-299) |
100 |
98 |
100 |
|
100 |
98 |
ICU |
E. coli (0-137) |
100 |
99 |
100 |
|
100 |
96 |
Clinical |
K. pneumoniae (0-51) |
|
92 |
100 |
|
100 |
92 |
Clinical |
P. mirabilis (0-30) |
|
100 |
|
|
|
100 |
Clinical |
S. aureus (2-150) |
|
99 |
|
|
|
97 |
ICU |
S. aureus (0-66) |
|
100 |
|
|
|
|
Clinical |
S. epidermidis (4-79) |
|
82 |
|
|
|
55 |
ICU |
S. epidermidis (4-75) |
|
72 |
|
|
|
41 |
Clinical |
S. hominis (1-45) |
|
96 |
|
|
|
94 |
Clinical |
S. pneumoniae (5-78) |
0 |
0 |
|
0 |
|
0 |
ICU |
S. pneumoniae (5-30) |
0 |
0 |
|
0 |
|
0 |
Weighted-Incidence Syndromic Combination Antibiogram (WISCA)
antibiogram(example_isolates,
antibiotics = c("AMC", "AMC+CIP", "TZP", "TZP+TOB"),
mo_transform = "gramstain",
minimum = 10, # this should be >= 30, but now just as example
syndromic_group = ifelse(example_isolates$age >= 65 &
example_isolates$gender == "M",
"WISCA Group 1", "WISCA Group 2"))
WISCA Group 1 |
Gram-negatief (261-285) |
76 |
95 |
89 |
99 |
WISCA Group 2 |
Gram-negatief (380-442) |
76 |
98 |
88 |
98 |
WISCA Group 1 |
Gram-positief (123-406) |
76 |
89 |
81 |
95 |
WISCA Group 2 |
Gram-positief (222-732) |
76 |
89 |
88 |
95 |