1
0
mirror of https://github.com/msberends/AMR.git synced 2026-02-09 10:32:53 +01:00

Built site for AMR@3.0.1.9019: ba4c159

This commit is contained in:
github-actions
2026-02-08 22:40:23 +00:00
parent 0551ea51cb
commit 8b71d0eb99
255 changed files with 23625 additions and 810 deletions

View File

@@ -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="">3.0.1.9018</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9019</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">
@@ -50,7 +50,7 @@
</div>
<div class="ref-description section level2">
<p>Define custom EUCAST rules for your organisation or specific analysis and use the output of this function in <code><a href="eucast_rules.html">eucast_rules()</a></code>.</p>
<p>Define custom EUCAST rules for your organisation or specific analysis and use the output of this function in <code><a href="interpretive_rules.html">eucast_rules()</a></code>.</p>
</div>
<div class="section level2">
@@ -72,11 +72,11 @@
</div>
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>Some organisations have their own adoption of EUCAST rules. This function can be used to define custom EUCAST rules to be used in the <code><a href="eucast_rules.html">eucast_rules()</a></code> function.</p><div class="section">
<p>Some organisations have their own adoption of EUCAST rules. This function can be used to define custom EUCAST rules to be used in the <code><a href="interpretive_rules.html">eucast_rules()</a></code> function.</p><div class="section">
<h3 id="basics">Basics<a class="anchor" aria-label="anchor" href="#basics"></a></h3>
<p>If you are familiar with the <code><a href="https://dplyr.tidyverse.org/reference/case_when.html" class="external-link">case_when()</a></code> function of the <code>dplyr</code> package, you will recognise the input method to set your own rules. Rules must be set using what <span style="R">R</span> considers to be the 'formula notation'. The rule itself is written <em>before</em> the tilde (<code>~</code>) and the consequence of the rule is written <em>after</em> the tilde:</p>
<p>If you are familiar with the <code><a href="https://dplyr.tidyverse.org/reference/case-and-replace-when.html" class="external-link">case_when()</a></code> function of the <code>dplyr</code> package, you will recognise the input method to set your own rules. Rules must be set using what <span style="R">R</span> considers to be the 'formula notation'. The rule itself is written <em>before</em> the tilde (<code>~</code>) and the consequence of the rule is written <em>after</em> the tilde:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/custom_eucast_rules.html">custom_eucast_rules</a></span><span class="op">(</span><span class="va">TZP</span> <span class="op">==</span> <span class="st">"S"</span> <span class="op">~</span> <span class="va">aminopenicillins</span> <span class="op">==</span> <span class="st">"S"</span>,</span>
<span> <span class="va">TZP</span> <span class="op">==</span> <span class="st">"R"</span> <span class="op">~</span> <span class="va">aminopenicillins</span> <span class="op">==</span> <span class="st">"R"</span><span class="op">)</span></span></code></pre><p></p></div>
<p>These are two custom EUCAST rules: if TZP (piperacillin/tazobactam) is "S", all aminopenicillins (ampicillin and amoxicillin) must be made "S", and if TZP is "R", aminopenicillins must be made "R". These rules can also be printed to the console, so it is immediately clear how they work:</p>
@@ -98,7 +98,7 @@
<span><span class="co">#&gt; 1 Escherichia coli R S S</span></span>
<span><span class="co">#&gt; 2 Klebsiella pneumoniae R S S</span></span>
<span></span>
<span><span class="fu"><a href="../reference/eucast_rules.html">eucast_rules</a></span><span class="op">(</span><span class="va">df</span>,</span>
<span><span class="fu"><a href="../reference/interpretive_rules.html">eucast_rules</a></span><span class="op">(</span><span class="va">df</span>,</span>
<span> rules <span class="op">=</span> <span class="st">"custom"</span>,</span>
<span> custom_rules <span class="op">=</span> <span class="va">x</span>,</span>
<span> info <span class="op">=</span> <span class="cn">FALSE</span>,</span>
@@ -118,7 +118,7 @@
<span> <span class="va">TZP</span> <span class="op">==</span> <span class="st">"R"</span> <span class="op">&amp;</span> <span class="va">genus</span> <span class="op">==</span> <span class="st">"Klebsiella"</span> <span class="op">~</span> <span class="va">aminopenicillins</span> <span class="op">==</span> <span class="st">"R"</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu"><a href="../reference/eucast_rules.html">eucast_rules</a></span><span class="op">(</span><span class="va">df</span>,</span>
<span><span class="fu"><a href="../reference/interpretive_rules.html">eucast_rules</a></span><span class="op">(</span><span class="va">df</span>,</span>
<span> rules <span class="op">=</span> <span class="st">"custom"</span>,</span>
<span> custom_rules <span class="op">=</span> <span class="va">y</span>,</span>
<span> info <span class="op">=</span> <span class="cn">FALSE</span>,</span>
@@ -205,7 +205,7 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #0000BB;">amoxicillin</span> (AMX), <span style="color: #0000BB;">amoxicillin/clavulanic acid</span> (AMC), <span style="color: #0000BB;">ampicillin</span> (AMP)</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># run the custom rule set (verbose = TRUE will return a logbook instead of the data set):</span></span></span>
<span class="r-in"><span><span class="fu"><a href="eucast_rules.html">eucast_rules</a></span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span><span class="fu"><a href="interpretive_rules.html">eucast_rules</a></span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> rules <span class="op">=</span> <span class="st">"custom"</span>,</span></span>
<span class="r-in"><span> custom_rules <span class="op">=</span> <span class="va">x</span>,</span></span>
<span class="r-in"><span> info <span class="op">=</span> <span class="cn">FALSE</span>,</span></span>