1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 06:02:01 +02:00

Built site for AMR@2.1.1.9078: 1278924

This commit is contained in:
github-actions
2024-09-22 09:55:27 +00:00
parent f769324f08
commit 62f6837a98
82 changed files with 587 additions and 531 deletions

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Generate Antibiogram: Traditional, Combined, Syndromic, or Weighted-Incidence Syndromic Combination (WISCA) — antibiogram • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.9/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.9/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Generate Antibiogram: Traditional, Combined, Syndromic, or Weighted-Incidence Syndromic Combination (WISCA) — antibiogram"><meta name="description" content="Generate an antibiogram, and communicate the results in plots or tables. These functions follow the logic of Klinker et al. and Barbieri et al. (see Source), and allow reporting in e.g. R Markdown and Quarto as well."><meta property="og:description" content="Generate an antibiogram, and communicate the results in plots or tables. These functions follow the logic of Klinker et al. and Barbieri et al. (see Source), and allow reporting in e.g. R Markdown and Quarto as well."><meta property="og:image" content="https://msberends.github.io/AMR/logo.svg"></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Generate Traditional, Combination, Syndromic, or WISCA Antibiograms — antibiogram • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.9/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.9/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Generate Traditional, Combination, Syndromic, or WISCA Antibiograms — antibiogram"><meta name="description" content="Create detailed antibiograms with options for traditional, combination, syndromic, and Bayesian WISCA methods. Based on the approaches of Klinker et al., Barbieri et al., and the Bayesian WISCA model (Weighted-Incidence Syndromic Combination Antibiogram) by Bielicki et al., this function provides flexible output formats including plots and tables, ideal for integration with R Markdown and Quarto reports."><meta property="og:description" content="Create detailed antibiograms with options for traditional, combination, syndromic, and Bayesian WISCA methods. Based on the approaches of Klinker et al., Barbieri et al., and the Bayesian WISCA model (Weighted-Incidence Syndromic Combination Antibiogram) by Bielicki et al., this function provides flexible output formats including plots and tables, ideal for integration with R Markdown and Quarto reports."><meta property="og:image" content="https://msberends.github.io/AMR/logo.svg"></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9077</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9078</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -48,13 +48,13 @@
</nav><div class="container template-reference-topic">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Generate Antibiogram: Traditional, Combined, Syndromic, or Weighted-Incidence Syndromic Combination (WISCA)</h1>
<img src="../logo.svg" class="logo" alt=""><h1>Generate Traditional, Combination, Syndromic, or WISCA Antibiograms</h1>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/R/antibiogram.R" class="external-link"><code>R/antibiogram.R</code></a></small>
<div class="d-none name"><code>antibiogram.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Generate an antibiogram, and communicate the results in plots or tables. These functions follow the logic of Klinker <em>et al.</em> and Barbieri <em>et al.</em> (see <em>Source</em>), and allow reporting in e.g. R Markdown and Quarto as well.</p>
<p>Create detailed antibiograms with options for traditional, combination, syndromic, and Bayesian WISCA methods. Based on the approaches of Klinker <em>et al.</em>, Barbieri <em>et al.</em>, and the Bayesian WISCA model (Weighted-Incidence Syndromic Combination Antibiogram) by Bielicki <em>et al.</em>, this function provides flexible output formats including plots and tables, ideal for integration with R Markdown and Quarto reports.</p>
</div>
<div class="section level2">
@ -63,11 +63,12 @@
<span> <span class="va">x</span>,</span>
<span> antibiotics <span class="op">=</span> <span class="fu"><a href="https://tidyselect.r-lib.org/reference/where.html" class="external-link">where</a></span><span class="op">(</span><span class="va">is.sir</span><span class="op">)</span>,</span>
<span> mo_transform <span class="op">=</span> <span class="st">"shortname"</span>,</span>
<span> ab_transform <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> ab_transform <span class="op">=</span> <span class="st">"name"</span>,</span>
<span> syndromic_group <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> add_total_n <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> add_total_n <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_all_tested <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> digits <span class="op">=</span> <span class="fl">0</span>,</span>
<span> formatting_type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_antibiogram_formatting_type"</span>, <span class="fl">10</span><span class="op">)</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> minimum <span class="op">=</span> <span class="fl">30</span>,</span>
@ -94,7 +95,8 @@
<div class="section level2">
<h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
<ul><li><p>Klinker KP <em>et al.</em> (2021). <strong>Antimicrobial stewardship and antibiograms: importance of moving beyond traditional antibiograms</strong>. <em>Therapeutic Advances in Infectious Disease</em>, May 5;8:20499361211011373; <a href="https://doi.org/10.1177/20499361211011373" class="external-link">doi:10.1177/20499361211011373</a></p></li>
<ul><li><p>Bielicki JA <em>et al.</em> (2016). <strong>Selecting appropriate empirical antibiotic regimens for paediatric bloodstream infections: application of a Bayesian decision model to local and pooled antimicrobial resistance surveillance data</strong> <em>Journal of Antimicrobial Chemotherapy</em> 71(3); <a href="https://doi.org/10.1093/jac/dkv397" class="external-link">doi:10.1093/jac/dkv397</a></p></li>
<li><p>Klinker KP <em>et al.</em> (2021). <strong>Antimicrobial stewardship and antibiograms: importance of moving beyond traditional antibiograms</strong>. <em>Therapeutic Advances in Infectious Disease</em>, May 5;8:20499361211011373; <a href="https://doi.org/10.1177/20499361211011373" class="external-link">doi:10.1177/20499361211011373</a></p></li>
<li><p>Barbieri E <em>et al.</em> (2021). <strong>Development of a Weighted-Incidence Syndromic Combination Antibiogram (WISCA) to guide the choice of the empiric antibiotic treatment for urinary tract infection in paediatric patients: a Bayesian approach</strong> <em>Antimicrobial Resistance &amp; Infection Control</em> May 1;10(1):74; <a href="https://doi.org/10.1186/s13756-021-00939-2" class="external-link">doi:10.1186/s13756-021-00939-2</a></p></li>
<li><p><strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 5th Edition</strong>, 2022, <em>Clinical and Laboratory Standards Institute (CLSI)</em>. <a href="https://clsi.org/standards/products/microbiology/documents/m39/" class="external-link">https://clsi.org/standards/products/microbiology/documents/m39/</a>.</p></li>
</ul></div>
@ -111,11 +113,11 @@
<dt id="arg-mo-transform">mo_transform<a class="anchor" aria-label="anchor" href="#arg-mo-transform"></a></dt>
<dd><p>a character to transform microorganism input - must be "name", "shortname", "gramstain", or one of the column names of the <a href="microorganisms.html">microorganisms</a> data set: "mo", "fullname", "status", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", "rank", "ref", "oxygen_tolerance", "source", "lpsn", "lpsn_parent", "lpsn_renamed_to", "mycobank", "mycobank_parent", "mycobank_renamed_to", "gbif", "gbif_parent", "gbif_renamed_to", "prevalence", or "snomed". Can also be <code>NULL</code> to not transform the input.</p></dd>
<dd><p>a character to transform microorganism input - must be <code>"name"</code>, <code>"shortname"</code> (default), <code>"gramstain"</code>, or one of the column names of the <a href="microorganisms.html">microorganisms</a> data set: "mo", "fullname", "status", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", "rank", "ref", "oxygen_tolerance", "source", "lpsn", "lpsn_parent", "lpsn_renamed_to", "mycobank", "mycobank_parent", "mycobank_renamed_to", "gbif", "gbif_parent", "gbif_renamed_to", "prevalence", or "snomed". Can also be <code>NULL</code> to not transform the input.</p></dd>
<dt id="arg-ab-transform">ab_transform<a class="anchor" aria-label="anchor" href="#arg-ab-transform"></a></dt>
<dd><p>a character to transform antibiotic input - must be one of the column names of the <a href="antibiotics.html">antibiotics</a> data set: "ab", "cid", "name", "group", "atc", "atc_group1", "atc_group2", "abbreviations", "synonyms", "oral_ddd", "oral_units", "iv_ddd", "iv_units", or "loinc". Can also be <code>NULL</code> to not transform the input.</p></dd>
<dd><p>a character to transform antibiotic input - must be one of the column names of the <a href="antibiotics.html">antibiotics</a> data set (defaults to "name"): "ab", "cid", "name", "group", "atc", "atc_group1", "atc_group2", "abbreviations", "synonyms", "oral_ddd", "oral_units", "iv_ddd", "iv_units", or "loinc". Can also be <code>NULL</code> to not transform the input.</p></dd>
<dt id="arg-syndromic-group">syndromic_group<a class="anchor" aria-label="anchor" href="#arg-syndromic-group"></a></dt>
@ -131,7 +133,11 @@
<dt id="arg-digits">digits<a class="anchor" aria-label="anchor" href="#arg-digits"></a></dt>
<dd><p>number of digits to use for rounding</p></dd>
<dd><p>number of digits to use for rounding the susceptibility percentage</p></dd>
<dt id="arg-formatting-type">formatting_type<a class="anchor" aria-label="anchor" href="#arg-formatting-type"></a></dt>
<dd><p>numeric value (112) indicating how the 'cells' of the antibiogram table should be formatted. See <em>Details</em> &gt; <em>Formatting Type</em> for a list of options.</p></dd>
<dt id="arg-col-mo">col_mo<a class="anchor" aria-label="anchor" href="#arg-col-mo"></a></dt>
@ -177,13 +183,33 @@
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>This function returns a table with values between 0 and 100 for <em>susceptibility</em>, not resistance.</p>
<p><strong>Remember that you should filter your data to let it contain only first isolates!</strong> This is needed to exclude duplicates and to reduce selection bias. Use <code><a href="first_isolate.html">first_isolate()</a></code> to determine them in your data set with one of the four available algorithms.</p>
<p>All types of antibiograms as listed below can be plotted (using <code><a href="https://ggplot2.tidyverse.org/reference/autoplot.html" class="external-link">ggplot2::autoplot()</a></code> or base <span style="R">R</span> <code><a href="plot.html">plot()</a></code>/<code><a href="https://rdrr.io/r/graphics/barplot.html" class="external-link">barplot()</a></code>). The <code>antibiogram</code> object can also be used directly in R Markdown / Quarto (i.e., <code>knitr</code>) for reports. In this case, <code><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">knitr::kable()</a></code> will be applied automatically and microorganism names will even be printed in italics at default (see argument <code>italicise</code>). You can also use functions from specific 'table reporting' packages to transform the output of <code>antibiogram()</code> to your needs, e.g. with <code>flextable::as_flextable()</code> or <code>gt::gt()</code>.</p><div class="section">
<p><strong>Remember that you should filter your data to let it contain only first isolates!</strong> This is needed to exclude duplicates and to reduce selection bias. Use <code><a href="first_isolate.html">first_isolate()</a></code> to determine them in your data set with one of the four available algorithms.</p><div class="section">
<h3 id="formatting-type">Formatting Type<a class="anchor" aria-label="anchor" href="#formatting-type"></a></h3>
<p>The formatting of the 'cells' of the table can be set with the argument <code>formatting_type</code>. In these examples, <code>5</code> is the susceptibility percentage, <code>15</code> the numerator, and <code>300</code> the denominator:</p><ol><li><p>5</p></li>
<li><p>15</p></li>
<li><p>300</p></li>
<li><p>15/300</p></li>
<li><p>5 (300)</p></li>
<li><p>5% (300)</p></li>
<li><p>5 (N=300)</p></li>
<li><p>5% (N=300)</p></li>
<li><p>5 (15/300)</p></li>
<li><p>5% (15/300)</p></li>
<li><p>5 (N=15/300)</p></li>
<li><p>5% (N=15/300)</p></li>
</ol><p>The default is <code>10</code>, which can be set globally with the <a href="AMR-options.html">package option</a> <code><a href="AMR-options.html">AMR_antibiogram_formatting_type</a></code>, e.g. <code>options(AMR_antibiogram_formatting_type = 5)</code>.</p>
<p>Set <code>digits</code> (defaults to <code>0</code>) to alter the rounding of the susceptibility percentage.</p>
</div>
<div class="section">
<h3 id="antibiogram-types">Antibiogram Types<a class="anchor" aria-label="anchor" href="#antibiogram-types"></a></h3>
<p>There are four antibiogram types, as proposed by Klinker <em>et al.</em> (2021, <a href="https://doi.org/10.1177/20499361211011373" class="external-link">doi:10.1177/20499361211011373</a>
), and they are all supported by <code>antibiogram()</code>:</p><ol><li><p><strong>Traditional Antibiogram</strong></p>
<p>There are four antibiogram types, as summarised by Klinker <em>et al.</em> (2021, <a href="https://doi.org/10.1177/20499361211011373" class="external-link">doi:10.1177/20499361211011373</a>
), and they are all supported by <code>antibiogram()</code>. Use WISCA whenever possible, since it provides precise coverage estimates by accounting for pathogen incidence and antimicrobial susceptibility. See the section <em>Why Use WISCA?</em> on this page.</p>
<p>The four antibiogram types:</p><ol><li><p><strong>Traditional Antibiogram</strong></p>
<p>Case example: Susceptibility of <em>Pseudomonas aeruginosa</em> to piperacillin/tazobactam (TZP)</p>
<p>Code example:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="fu"><a href="../reference/antibiogram.html">antibiogram</a></span><span class="op">(</span><span class="va">your_data</span>,</span>
@ -200,6 +226,7 @@
<span> antibiotics <span class="op">=</span> <span class="fu"><a href="../reference/antibiotic_class_selectors.html">penicillins</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> syndromic_group <span class="op">=</span> <span class="st">"ward"</span><span class="op">)</span></span></code></pre><p></p></div></li>
<li><p><strong>Weighted-Incidence Syndromic Combination Antibiogram (WISCA)</strong></p>
<p>WISCA enhances empirical antibiotic selection by weighting the incidence of pathogens in specific clinical syndromes and combining them with their susceptibility data. It provides an estimation of regimen coverage by aggregating pathogen incidences and susceptibilities across potential causative organisms. See also the section <em>Why Use WISCA?</em> on this page.</p>
<p>Case example: Susceptibility of <em>Pseudomonas aeruginosa</em> to TZP among respiratory specimens (obtained among ICU patients only) for male patients age &gt;=65 years with heart failure</p>
<p>Code example:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span></span>
@ -209,8 +236,15 @@
<span> syndromic_group <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="va">.</span><span class="op">$</span><span class="va">age</span> <span class="op">&gt;=</span> <span class="fl">65</span> <span class="op">&amp;</span></span>
<span> <span class="va">.</span><span class="op">$</span><span class="va">gender</span> <span class="op">==</span> <span class="st">"Male"</span> <span class="op">&amp;</span></span>
<span> <span class="va">.</span><span class="op">$</span><span class="va">condition</span> <span class="op">==</span> <span class="st">"Heart Disease"</span>,</span>
<span> <span class="st">"Study Group"</span>, <span class="st">"Control Group"</span><span class="op">)</span><span class="op">)</span></span></code></pre><p></p></div></li>
</ol><p>Note that for combination antibiograms, it is important to realise that susceptibility can be calculated in two ways, which can be set with the <code>only_all_tested</code> argument (default is <code>FALSE</code>). See this example for two antibiotics, Drug A and Drug B, about how <code>antibiogram()</code> works to calculate the %SI:</p>
<span> <span class="st">"Study Group"</span>, <span class="st">"Control Group"</span><span class="op">)</span><span class="op">)</span></span></code></pre><p></p></div>
<p>WISCA uses a sophisticated Bayesian decision model to combine both local and pooled antimicrobial resistance data. This approach not only evaluates local patterns but can also draw on multi-centre datasets to improve regimen accuracy, even in low-incidence infections like paediatric bloodstream infections (BSIs).</p></li>
</ol></div>
<div class="section">
<h3 id="inclusion-in-combination-antibiogram-and-syndromic-antibiogram">Inclusion in Combination Antibiogram and Syndromic Antibiogram<a class="anchor" aria-label="anchor" href="#inclusion-in-combination-antibiogram-and-syndromic-antibiogram"></a></h3>
<p>Note that for types 2 and 3 (Combination Antibiogram and Syndromic Antibiogram), it is important to realise that susceptibility can be calculated in two ways, which can be set with the <code>only_all_tested</code> argument (default is <code>FALSE</code>). See this example for two antibiotics, Drug A and Drug B, about how <code>antibiogram()</code> works to calculate the %SI:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="sc">-----------------------</span> <span class="sc">-----------------------</span></span>
@ -229,6 +263,26 @@
<span id="cb1-16"><a href="#cb1-16" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span></code></pre><p></p></div>
</div>
<div class="section">
<h3 id="plotting">Plotting<a class="anchor" aria-label="anchor" href="#plotting"></a></h3>
<p>All types of antibiograms as listed above can be plotted (using <code><a href="https://ggplot2.tidyverse.org/reference/autoplot.html" class="external-link">ggplot2::autoplot()</a></code> or base <span style="R">R</span>'s <code><a href="plot.html">plot()</a></code> and <code><a href="https://rdrr.io/r/graphics/barplot.html" class="external-link">barplot()</a></code>).</p>
<p>THe outcome of <code>antibiogram()</code> can also be used directly in R Markdown / Quarto (i.e., <code>knitr</code>) for reports. In this case, <code><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">knitr::kable()</a></code> will be applied automatically and microorganism names will even be printed in italics at default (see argument <code>italicise</code>).</p>
<p>You can also use functions from specific 'table reporting' packages to transform the output of <code>antibiogram()</code> to your needs, e.g. with <code>flextable::as_flextable()</code> or <code>gt::gt()</code>.</p>
</div>
</div>
<div class="section level2">
<h2 id="why-use-wisca-">Why Use WISCA?<a class="anchor" aria-label="anchor" href="#why-use-wisca-"></a></h2>
<p>WISCA is a powerful tool for guiding empirical antibiotic therapy because it provides precise coverage estimates by accounting for pathogen incidence and antimicrobial susceptibility. This is particularly important in empirical treatment, where the causative pathogen is often unknown at the outset. Traditional antibiograms do not reflect the weighted likelihood of specific pathogens based on clinical syndromes, which can lead to suboptimal treatment choices.</p>
<p>The Bayesian WISCA, as described by Bielicki <em>et al.</em> (2016), improves on earlier methods by handling uncertainties common in smaller datasets, such as low-incidence infections. This method offers a significant advantage by:</p><ol><li><p>Pooling Data from Multiple Sources:<br> WISCA uses pooled data from multiple hospitals or surveillance sources to overcome limitations of small sample sizes at individual institutions, allowing for more confident selection of narrow-spectrum antibiotics or combinations.</p></li>
<li><p>Bayesian Framework:<br> The Bayesian decision tree model accounts for both local data and prior knowledge (such as inherent resistance patterns) to estimate regimen coverage. It allows for a more precise estimation of coverage, even in cases where susceptibility data is missing or incomplete.</p></li>
<li><p>Incorporating Pathogen and Regimen Uncertainty:<br> WISCA allows clinicians to see the likelihood that an empirical regimen will be effective against all relevant pathogens, taking into account uncertainties related to both pathogen prevalence and antimicrobial resistance. This leads to better-informed, data-driven clinical decisions.</p></li>
<li><p>Scenarios for Optimising Treatment:<br> For hospitals or settings with low-incidence infections, WISCA helps determine whether local data is sufficient or if pooling with external data is necessary. It also identifies statistically significant differences or similarities between antibiotic regimens, enabling clinicians to choose optimal therapies with greater confidence.</p></li>
</ol><p>WISCA is essential in optimising empirical treatment by shifting away from broad-spectrum antibiotics, which are often overused in empirical settings. By offering precise estimates based on syndromic patterns and pooled data, WISCA supports antimicrobial stewardship by guiding more targeted therapy, reducing unnecessary broad-spectrum use, and combating the rise of antimicrobial resistance.</p>
</div>
<div class="section level2">
@ -267,18 +321,18 @@
<span class="r-msg co"><span class="r-pr">#&gt;</span> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An Antibiogram: 10 × 7</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Pathogen (N min-max)` AMK GEN IPM KAN MEM TOB</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> CoNS (43-309) 0 86 52 0 52 22</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> E. coli (0-462) 100 98 100 <span style="color: #BB0000;">NA</span> 100 97</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> E. faecalis (0-39) 0 0 100 0 <span style="color: #BB0000;">NA</span> 0</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> K. pneumoniae (0-58) <span style="color: #BB0000;">NA</span> 90 100 <span style="color: #BB0000;">NA</span> 100 90</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> P. aeruginosa (17-30) <span style="color: #BB0000;">NA</span> 100 <span style="color: #BB0000;">NA</span> 0 <span style="color: #BB0000;">NA</span> 100</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> P. mirabilis (0-34) <span style="color: #BB0000;">NA</span> 94 94 <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 94</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> S. aureus (2-233) <span style="color: #BB0000;">NA</span> 99 <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 98</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> S. epidermidis (8-163) 0 79 <span style="color: #BB0000;">NA</span> 0 <span style="color: #BB0000;">NA</span> 51</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> S. hominis (3-80) <span style="color: #BB0000;">NA</span> 92 <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 85</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> S. pneumoniae (11-117) 0 0 <span style="color: #BB0000;">NA</span> 0 <span style="color: #BB0000;">NA</span> 0</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Pathogen Amikacin Gentamicin Imipenem Kanamycin Meropenem Tobramycin</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> CoNS 0% (0/43) 86% (267/… 52% (25… 0% (0/43) 52% (25/… 22% (12/5…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> E. coli 100% (171/… 98% (451/… 100% (4… <span style="color: #BB0000;">NA</span> 100% (41… 97% (450/…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> E. faecalis 0% (0/39) 0% (0/39) 100% (3… 0% (0/39) <span style="color: #BB0000;">NA</span> 0% (0/39) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> K. pneumoniae <span style="color: #BB0000;">NA</span> 90% (52/5… 100% (5… <span style="color: #BB0000;">NA</span> 100% (53… 90% (52/5…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> P. aeruginosa <span style="color: #BB0000;">NA</span> 100% (30/… <span style="color: #BB0000;">NA</span> 0% (0/30) <span style="color: #BB0000;">NA</span> 100% (30/…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> P. mirabilis <span style="color: #BB0000;">NA</span> 94% (32/3… 94% (30… <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 94% (32/3…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> S. aureus <span style="color: #BB0000;">NA</span> 99% (231/… <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 98% (84/8…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> S. epidermidis 0% (0/44) 79% (128/… <span style="color: #BB0000;">NA</span> 0% (0/44) <span style="color: #BB0000;">NA</span> 51% (45/8…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> S. hominis <span style="color: #BB0000;">NA</span> 92% (74/8… <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 85% (53/6…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> S. pneumoniae 0% (0/117) 0% (0/117) <span style="color: #BB0000;">NA</span> 0% (0/11… <span style="color: #BB0000;">NA</span> 0% (0/117)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # Use `plot()` or `ggplot2::autoplot()` to create a plot of this antibiogram,</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span>
<span class="r-in"><span></span></span>
@ -290,10 +344,10 @@
<span class="r-msg co"><span class="r-pr">#&gt;</span> For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An Antibiogram: 2 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Pathogen (N min-max)` J01GB01 J01GB03 J01GB04 J01GB06</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Gram-negative (35-686) 96 96 0 98</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> Gram-positive (436-1170) 34 63 0 0</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Pathogen J01GB01 J01GB03 J01GB04 J01GB06 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Gram-negative 96% (658/686) 96% (659/684) 0% (0/35) 98% (251/256)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> Gram-positive 34% (228/665) 63% (740/1170) 0% (0/436) 0% (0/436) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # Use `plot()` or `ggplot2::autoplot()` to create a plot of this antibiogram,</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span>
<span class="r-in"><span></span></span>
@ -304,13 +358,13 @@
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An Antibiogram: 5 × 3</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Pathogen (N min-max)` Imipenem Meropenem</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Coagulase-negative Staphylococcus (CoNS) (48-48) 52 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> Enterococcus faecalis (0-38) 100 <span style="color: #BB0000;">NA</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Escherichia coli (418-422) 100 100</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> Klebsiella pneumoniae (51-53) 100 100</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">5</span> Proteus mirabilis (27-32) 94 <span style="color: #BB0000;">NA</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Pathogen Imipenem Meropenem </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Coagulase-negative Staphylococcus (CoNS) 52% (25/48) 52% (25/48) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> Enterococcus faecalis 100% (38/38) <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Escherichia coli 100% (422/422) 100% (418/418)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> Klebsiella pneumoniae 100% (51/51) 100% (53/53) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">5</span> Proteus mirabilis 94% (30/32) <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # Use `plot()` or `ggplot2::autoplot()` to create a plot of this antibiogram,</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span>
<span class="r-in"><span></span></span>
@ -323,10 +377,13 @@
<span class="r-in"><span> mo_transform <span class="op">=</span> <span class="st">"gramstain"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An Antibiogram: 2 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Pathogen (N min-max)` TZP `TZP + GEN` `TZP + TOB`</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Gram-negative (641-693) 88 99 98</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> Gram-positive (345-1044) 86 98 95</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Pathogen Piperacillin/tazobac…¹ Piperacillin/tazobac…² Piperacillin/tazobac…³</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Gram-neg… 88% (565/641) 99% (681/691) 98% (679/693) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> Gram-pos… 86% (296/345) 98% (1018/1044) 95% (524/550) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># abbreviated names: ¹​`Piperacillin/tazobactam`,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># ²​`Piperacillin/tazobactam + Gentamicin`,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># ³​`Piperacillin/tazobactam + Tobramycin`</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # Use `plot()` or `ggplot2::autoplot()` to create a plot of this antibiogram,</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span>
<span class="r-in"><span></span></span>
@ -338,10 +395,10 @@
<span class="r-in"><span> sep <span class="op">=</span> <span class="st">" &amp; "</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An Antibiogram: 2 × 3</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Pathogen (N min-max)` Ciprofloxacin `Ciprofloxacin &amp; Gentamicin`</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Gram-negative (684-694) 91 99</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> Gram-positive (724-847) 77 93</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Pathogen Ciprofloxacin `Ciprofloxacin &amp; Gentamicin`</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Gram-negative 91% (621/684) 99% (684/694) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> Gram-positive 77% (560/724) 93% (784/847) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # Use `plot()` or `ggplot2::autoplot()` to create a plot of this antibiogram,</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span>
<span class="r-in"><span></span></span>
@ -357,22 +414,23 @@
<span class="r-msg co"><span class="r-pr">#&gt;</span> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An Antibiogram: 14 × 8</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Syndromic Group` `Pathogen (N min-max)` AMK GEN IPM KAN MEM TOB</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> Clinical CoNS (23-205) <span style="color: #BB0000;">NA</span> 89 57 <span style="color: #BB0000;">NA</span> 57 26</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> ICU CoNS (10-73) <span style="color: #BB0000;">NA</span> 79 <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Outpatient CoNS (3-31) <span style="color: #BB0000;">NA</span> 84 <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical E. coli (0-299) 100 98 100 <span style="color: #BB0000;">NA</span> 100 98</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> ICU E. coli (0-137) 100 99 100 <span style="color: #BB0000;">NA</span> 100 96</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Clinical K. pneumoniae (0-51) <span style="color: #BB0000;">NA</span> 92 100 <span style="color: #BB0000;">NA</span> 100 92</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Clinical P. mirabilis (0-30) <span style="color: #BB0000;">NA</span> 100 <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 100</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> Clinical S. aureus (2-150) <span style="color: #BB0000;">NA</span> 99 <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 97</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> ICU S. aureus (0-66) <span style="color: #BB0000;">NA</span> 100 <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Clinical S. epidermidis (4-79) <span style="color: #BB0000;">NA</span> 82 <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 55</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">11</span> ICU S. epidermidis (4-75) <span style="color: #BB0000;">NA</span> 72 <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 41</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">12</span> Clinical S. hominis (1-45) <span style="color: #BB0000;">NA</span> 96 <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 94</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">13</span> Clinical S. pneumoniae (5-78) 0 0 <span style="color: #BB0000;">NA</span> 0 <span style="color: #BB0000;">NA</span> 0</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">14</span> ICU S. pneumoniae (5-30) 0 0 <span style="color: #BB0000;">NA</span> 0 <span style="color: #BB0000;">NA</span> 0</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Syndromic Group` Pathogen Amikacin Gentamicin Imipenem Kanamycin Meropenem</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> Clinical CoNS <span style="color: #BB0000;">NA</span> 89% (183/… 57% (20… <span style="color: #BB0000;">NA</span> 57% (20/…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> ICU CoNS <span style="color: #BB0000;">NA</span> 79% (58/7… <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Outpatient CoNS <span style="color: #BB0000;">NA</span> 84% (26/3… <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical E. coli 100% (1… 98% (291/… 100% (2… <span style="color: #BB0000;">NA</span> 100% (27…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> ICU E. coli 100% (5… 99% (135/… 100% (1… <span style="color: #BB0000;">NA</span> 100% (11…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Clinical K. pneumo <span style="color: #BB0000;">NA</span> 92% (47/5… 100% (4… <span style="color: #BB0000;">NA</span> 100% (46…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Clinical P. mirabi <span style="color: #BB0000;">NA</span> 100% (30/… <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> Clinical S. aureus <span style="color: #BB0000;">NA</span> 99% (148/… <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> ICU S. aureus <span style="color: #BB0000;">NA</span> 100% (66/… <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Clinical S. epider <span style="color: #BB0000;">NA</span> 82% (65/7… <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">11</span> ICU S. epider <span style="color: #BB0000;">NA</span> 72% (54/7… <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">12</span> Clinical S. hominis <span style="color: #BB0000;">NA</span> 96% (43/4… <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">13</span> Clinical S. pneumo… 0% (0/7… 0% (0/78) <span style="color: #BB0000;">NA</span> 0% (0/78) <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">14</span> ICU S. pneumo… 0% (0/3… 0% (0/30) <span style="color: #BB0000;">NA</span> 0% (0/30) <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 1 more variable: Tobramycin &lt;chr&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # Use `plot()` or `ggplot2::autoplot()` to create a plot of this antibiogram,</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span>
<span class="r-in"><span></span></span>
@ -393,10 +451,10 @@
<span class="r-msg co"><span class="r-pr">#&gt;</span> For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An Antibiogram: 2 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Grupo sindrómico` `Patógeno (N min-max)` Amikacina Gentamicina Tobramicina</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> No UCI E. coli (0-325) 100 98 98</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> UCI E. coli (0-137) 100 99 96</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Grupo sindrómico` Patógeno Amikacina Gentamicina Tobramicina </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> No UCI E. coli 100% (119/119) 98% (316/323) 98% (318/325)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> UCI E. coli 100% (52/52) 99% (135/137) 96% (132/137)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # Use `plot()` or `ggplot2::autoplot()` to create a plot of this antibiogram,</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span>
<span class="r-in"><span></span></span>
@ -414,12 +472,16 @@
<span class="r-in"><span> <span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An Antibiogram: 4 × 6</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Syndromic Group` `Pathogen (N min-max)` AMC `AMC + CIP` TZP `TZP + TOB`</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> WISCA Group 1 Gram-negative (261-285) 76 95 89 99</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> WISCA Group 2 Gram-negative (380-442) 76 98 88 98</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> WISCA Group 1 Gram-positive (123-406) 76 89 81 95</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> WISCA Group 2 Gram-positive (222-732) 76 89 88 95</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Syndromic Group` Pathogen Amoxicillin/clavulani…¹ Amoxicillin/clavulan…²</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> WISCA Group 1 Gram-negative 76% (216/285) 95% (270/284) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> WISCA Group 2 Gram-negative 76% (336/441) 98% (432/442) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> WISCA Group 1 Gram-positive 76% (310/406) 89% (347/392) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> WISCA Group 2 Gram-positive 76% (556/732) 89% (617/695) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># abbreviated names: ¹​`Amoxicillin/clavulanic acid`,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># ²​`Amoxicillin/clavulanic acid + Ciprofloxacin`</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 2 more variables: `Piperacillin/tazobactam` &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># `Piperacillin/tazobactam + Tobramycin` &lt;chr&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # Use `plot()` or `ggplot2::autoplot()` to create a plot of this antibiogram,</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span>
<span class="r-in"><span></span></span>
@ -439,12 +501,12 @@
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |Pathogen (N) | Piperacillin/tazobactam|</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |:---------------------|-----------------------:|</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |CoNS (33) | 30|</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |*E. coli* (416) | 94|</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |*K. pneumoniae* (53) | 89|</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |*S. pneumoniae* (112) | 100|</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |Pathogen |Piperacillin/tazobactam |</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |:---------------|:-----------------------|</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |CoNS |30% (10/33) |</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |*E. coli* |94% (393/416) |</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |*K. pneumoniae* |89% (47/53) |</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |*S. pneumoniae* |100% (112/112) |</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Generate plots with ggplot2 or base R --------------------------------</span></span></span>