Built site for AMR@3.0.1.9116: 53d0704

This commit is contained in:
github-actions committed 2026-10-11 18:49:41 +00:00
1 parent b4272847be
commit 53b2dad6a5
96 files changed
+892 -364

No files matched your search

+24 -27
View File
@@ -9,7 +9,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<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="">3.0.1.9115</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</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">
@@ -101,7 +101,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<dt id="arg-only-all-tested">only_all_tested<a class="anchor" aria-label="anchor" href="#arg-only-all-tested"></a></dt>
<dd><p>(for combination therapies, i.e. using more than one variable for <code>...</code>): a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate that isolates must be tested for all antimicrobials, see section <em>Combination Therapy</em> below.</p></dd>
<dd><p>(for combination therapies, i.e. using more than one variable for <code>...</code>): a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate that isolates must be tested for all antimicrobials, see section <em>Combination Therapy</em> below. Use <code><a href="sir_combine.html">sir_combine()</a></code> to create a new variable for a combination therapy.</p></dd>
<dt id="arg-guideline">guideline<a class="anchor" aria-label="anchor" href="#arg-guideline"></a></dt>
@@ -133,7 +133,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>These functions are meant to count isolates. Use the <code><a href="proportion.html">resistance()</a></code>/<code><a href="proportion.html">susceptibility()</a></code> functions to calculate microbial resistance/susceptibility.</p>
<p>The function <code>n_sir()</code> is an alias of <code>count_all()</code>. They can be used to count all available isolates, i.e. where all input antimicrobials have an available result (S, I or R). Their use is equal to <code>dplyr</code>'s <code><a href="https://dplyr.tidyverse.org/reference/n_distinct.html" class="external-link">n_distinct()</a></code>. Their function is equal to <code>count_susceptible(...) + count_resistant(...)</code>.</p>
<p>The function <code>n_sir()</code> is an alias of <code>count_all()</code>. They can be used to count all available isolates, i.e. where the input antimicrobial has an available result (S, I or R), or for multiple antimicrobials, where the result of the combination is available (see <em>Combination Therapy</em> below). Their use is equal to <code>dplyr</code>'s <code><a href="https://dplyr.tidyverse.org/reference/n_distinct.html" class="external-link">n_distinct()</a></code>. Their function is equal to <code>count_susceptible(...) + count_resistant(...)</code>.</p>
<p>The function <code>count_df()</code> takes any variable from <code>data</code> that has an <code><a href="as.sir.html">sir</a></code> class (created with <code><a href="as.sir.html">as.sir()</a></code>) and counts the number of S's, I's and R's. It also supports grouped variables. The function <code><a href="proportion.html">sir_df()</a></code> works exactly like <code>count_df()</code>, but adds the percentage of S, I and R.</p>
</div>
<div class="section level2">
@@ -147,30 +147,27 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<h2 id="combination-therapy">Combination Therapy<a class="anchor" aria-label="anchor" href="#combination-therapy"></a></h2>
<p>When using more than one variable for <code>...</code> (= combination therapy), use <code>only_all_tested</code> to only count isolates that are tested for all antimicrobials/variables that you test them for. See this example for two antimicrobials, Drug A and Drug B, about how <code><a href="proportion.html">susceptibility()</a></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>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> Drug A Drug B considered considered considered considered</span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a> susceptible tested susceptible tested</span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">-----------</span> <span class="sc">----------</span> <span class="sc">-----------</span> <span class="sc">----------</span></span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> S or I S or I X X X X</span>
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> R S or I X X X X</span>
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> S or I X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> S or I R X X X X</span>
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> R R <span class="sc">-</span> X <span class="sc">-</span> X</span>
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> R <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a> S or I <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-14"><a href="#cb1-14" tabindex="-1"></a> R <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-15"><a href="#cb1-15" tabindex="-1"></a> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-16"><a href="#cb1-16" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span></code></pre><p></p></div>
<p>Please note that, in combination therapies, for <code>only_all_tested = TRUE</code> applies that:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="fu">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="ot">=</span> <span class="fu">count_all</span>()</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="ot">=</span> <span class="dv">1</span></span></code></pre><p></p></div>
<p>and that, in combination therapies, for <code>only_all_tested = FALSE</code> applies that:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="fu">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="sc">&gt;=</span> <span class="fu">count_all</span>()</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="sc">&gt;=</span> <span class="dv">1</span></span></code></pre><p></p></div>
<p>Using <code>only_all_tested</code> has no impact when only using one antibiotic as input.</p>
<p>A combination of antimicrobials is considered as good as its most active antimicrobial. Results are ranked as follows, from best to worst:</p><ol><li><p><code>"S"</code> and <code>"WT"</code></p></li>
<li><p><code>"SDD"</code></p></li>
<li><p><code>"I"</code></p></li>
<li><p><code>"R"</code>, <code>"NWT"</code>, and <code>"NS"</code></p></li>
</ol><p>The result of the combination is the best result of the antimicrobials, i.e., the result keeps its original category instead of being reduced to only S or R. If antimicrobials have an equally ranked result, <code>"S"</code> is preferred over <code>"WT"</code>, and <code>"R"</code> over <code>"NWT"</code> and <code>"NS"</code>. The value <code>"NI"</code> (non-interpretable) is considered a missing result.</p>
<p>A missing result can only be ignored if the result of the combination is susceptible regardless of the missing result, which depends on the <code>only_all_tested</code> argument and on the guideline: under EUCAST, the 'I' category is considered susceptible (<em>susceptible, increased exposure</em>), and under CLSI, it is not. This is an example for two antimicrobials, Drug A and Drug B (the order of the antimicrobials does not matter):</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> Result of the combination</span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="sc">-----------------------------------------------------</span></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> Drug A Drug B 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-5"><a href="#cb1-5" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">----------------------------</span> <span class="sc">----------------------</span></span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a> S S, I, R S S</span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> I I, R I I</span>
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> R R R R</span>
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> S <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> S <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span></span>
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> I <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="fu">I</span> (EUCAST), <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> (CLSI) <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span></span>
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> R <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span></span>
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span></span>
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a><span class="sc">-------------------------------------------------------------------------</span></span></code></pre><p></p></div>
<p>The <code>count_*()</code> and <code><a href="proportion.html">proportion_*()</a></code> functions, such as <code><a href="proportion.html">susceptibility()</a></code> and <code><a href="proportion.html">resistance()</a></code>, apply exactly these rules when more than one variable is used: an isolate is considered tested if the result of the combination is not <code>NA</code>, and is then counted by the result of the combination. Consequently, <code>count_susceptible()</code> <code>+</code> <code>count_resistant()</code> <code>=</code> <code>count_all()</code>, and <code><a href="proportion.html">susceptibility()</a></code> <code>+</code> <code><a href="proportion.html">resistance()</a></code> <code>= 1</code>, for both values of <code>only_all_tested</code>. The guideline is taken from their <code>guideline</code> argument if they have one, and otherwise from the <code>AMR_guideline</code> option.</p>
<p>In <code><a href="antibiogram.html">antibiogram()</a></code> and <code><a href="antibiogram.html">wisca()</a></code>, the 'I' and 'SDD' categories are considered susceptible if <code>combine_SI = TRUE</code> (default), and the result of the combination is then reduced to S or R.</p>
</div>
<div class="section level2">
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>