2023-02-08 13:48:06 +01:00
|
|
|
---
|
|
|
|
title: "Generating antibiograms with the AMR package"
|
|
|
|
author: "AMR package developers"
|
|
|
|
date: "`r Sys.Date()`"
|
2023-02-24 09:43:10 +01:00
|
|
|
output: pdf_document
|
2023-02-08 13:48:06 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
```{r setup, include=FALSE}
|
|
|
|
knitr::opts_chunk$set(echo = TRUE, message = FALSE)
|
|
|
|
library(AMR)
|
|
|
|
```
|
|
|
|
|
|
|
|
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:
|
|
|
|
|
|
|
|
```{r}
|
|
|
|
example_isolates
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Traditional Antibiogram
|
|
|
|
|
|
|
|
```{r trad}
|
2023-02-23 16:27:40 +01:00
|
|
|
antibiogram(example_isolates,
|
|
|
|
antibiotics = c(aminoglycosides(), carbapenems()))
|
2023-02-08 13:48:06 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
### Combined Antibiogram
|
|
|
|
|
|
|
|
```{r comb}
|
2023-02-23 16:27:40 +01:00
|
|
|
antibiogram(example_isolates,
|
|
|
|
antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"))
|
2023-02-08 13:48:06 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
### Syndromic Antibiogram
|
|
|
|
|
|
|
|
```{r synd}
|
2023-02-23 16:27:40 +01:00
|
|
|
antibiogram(example_isolates,
|
|
|
|
antibiotics = c(aminoglycosides(), carbapenems()),
|
|
|
|
syndromic_group = "ward")
|
2023-02-08 13:48:06 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
### Weighted-Incidence Syndromic Combination Antibiogram (WISCA)
|
|
|
|
|
|
|
|
```{r wisca}
|
2023-02-23 16:27:40 +01:00
|
|
|
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"))
|
2023-02-08 13:48:06 +01:00
|
|
|
```
|