1
0
mirror of https://github.com/msberends/AMR.git synced 2025-12-17 06:20:19 +01:00

Built site for AMR@3.0.1.9004: 225c73f

This commit is contained in:
github-actions
2025-12-15 12:32:31 +00:00
parent 141fc468f8
commit 7c8d0f82f9
84 changed files with 283 additions and 231 deletions

View File

@@ -9,7 +9,7 @@ Breakpoints are currently implemented from EUCAST 2011-2025 and CLSI 2011-2025,
<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.9003</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9004</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">
@@ -67,8 +67,9 @@ Breakpoints are currently implemented from EUCAST 2011-2025 and CLSI 2011-2025,
<span><span class="fu">is_sir_eligible</span><span class="op">(</span><span class="va">x</span>, threshold <span class="op">=</span> <span class="fl">0.05</span><span class="op">)</span></span>
<span></span>
<span><span class="co"># Default S3 method</span></span>
<span><span class="fu">as.sir</span><span class="op">(</span><span class="va">x</span>, S <span class="op">=</span> <span class="st">"^(S|U)+$"</span>, I <span class="op">=</span> <span class="st">"^(I)+$"</span>, R <span class="op">=</span> <span class="st">"^(R)+$"</span>,</span>
<span> NI <span class="op">=</span> <span class="st">"^(N|NI|V)+$"</span>, SDD <span class="op">=</span> <span class="st">"^(SDD|D|H)+$"</span>, info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">as.sir</span><span class="op">(</span><span class="va">x</span>, S <span class="op">=</span> <span class="st">"^(S|U|1)+$"</span>, I <span class="op">=</span> <span class="st">"^(I|2)+$"</span>,</span>
<span> R <span class="op">=</span> <span class="st">"^(R|3)+$"</span>, NI <span class="op">=</span> <span class="st">"^(N|NI|V|4)+$"</span>, SDD <span class="op">=</span> <span class="st">"^(SDD|D|H|5)+$"</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="co"># S3 method for class 'mic'</span></span>
<span><span class="fu">as.sir</span><span class="op">(</span><span class="va">x</span>, mo <span class="op">=</span> <span class="cn">NULL</span>, ab <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/deparse.html" class="external-link">deparse</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/substitute.html" class="external-link">substitute</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
@@ -128,7 +129,7 @@ Breakpoints are currently implemented from EUCAST 2011-2025 and CLSI 2011-2025,
<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt>
<dd><p>For using on a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a>: selection of columns to apply <code>as.sir()</code> to. Supports <a href="https://tidyselect.r-lib.org/reference/starts_with.html" class="external-link">tidyselect language</a> such as <code>where(is.mic)</code>, <code>starts_with(...)</code>, or <code>column1:column4</code>, and can thus also be <a href="antimicrobial_selectors.html">antimicrobial selectors</a> such as <code>as.sir(df, penicillins())</code>.</p>
<dd><p>For using on a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a>: selection of columns to apply <code>as.sir()</code> to. Supports <a href="https://tidyselect.r-lib.org/reference/starts_with.html" class="external-link">tidyselect language</a> such as <code>where(is.mic)</code>, <code>starts_with(...)</code>, or <code>column1:column4</code>, and can thus also be <a href="antimicrobial_selectors.html">antimicrobial selectors</a>, e.g. <code>as.sir(df, penicillins())</code>.</p>
<p>Otherwise: arguments passed on to methods.</p></dd>
@@ -162,15 +163,15 @@ Breakpoints are currently implemented from EUCAST 2011-2025 and CLSI 2011-2025,
<dt id="arg-capped-mic-handling">capped_mic_handling<a class="anchor" aria-label="anchor" href="#arg-capped-mic-handling"></a></dt>
<dd><p>A <a href="https://rdrr.io/r/base/character.html" class="external-link">character</a> string that controls how MIC values with a cap (i.e., starting with <code>&lt;</code>, <code>&lt;=</code>, <code>&gt;</code>, or <code>&gt;=</code>) are interpreted. Supports the following options:</p>
<p><code>"none"</code></p><ul><li><p><code>&lt;=</code> and <code>&gt;=</code> are treated as-is.</p></li>
<li><p><code>&lt;</code> and <code>&gt;</code> are treated as-is.</p></li>
</ul><p><code>"conservative"</code></p><ul><li><p><code>&lt;=</code> and <code>&gt;=</code> return <code>"NI"</code> (non-interpretable) if the MIC is within the breakpoint guideline range.</p></li>
<li><p><code>&lt;</code> always returns <code>"S"</code>, and <code>&gt;</code> always returns <code>"R"</code>.</p></li>
</ul><p><code>"standard"</code> (default)</p><ul><li><p><code>&lt;=</code> and <code>&gt;=</code> return <code>"NI"</code> (non-interpretable) if the MIC is within the breakpoint guideline range.</p></li>
<li><p><code>&lt;</code> and <code>&gt;</code> are treated as-is.</p></li>
</ul><p><code>"inverse"</code></p><ul><li><p><code>&lt;=</code> and <code>&gt;=</code> are treated as-is.</p></li>
<li><p><code>&lt;</code> always returns <code>"S"</code>, and <code>&gt;</code> always returns <code>"R"</code>.</p></li>
</ul><p>The default <code>"standard"</code> setting ensures cautious handling of uncertain values while preserving interpretability. This option can also be set with the package option <code><a href="AMR-options.html">AMR_capped_mic_handling</a></code>.</p></dd>
<p><code>"none"</code></p><ul><li><p><code>&lt;=</code>, <code>&lt;</code>, <code>&gt;</code> and <code>&gt;=</code> are ignored.</p></li>
</ul><p><code>"conservative"</code> (default)</p><ul><li><p><code>&lt;=</code>, <code>&lt;</code>, <code>&gt;</code> and <code>&gt;=</code> return <code>"NI"</code> (non-interpretable) if the <em>true</em> MIC could be at either side of the breakpoint.</p></li>
<li><p>This is the only mode that preserves uncertainty for ECOFFs.</p></li>
</ul><p><code>"standard"</code></p><ul><li><p><code>&lt;=</code> and <code>&gt;=</code> return <code>"NI"</code> (non-interpretable) if the <em>true</em> MIC could be at either side of the breakpoint.</p></li>
<li><p><code>&lt;</code> always returns <code>"S"</code>, regardless of the breakpoint.</p></li>
<li><p><code>&gt;</code> always returns <code>"R"</code>, regardless of the breakpoint.</p></li>
</ul><p><code>"lenient"</code></p><ul><li><p><code>&lt;=</code> and <code>&lt;</code> always return <code>"S"</code>, regardless of the breakpoint.</p></li>
<li><p><code>&gt;=</code> and <code>&gt;</code> always return <code>"R"</code>, regardless of the breakpoint.</p></li>
</ul><p>The default <code>"conservative"</code> setting ensures cautious handling of uncertain values while preserving interpretability. This option can also be set with the package option <code><a href="AMR-options.html">AMR_capped_mic_handling</a></code>.</p></dd>
<dt id="arg-add-intrinsic-resistance">add_intrinsic_resistance<a class="anchor" aria-label="anchor" href="#arg-add-intrinsic-resistance"></a></dt>
@@ -251,7 +252,7 @@ Breakpoints are currently implemented from EUCAST 2011-2025 and CLSI 2011-2025,
<span></span>
<span><span class="co"># fast processing with parallel computing:</span></span>
<span><span class="fu"><a href="../reference/as.sir.html">as.sir</a></span><span class="op">(</span><span class="va">your_data</span>, <span class="va">...</span>, parallel <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre><p></p></div></li>
<li><p>Operators like "&lt;=" will be stripped before interpretation. When using <code>capped_mic_handling = "conservative"</code>, an MIC value of e.g. "&gt;2" will always return "R", even if the breakpoint according to the chosen guideline is "&gt;=4". This is to prevent that capped values from raw laboratory data would not be treated conservatively. The default behaviour (<code>capped_mic_handling = "standard"</code>) considers "&gt;2" to be lower than "&gt;=4" and might in this case return "S" or "I".</p></li>
<li><p>Operators like "&lt;=" will be considered according to the <code>capped_mic_handling</code> setting. At default, an MIC value of e.g. "&gt;2" will return "NI" (non-interpretable) if the breakpoint is 4-8; the <em>true</em> MIC could be at either side of the breakpoint. This is to prevent that capped values from raw laboratory data would not be treated conservatively.</p></li>
<li><p><strong>Note:</strong> When using CLSI as the guideline, MIC values must be log2-based doubling dilutions. Values not in this format, will be automatically rounded up to the nearest log2 level as CLSI instructs, and a warning will be thrown.</p></li>
</ul></li>
<li><p>For <strong>interpreting disk diffusion diameters</strong> according to EUCAST or CLSI. You must clean your disk zones first using <code><a href="as.disk.html">as.disk()</a></code>, that also gives your columns the new data class <code><a href="as.disk.html">disk</a></code>. Also, be sure to have a column with microorganism names or codes. It will be found automatically, but can be set manually using the <code>mo</code> argument.</p><ul><li><p>Example to apply using <code>dplyr</code>:</p>
@@ -415,10 +416,10 @@ Breakpoints are currently implemented from EUCAST 2011-2025 and CLSI 2011-2025,
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 4 × 18</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> datetime index method ab_given mo_given host_given input_given</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dttm&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&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> 2025-11-24 <span style="color: #949494;">10:38:56</span> 1 MIC amoxicillin Escherich… human 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2025-11-24 <span style="color: #949494;">10:38:56</span> 1 MIC cipro Escherich… human 0.256 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2025-11-24 <span style="color: #949494;">10:38:56</span> 1 DISK tobra Escherich… human 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> 2025-11-24 <span style="color: #949494;">10:38:56</span> 1 DISK genta Escherich… human 18 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2025-12-15 <span style="color: #949494;">12:29:02</span> 1 MIC amoxicillin Escherich… human 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2025-12-15 <span style="color: #949494;">12:29:02</span> 1 MIC cipro Escherich… human 0.256 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2025-12-15 <span style="color: #949494;">12:29:02</span> 1 DISK tobra Escherich… human 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> 2025-12-15 <span style="color: #949494;">12:29:03</span> 1 DISK genta Escherich… human 18 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 11 more variables: ab &lt;ab&gt;, mo &lt;mo&gt;, host &lt;chr&gt;, input &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># outcome &lt;sir&gt;, notes &lt;chr&gt;, guideline &lt;chr&gt;, ref_table &lt;chr&gt;, uti &lt;lgl&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># breakpoint_S_R &lt;chr&gt;, site &lt;chr&gt;</span></span>
@@ -624,8 +625,20 @@ Breakpoints are currently implemented from EUCAST 2011-2025 and CLSI 2011-2025,
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'sir'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] S SDD I R NI &lt;NA&gt; &lt;NA&gt; &lt;NA&gt;</span>
<span class="r-in"><span><span class="fu">as.sir</span><span class="op">(</span><span class="st">"&lt;= 0.002; S"</span><span class="op">)</span> <span class="co"># will return "S"</span></span></span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in <span style="background-color: #444444;">`as.sir()`</span>: 1 result in index '20' truncated (100%) that were invalid</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> antimicrobial interpretations: "&lt;= 0.002; S"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'sir'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] S</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] &lt;NA&gt;</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">as.sir</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">2</span>, <span class="fl">3</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #0000BB;"> in </span><span style="color: #0000BB; background-color: #444444;">`as.sir()`</span><span style="color: #0000BB;">: Interpreting input value 1 as "S", 2 as "I", and 3 as "R"</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'sir'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] S I R</span>
<span class="r-in"><span><span class="fu">as.sir</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">2</span>, <span class="fl">3</span><span class="op">)</span>, S <span class="op">=</span> <span class="fl">3</span>, I <span class="op">=</span> <span class="fl">2</span>, R <span class="op">=</span> <span class="fl">1</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #0000BB;"> in </span><span style="color: #0000BB; background-color: #444444;">`as.sir()`</span><span style="color: #0000BB;">: Interpreting input value 1 as "R", 2 as "I", and 3 as "S"</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'sir'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] R I S</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">sir_data</span> <span class="op">&lt;-</span> <span class="fu">as.sir</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"S"</span>, <span class="fl">474</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"I"</span>, <span class="fl">36</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"R"</span>, <span class="fl">370</span><span class="op">)</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">is.sir</span><span class="op">(</span><span class="va">sir_data</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TRUE</span>