1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-25 18:06:12 +01:00

Built site for AMR: 1.8.2.9024@aa2c063

This commit is contained in:
github-actions 2022-10-20 14:14:41 +00:00
parent e2e3fa9184
commit f137d1a9e0
94 changed files with 633 additions and 584 deletions

View File

@ -36,7 +36,7 @@
<a class="navbar-brand me-2" href="https://msberends.github.io/AMR/index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -38,7 +38,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -162,7 +162,7 @@
<img src="../logo.svg" class="logo" alt=""><h1>How to conduct AMR data analysis</h1>
<h4 data-toc-skip class="author">Dr. Matthijs Berends</h4>
<h4 data-toc-skip class="date">19 October 2022</h4>
<h4 data-toc-skip class="date">20 October 2022</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/AMR.Rmd" class="external-link"><code>vignettes/AMR.Rmd</code></a></small>
<div class="d-none name"><code>AMR.Rmd</code></div>
@ -170,7 +170,7 @@
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/" class="external-link">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 19 October 2022.</p>
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/" class="external-link">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 20 October 2022.</p>
<div class="section level2">
<h2 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a>
</h2>
@ -201,21 +201,21 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2022-10-19</td>
<td align="center">2022-10-20</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
</tr>
<tr class="even">
<td align="center">2022-10-19</td>
<td align="center">2022-10-20</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">R</td>
</tr>
<tr class="odd">
<td align="center">2022-10-19</td>
<td align="center">2022-10-20</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -325,42 +325,20 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2010-03-04</td>
<td align="center">Q1</td>
<td align="center">Hospital A</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2016-12-24</td>
<td align="center">I6</td>
<td align="center">2017-10-03</td>
<td align="center">E4</td>
<td align="center">Hospital B</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2016-04-30</td>
<td align="center">K3</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2014-02-16</td>
<td align="center">W5</td>
<td align="center">Hospital B</td>
<td align="center">2015-05-08</td>
<td align="center">U7</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
@ -369,23 +347,45 @@
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2012-07-09</td>
<td align="center">J8</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2011-07-03</td>
<td align="center">J2</td>
<td align="center">2017-03-19</td>
<td align="center">T10</td>
<td align="center">Hospital C</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2014-07-20</td>
<td align="center">Y4</td>
<td align="center">Hospital A</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2016-10-10</td>
<td align="center">A2</td>
<td align="center">Hospital B</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2016-06-07</td>
<td align="center">H6</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
@ -422,16 +422,16 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</td>
<td align="right">10,463</td>
<td align="right">52.32%</td>
<td align="right">10,463</td>
<td align="right">52.32%</td>
<td align="right">10,433</td>
<td align="right">52.16%</td>
<td align="right">10,433</td>
<td align="right">52.16%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,537</td>
<td align="right">47.69%</td>
<td align="right">9,567</td>
<td align="right">47.84%</td>
<td align="right">20,000</td>
<td align="right">100.00%</td>
</tr>
@ -488,7 +488,7 @@ Longest: 1</p>
<span><span class="co"># Basing inclusion on all antimicrobial results, using a points threshold of</span></span>
<span><span class="co"># 2</span></span>
<span><span class="co"># Including isolates from ICU.</span></span>
<span><span class="co"># =&gt; Found 10,669 'phenotype-based' first isolates (53.3% of total where a</span></span>
<span><span class="co"># =&gt; Found 10,659 'phenotype-based' first isolates (53.3% of total where a</span></span>
<span><span class="co"># microbial ID was available)</span></span></code></pre></div>
<p>So only 53.3% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r">
@ -499,10 +499,10 @@ Longest: 1</p>
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="../reference/first_isolate.html">filter_first_isolate</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="co"># Including isolates from ICU.</span></span></code></pre></div>
<p>So we end up with 10,669 isolates for analysis. Now our data looks like:</p>
<p>So we end up with 10,659 isolates for analysis. Now our data looks like:</p>
<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">data_1st</span><span class="op">)</span></span></code></pre></div>
<table class="table">
<table style="width:100%;" class="table">
<colgroup>
<col width="2%">
<col width="9%">
@ -515,7 +515,7 @@ Longest: 1</p>
<col width="3%">
<col width="6%">
<col width="11%">
<col width="11%">
<col width="12%">
<col width="9%">
<col width="5%">
</colgroup>
@ -538,98 +538,98 @@ Longest: 1</p>
<tbody>
<tr class="odd">
<td align="left">1</td>
<td align="center">2010-03-04</td>
<td align="center">Q1</td>
<td align="center">Hospital A</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="center">2017-10-03</td>
<td align="center">E4</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Klebsiella</td>
<td align="center">pneumoniae</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="center">2016-12-24</td>
<td align="center">I6</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">6</td>
<td align="center">2011-07-03</td>
<td align="center">J2</td>
<td align="center">Hospital C</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">7</td>
<td align="center">2011-05-07</td>
<td align="center">F3</td>
<td align="center">Hospital B</td>
<td align="center">2015-05-08</td>
<td align="center">U7</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="center">2017-03-19</td>
<td align="center">T10</td>
<td align="center">Hospital C</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">5</td>
<td align="center">2016-10-10</td>
<td align="center">A2</td>
<td align="center">Hospital B</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">9</td>
<td align="center">2017-04-03</td>
<td align="center">O7</td>
<td align="center">Hospital B</td>
<td align="center">2011-08-27</td>
<td align="center">E1</td>
<td align="center">Hospital D</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">10</td>
<td align="center">2012-08-29</td>
<td align="center">O9</td>
<td align="left">14</td>
<td align="center">2016-07-02</td>
<td align="center">D8</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
</tbody>
@ -653,8 +653,8 @@ Longest: 1</p>
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">genus</span>, <span class="va">species</span><span class="op">)</span></span></code></pre></div>
<p><strong>Frequency table</strong></p>
<p>Class: character<br>
Length: 10,669<br>
Available: 10,669 (100.0%, NA: 0 = 0.0%)<br>
Length: 10,659<br>
Available: 10,659 (100.0%, NA: 0 = 0.0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -671,33 +671,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">4,646</td>
<td align="right">43.55%</td>
<td align="right">4,646</td>
<td align="right">43.55%</td>
<td align="right">4,656</td>
<td align="right">43.68%</td>
<td align="right">4,656</td>
<td align="right">43.68%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">2,725</td>
<td align="right">25.54%</td>
<td align="right">7,371</td>
<td align="right">69.09%</td>
<td align="right">2,663</td>
<td align="right">24.98%</td>
<td align="right">7,319</td>
<td align="right">68.66%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">2,140</td>
<td align="right">20.06%</td>
<td align="right">9,511</td>
<td align="right">89.15%</td>
<td align="right">2,150</td>
<td align="right">20.17%</td>
<td align="right">9,469</td>
<td align="right">88.84%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,158</td>
<td align="right">10.85%</td>
<td align="right">10,669</td>
<td align="right">1,190</td>
<td align="right">11.16%</td>
<td align="right">10,659</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -716,14 +716,14 @@ Longest: 24</p>
<col width="9%">
<col width="9%">
<col width="9%">
<col width="11%">
<col width="10%">
<col width="3%">
<col width="3%">
<col width="3%">
<col width="3%">
<col width="6%">
<col width="11%">
<col width="11%">
<col width="12%">
<col width="9%">
<col width="5%">
</colgroup>
@ -744,72 +744,42 @@ Longest: 24</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2016-12-24</td>
<td align="center">I6</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2011-07-03</td>
<td align="center">J2</td>
<td align="center">Hospital C</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2017-04-03</td>
<td align="center">O7</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2014-08-04</td>
<td align="center">H1</td>
<td align="center">2017-03-19</td>
<td align="center">T10</td>
<td align="center">Hospital C</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2010-04-30</td>
<td align="center">J8</td>
<tr class="even">
<td align="center">2011-08-27</td>
<td align="center">E1</td>
<td align="center">Hospital D</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2011-07-28</td>
<td align="center">L7</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
@ -819,18 +789,48 @@ Longest: 24</p>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2010-07-17</td>
<td align="center">Y3</td>
<td align="center">2013-02-23</td>
<td align="center">O8</td>
<td align="center">Hospital C</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2015-07-29</td>
<td align="center">V3</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2011-04-12</td>
<td align="center">B4</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
</tbody>
@ -854,50 +854,50 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">AMX</td>
<td align="center">2135</td>
<td align="center">140</td>
<td align="center">2371</td>
<td align="center">4646</td>
<td align="center">2234</td>
<td align="center">119</td>
<td align="center">2303</td>
<td align="center">4656</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">AMC</td>
<td align="center">3388</td>
<td align="center">166</td>
<td align="center">1092</td>
<td align="center">4646</td>
<td align="center">3425</td>
<td align="center">159</td>
<td align="center">1072</td>
<td align="center">4656</td>
</tr>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">3397</td>
<td align="center">3372</td>
<td align="center">0</td>
<td align="center">1249</td>
<td align="center">4646</td>
<td align="center">1284</td>
<td align="center">4656</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">4031</td>
<td align="center">4049</td>
<td align="center">0</td>
<td align="center">615</td>
<td align="center">4646</td>
<td align="center">607</td>
<td align="center">4656</td>
</tr>
<tr class="odd">
<td align="center">K. pneumoniae</td>
<td align="center">AMX</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">1158</td>
<td align="center">1158</td>
<td align="center">1190</td>
<td align="center">1190</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">AMC</td>
<td align="center">918</td>
<td align="center">42</td>
<td align="center">198</td>
<td align="center">1158</td>
<td align="center">914</td>
<td align="center">41</td>
<td align="center">235</td>
<td align="center">1190</td>
</tr>
</tbody>
</table>
@ -920,34 +920,34 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">4031</td>
<td align="center">4049</td>
<td align="center">0</td>
<td align="center">615</td>
<td align="center">4646</td>
<td align="center">607</td>
<td align="center">4656</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">GEN</td>
<td align="center">1057</td>
<td align="center">1059</td>
<td align="center">0</td>
<td align="center">101</td>
<td align="center">1158</td>
<td align="center">131</td>
<td align="center">1190</td>
</tr>
<tr class="odd">
<td align="center">S. aureus</td>
<td align="center">GEN</td>
<td align="center">2431</td>
<td align="center">2365</td>
<td align="center">0</td>
<td align="center">294</td>
<td align="center">2725</td>
<td align="center">298</td>
<td align="center">2663</td>
</tr>
<tr class="even">
<td align="center">S. pneumoniae</td>
<td align="center">GEN</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">2140</td>
<td align="center">2140</td>
<td align="center">2150</td>
<td align="center">2150</td>
</tr>
</tbody>
</table>
@ -961,7 +961,7 @@ Longest: 24</p>
<p>As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (<code><a href="../reference/proportion.html">proportion_R()</a></code>, equal to <code><a href="../reference/proportion.html">resistance()</a></code>) and susceptibility as the proportion of S and I (<code><a href="../reference/proportion.html">proportion_SI()</a></code>, equal to <code><a href="../reference/proportion.html">susceptibility()</a></code>). These functions can be used on their own:</p>
<div class="sourceCode" id="cb26"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMX</span><span class="op">)</span></span>
<span><span class="co"># [1] 0.5476614</span></span></code></pre></div>
<span><span class="co"># [1] 0.5378553</span></span></code></pre></div>
<p>Or can be used in conjunction with <code><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb27"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
@ -975,19 +975,19 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5541245</td>
<td align="center">0.5398944</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5501455</td>
<td align="center">0.5323505</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5269306</td>
<td align="center">0.5494168</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5483716</td>
<td align="center">0.5354147</td>
</tr>
</tbody>
</table>
@ -1008,23 +1008,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5541245</td>
<td align="center">3261</td>
<td align="center">0.5398944</td>
<td align="center">3221</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5501455</td>
<td align="center">3779</td>
<td align="center">0.5323505</td>
<td align="center">3663</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5269306</td>
<td align="center">1541</td>
<td align="center">0.5494168</td>
<td align="center">1629</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5483716</td>
<td align="center">2088</td>
<td align="center">0.5354147</td>
<td align="center">2146</td>
</tr>
</tbody>
</table>
@ -1047,27 +1047,27 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.7649591</td>
<td align="center">0.8676281</td>
<td align="center">0.9750323</td>
<td align="center">0.7697595</td>
<td align="center">0.8696306</td>
<td align="center">0.9765893</td>
</tr>
<tr class="even">
<td align="center">Klebsiella</td>
<td align="center">0.8290155</td>
<td align="center">0.9127807</td>
<td align="center">0.9818653</td>
<td align="center">0.8025210</td>
<td align="center">0.8899160</td>
<td align="center">0.9781513</td>
</tr>
<tr class="odd">
<td align="center">Staphylococcus</td>
<td align="center">0.7893578</td>
<td align="center">0.8921101</td>
<td align="center">0.9809174</td>
<td align="center">0.7972212</td>
<td align="center">0.8880961</td>
<td align="center">0.9831018</td>
</tr>
<tr class="even">
<td align="center">Streptococcus</td>
<td align="center">0.5341121</td>
<td align="center">0.5530233</td>
<td align="center">0.0000000</td>
<td align="center">0.5341121</td>
<td align="center">0.5530233</td>
</tr>
</tbody>
</table>
@ -1092,23 +1092,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="left">Hospital A</td>
<td align="right">55.4%</td>
<td align="right">27.2%</td>
<td align="right">54.0%</td>
<td align="right">25.8%</td>
</tr>
<tr class="even">
<td align="left">Hospital B</td>
<td align="right">55.0%</td>
<td align="right">26.8%</td>
<td align="right">53.2%</td>
<td align="right">26.7%</td>
</tr>
<tr class="odd">
<td align="left">Hospital C</td>
<td align="right">52.7%</td>
<td align="right">27.3%</td>
<td align="right">54.9%</td>
<td align="right">26.8%</td>
</tr>
<tr class="even">
<td align="left">Hospital D</td>
<td align="right">54.8%</td>
<td align="right">25.9%</td>
<td align="right">53.5%</td>
<td align="right">26.2%</td>
</tr>
</tbody>
</table>
@ -1206,16 +1206,18 @@ Longest: 24</p>
<code class="sourceCode R"><span><span class="va">mic_values</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/random.html">random_mic</a></span><span class="op">(</span>size <span class="op">=</span> <span class="fl">100</span><span class="op">)</span></span>
<span><span class="va">mic_values</span></span>
<span><span class="co"># Class 'mic'</span></span>
<span><span class="co"># [1] 0.01 128 0.005 2 0.002 0.025 128 0.001 4 128 </span></span>
<span><span class="co"># [11] 32 128 0.002 0.025 2 128 8 16 0.002 0.005 </span></span>
<span><span class="co"># [21] 0.005 0.0625 0.0625 2 0.5 0.25 0.001 4 32 &gt;=256 </span></span>
<span><span class="co"># [31] 0.25 &gt;=256 0.125 4 0.001 32 16 0.25 0.025 0.002 </span></span>
<span><span class="co"># [41] 32 128 64 16 0.001 64 0.025 0.125 0.025 &gt;=256 </span></span>
<span><span class="co"># [51] &gt;=256 1 0.0625 32 0.025 16 8 0.025 0.025 &gt;=256 </span></span>
<span><span class="co"># [61] 0.0625 0.01 0.002 0.025 0.002 0.002 0.5 64 0.25 0.5 </span></span>
<span><span class="co"># [71] 64 0.0625 1 0.0625 2 0.0625 0.25 0.25 32 1 </span></span>
<span><span class="co"># [81] 4 0.005 128 0.5 0.001 16 0.25 16 0.5 &gt;=256 </span></span>
<span><span class="co"># [91] 0.002 32 0.005 16 16 128 0.025 0.0625 128 0.001</span></span></code></pre></div>
<span><span class="co"># [1] 0.01 0.025 128 0.25 0.01 0.025 8 0.005 0.01 </span></span>
<span><span class="co"># [10] 0.5 0.01 0.025 &lt;=0.001 128 0.0625 0.5 0.005 4 </span></span>
<span><span class="co"># [19] 0.5 0.25 16 0.005 16 16 0.5 &lt;=0.001 4 </span></span>
<span><span class="co"># [28] 8 0.0625 16 2 4 &lt;=0.001 0.125 0.002 32 </span></span>
<span><span class="co"># [37] 0.0625 0.5 0.5 0.5 0.125 4 0.01 4 8 </span></span>
<span><span class="co"># [46] 64 128 256 128 2 1 256 2 8 </span></span>
<span><span class="co"># [55] 0.01 &lt;=0.001 0.01 0.25 32 &lt;=0.001 2 1 0.005 </span></span>
<span><span class="co"># [64] 4 256 0.025 32 2 64 128 32 &lt;=0.001</span></span>
<span><span class="co"># [73] 16 0.005 0.5 0.25 4 2 0.5 32 64 </span></span>
<span><span class="co"># [82] 0.005 64 256 0.005 256 0.0625 256 0.005 64 </span></span>
<span><span class="co"># [91] 0.005 0.005 0.005 0.002 0.25 8 32 4 1 </span></span>
<span><span class="co"># [100] 0.0625</span></span></code></pre></div>
<div class="sourceCode" id="cb37"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># base R:</span></span>
<span><span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">mic_values</span><span class="op">)</span></span></code></pre></div>
@ -1242,10 +1244,10 @@ Longest: 24</p>
<code class="sourceCode R"><span><span class="va">disk_values</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/random.html">random_disk</a></span><span class="op">(</span>size <span class="op">=</span> <span class="fl">100</span>, mo <span class="op">=</span> <span class="st">"E. coli"</span>, ab <span class="op">=</span> <span class="st">"cipro"</span><span class="op">)</span></span>
<span><span class="va">disk_values</span></span>
<span><span class="co"># Class 'disk'</span></span>
<span><span class="co"># [1] 30 17 29 30 29 30 28 21 28 19 26 17 25 30 18 21 23 29 21 18 17 18 23 27 23</span></span>
<span><span class="co"># [26] 30 29 26 24 29 31 31 24 19 22 26 17 24 25 27 20 29 28 20 28 30 19 31 19 18</span></span>
<span><span class="co"># [51] 23 24 23 25 22 28 29 18 26 20 23 20 23 28 18 22 19 29 30 18 28 22 30 31 18</span></span>
<span><span class="co"># [76] 22 21 29 30 25 30 24 29 21 27 31 24 29 18 21 30 26 20 27 19 20 25 18 24 27</span></span></code></pre></div>
<span><span class="co"># [1] 20 22 22 23 28 28 28 22 21 18 27 22 21 21 29 19 24 24 26 22 28 21 17 30 22</span></span>
<span><span class="co"># [26] 27 28 23 31 18 25 17 23 25 26 28 24 18 29 29 17 18 20 21 23 26 27 28 18 17</span></span>
<span><span class="co"># [51] 18 24 23 23 17 31 24 19 23 19 27 28 30 30 28 21 19 24 29 26 19 19 18 20 25</span></span>
<span><span class="co"># [76] 26 27 31 27 20 31 31 18 30 23 18 19 26 19 31 28 30 18 21 18 17 21 30 20 28</span></span></code></pre></div>
<div class="sourceCode" id="cb43"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># base R:</span></span>
<span><span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">disk_values</span>, mo <span class="op">=</span> <span class="st">"E. coli"</span>, ab <span class="op">=</span> <span class="st">"cipro"</span><span class="op">)</span></span></code></pre></div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

@ -38,7 +38,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -38,7 +38,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -314,18 +314,18 @@ Unique: 2</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span></span>
<span><span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span></span>
<span><span class="co"># 1 R S I S I S</span></span>
<span><span class="co"># 2 R R I R R I</span></span>
<span><span class="co"># 3 R I S I I I</span></span>
<span><span class="co"># 4 R R S I S S</span></span>
<span><span class="co"># 5 R R S R I R</span></span>
<span><span class="co"># 6 S S R I S S</span></span>
<span><span class="co"># 1 S R I I I R</span></span>
<span><span class="co"># 2 I S R R R R</span></span>
<span><span class="co"># 3 R I I S I S</span></span>
<span><span class="co"># 4 R R R R I S</span></span>
<span><span class="co"># 5 I S I R I R</span></span>
<span><span class="co"># 6 R S R S S I</span></span>
<span><span class="co"># kanamycin</span></span>
<span><span class="co"># 1 R</span></span>
<span><span class="co"># 2 S</span></span>
<span><span class="co"># 3 R</span></span>
<span><span class="co"># 4 I</span></span>
<span><span class="co"># 5 S</span></span>
<span><span class="co"># 1 S</span></span>
<span><span class="co"># 2 I</span></span>
<span><span class="co"># 3 S</span></span>
<span><span class="co"># 4 R</span></span>
<span><span class="co"># 5 I</span></span>
<span><span class="co"># 6 I</span></span></code></pre></div>
<p>We can now add the interpretation of MDR-TB to our data set. You can use:</p>
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
@ -357,40 +357,40 @@ Unique: 5</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Mono-resistant</td>
<td align="right">3161</td>
<td align="right">63.22%</td>
<td align="right">3161</td>
<td align="right">63.22%</td>
<td align="right">3227</td>
<td align="right">64.54%</td>
<td align="right">3227</td>
<td align="right">64.54%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Negative</td>
<td align="right">1035</td>
<td align="right">20.70%</td>
<td align="right">4196</td>
<td align="right">83.92%</td>
<td align="right">945</td>
<td align="right">18.90%</td>
<td align="right">4172</td>
<td align="right">83.44%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Multi-drug-resistant</td>
<td align="right">452</td>
<td align="right">9.04%</td>
<td align="right">4648</td>
<td align="right">92.96%</td>
<td align="right">459</td>
<td align="right">9.18%</td>
<td align="right">4631</td>
<td align="right">92.62%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Poly-resistant</td>
<td align="right">241</td>
<td align="right">4.82%</td>
<td align="right">4889</td>
<td align="right">97.78%</td>
<td align="right">260</td>
<td align="right">5.20%</td>
<td align="right">4891</td>
<td align="right">97.82%</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="left">Extensively drug-resistant</td>
<td align="right">111</td>
<td align="right">2.22%</td>
<td align="right">109</td>
<td align="right">2.18%</td>
<td align="right">5000</td>
<td align="right">100.00%</td>
</tr>

View File

@ -38,7 +38,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -38,7 +38,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -162,7 +162,7 @@
<img src="../logo.svg" class="logo" alt=""><h1>How to import data from SPSS / SAS / Stata</h1>
<h4 data-toc-skip class="author">Dr. Matthijs Berends</h4>
<h4 data-toc-skip class="date">19 October 2022</h4>
<h4 data-toc-skip class="date">20 October 2022</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/SPSS.Rmd" class="external-link"><code>vignettes/SPSS.Rmd</code></a></small>
<div class="d-none name"><code>SPSS.Rmd</code></div>

View File

@ -38,7 +38,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -38,7 +38,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -161,7 +161,7 @@
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Data sets for download / own use</h1>
<h4 data-toc-skip class="date">19 October 2022</h4>
<h4 data-toc-skip class="date">20 October 2022</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
<div class="d-none name"><code>datasets.Rmd</code></div>
@ -177,7 +177,7 @@
</h2>
<p>A data set with 48,787 rows and 22 columns, containing the following column names:<br><em>mo</em>, <em>fullname</em>, <em>status</em>, <em>kingdom</em>, <em>phylum</em>, <em>class</em>, <em>order</em>, <em>family</em>, <em>genus</em>, <em>species</em>, <em>subspecies</em>, <em>rank</em>, <em>ref</em>, <em>source</em>, <em>lpsn</em>, <em>lpsn_parent</em>, <em>lpsn_renamed_to</em>, <em>gbif</em>, <em>gbif_parent</em>, <em>gbif_renamed_to</em>, <em>prevalence</em> and <em>snomed</em>.</p>
<p>This data set is in R available as <code>microorganisms</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 19 October 2022 09:53:44 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.html">here</a>.</p>
<p>It was last updated on 20 October 2022 14:08:59 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.rds" class="external-link">original R Data Structure (RDS) file</a> (1.1 MB)<br>
@ -449,7 +449,7 @@
</h2>
<p>A data set with 464 rows and 14 columns, containing the following column names:<br><em>ab</em>, <em>cid</em>, <em>name</em>, <em>group</em>, <em>atc</em>, <em>atc_group1</em>, <em>atc_group2</em>, <em>abbreviations</em>, <em>synonyms</em>, <em>oral_ddd</em>, <em>oral_units</em>, <em>iv_ddd</em>, <em>iv_units</em> and <em>loinc</em>.</p>
<p>This data set is in R available as <code>antibiotics</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 19 October 2022 09:53:44 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p>It was last updated on 20 October 2022 14:08:59 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.rds" class="external-link">original R Data Structure (RDS) file</a> (36 kB)<br>
@ -622,7 +622,7 @@
</h2>
<p>A data set with 102 rows and 9 columns, containing the following column names:<br><em>atc</em>, <em>cid</em>, <em>name</em>, <em>atc_group</em>, <em>synonyms</em>, <em>oral_ddd</em>, <em>oral_units</em>, <em>iv_ddd</em> and <em>iv_units</em>.</p>
<p>This data set is in R available as <code>antivirals</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 19 October 2022 09:53:44 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p>It was last updated on 20 October 2022 14:08:59 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.rds" class="external-link">original R Data Structure (RDS) file</a> (4 kB)<br>
@ -754,7 +754,7 @@
</h2>
<p>A data set with 20,369 rows and 11 columns, containing the following column names:<br><em>guideline</em>, <em>method</em>, <em>site</em>, <em>mo</em>, <em>rank_index</em>, <em>ab</em>, <em>ref_tbl</em>, <em>disk_dose</em>, <em>breakpoint_S</em>, <em>breakpoint_R</em> and <em>uti</em>.</p>
<p>This data set is in R available as <code>rsi_translation</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 19 October 2022 09:53:44 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
<p>It was last updated on 20 October 2022 14:08:59 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.rds" class="external-link">original R Data Structure (RDS) file</a> (49 kB)<br>
@ -913,7 +913,7 @@
</h2>
<p>A data set with 134,659 rows and 2 columns, containing the following column names:<br><em>mo</em> and <em>ab</em>.</p>
<p>This data set is in R available as <code>intrinsic_resistant</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 19 October 2022 09:53:44 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/intrinsic_resistant.html">here</a>.</p>
<p>It was last updated on 20 October 2022 14:08:59 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/intrinsic_resistant.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.rds" class="external-link">original R Data Structure (RDS) file</a> (78 kB)<br>
@ -1185,7 +1185,7 @@
</h2>
<p>A data set with 169 rows and 9 columns, containing the following column names:<br><em>ab</em>, <em>name</em>, <em>type</em>, <em>dose</em>, <em>dose_times</em>, <em>administration</em>, <em>notes</em>, <em>original_txt</em> and <em>eucast_version</em>.</p>
<p>This data set is in R available as <code>dosage</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 19 October 2022 09:53:44 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/dosage.html">here</a>.</p>
<p>It was last updated on 20 October 2022 14:08:59 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/dosage.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.rds" class="external-link">original R Data Structure (RDS) file</a> (3 kB)<br>
@ -1302,7 +1302,7 @@
</h2>
<p>A data set with 2,000 rows and 46 columns, containing the following column names:<br><em>date</em>, <em>patient</em>, <em>age</em>, <em>gender</em>, <em>ward</em>, <em>mo</em>, <em>PEN</em>, <em>OXA</em>, <em>FLC</em>, <em>AMX</em>, <em>AMC</em>, <em>AMP</em>, <em>TZP</em>, <em>CZO</em>, <em>FEP</em>, <em>CXM</em>, <em>FOX</em>, <em>CTX</em>, <em>CAZ</em>, <em>CRO</em>, <em>GEN</em>, <em>TOB</em>, <em>AMK</em>, <em>KAN</em>, <em>TMP</em>, <em>SXT</em>, <em>NIT</em>, <em>FOS</em>, <em>LNZ</em>, <em>CIP</em>, <em>MFX</em>, <em>VAN</em>, <em>TEC</em>, <em>TCY</em>, <em>TGC</em>, <em>DOX</em>, <em>ERY</em>, <em>CLI</em>, <em>AZM</em>, <em>IPM</em>, <em>MEM</em>, <em>MTR</em>, <em>CHL</em>, <em>COL</em>, <em>MUP</em> and <em>RIF</em>.</p>
<p>This data set is in R available as <code>example_isolates</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 19 October 2022 09:53:44 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates.html">here</a>.</p>
<p>It was last updated on 20 October 2022 14:08:59 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates.html">here</a>.</p>
<div class="section level3">
<h3 id="source-6">Source<a class="anchor" aria-label="anchor" href="#source-6"></a>
</h3>
@ -1707,7 +1707,7 @@
</h2>
<p>A data set with 3,000 rows and 8 columns, containing the following column names:<br><em>patient_id</em>, <em>hospital</em>, <em>date</em>, <em>bacteria</em>, <em>AMX</em>, <em>AMC</em>, <em>CIP</em> and <em>GEN</em>.</p>
<p>This data set is in R available as <code>example_isolates_unclean</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 19 October 2022 09:53:44 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates_unclean.html">here</a>.</p>
<p>It was last updated on 20 October 2022 14:08:59 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates_unclean.html">here</a>.</p>
<div class="section level3">
<h3 id="source-7">Source<a class="anchor" aria-label="anchor" href="#source-7"></a>
</h3>

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -38,7 +38,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -38,7 +38,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -42,7 +42,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -127,20 +127,21 @@
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="1.8.2.9023" id="amr-1829023">AMR 1.8.2.9023<a class="anchor" aria-label="anchor" href="#amr-1829023"></a></h2>
<h2 class="pkg-version" data-toc-text="1.8.2.9024" id="amr-1829024">AMR 1.8.2.9024<a class="anchor" aria-label="anchor" href="#amr-1829024"></a></h2>
<p>This version will eventually become v2.0! Were happy to reach a new major milestone soon!</p>
<div class="section level4">
<h4 id="breaking-1-8-2-9023">Breaking<a class="anchor" aria-label="anchor" href="#breaking-1-8-2-9023"></a></h4>
<h4 id="breaking-1-8-2-9024">Breaking<a class="anchor" aria-label="anchor" href="#breaking-1-8-2-9024"></a></h4>
<ul><li>Removed all species of the taxonomic kingdom Chromista from the package. This was done for multiple reasons:<ul><li>CRAN allows packages to be around 5 MB maximum, some packages are exempted but this package is not one of them</li>
<li>Chromista are not relevant when it comes to antimicrobial resistance, thus lacking the primary scope of this package</li>
<li>Chromista are almost never clinically relevant, thus lacking the secondary scope of this package</li>
</ul></li>
<li>The <code>microorganisms</code> no longer relies on the Catalogue of Life, but now primarily on the List of Prokaryotic names with Standing in Nomenclature (LPSN) and is supplemented with the Global Biodiversity Information Facility (GBIF). The structure of this data set has changed to include separate LPSN and GBIF identifiers. Almost all previous MO codes were retained. It contains over 1,000 taxonomic names from 2022 already.</li>
<li>The <code>microorganisms.old</code> data set was removed, and all previously accepted names are now included in the <code>microorganisms</code> data set. A new column <code>status</code> contains <code>"accepted"</code> for currently accepted names and <code>"synonym"</code> for taxonomic synonyms; currently invalid names. All previously accepted names now have a microorganisms ID and - if available - an LPSN, GBIF and SNOMED CT identifier.</li>
<li>The <code><a href="../reference/mo_matching_score.html">mo_matching_score()</a></code> now count deletions and substitutions as 2 instead of 1, which impacts the outcome of <code><a href="../reference/as.mo.html">as.mo()</a></code> and any <code>mo_*()</code> function</li>
<li>The MO matching score algorithm (<code><a href="../reference/mo_matching_score.html">mo_matching_score()</a></code>) now counts deletions and substitutions as 2 instead of 1, which impacts the outcome of <code><a href="../reference/as.mo.html">as.mo()</a></code> and any <code>mo_*()</code> function</li>
<li>Argument <code>combine_IR</code> has been removed from this package (affecting all <code><a href="../reference/count.html">count_df()</a></code>, <code><a href="../reference/proportion.html">proportion_df()</a></code> and <code>rsi_all()</code>), since it was replaced with <code>combine_SI</code> three years ago</li>
</ul></div>
<div class="section level4">
<h4 id="new-1-8-2-9023">New<a class="anchor" aria-label="anchor" href="#new-1-8-2-9023"></a></h4>
<h4 id="new-1-8-2-9024">New<a class="anchor" aria-label="anchor" href="#new-1-8-2-9024"></a></h4>
<ul><li>EUCAST 2022 and CLSI 2022 guidelines have been added for <code><a href="../reference/as.rsi.html">as.rsi()</a></code>. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations.</li>
<li>All new algorithm for <code><a href="../reference/as.mo.html">as.mo()</a></code> (and thus internally all <code>mo_*()</code> functions) while still following our original set-up as described in our paper (DOI 10.18637/jss.v104.i03).<ul><li>A new argument <code>keep_synonyms</code> allows to <em>not</em> correct for updated taxonomy, in favour of the now deleted argument <code>allow_uncertain</code>
</li>
@ -153,11 +154,15 @@
<li>Function <code><a href="../reference/add_custom_antimicrobials.html">add_custom_antimicrobials()</a></code> to add custom antimicrobial codes and names to the <code>AMR</code> package</li>
<li>Support for <code>data.frame</code>-enhancing R packages, more specifically: <code><a href="https://Rdatatable.gitlab.io/data.table/reference/data.table.html" class="external-link">data.table::data.table</a></code>, <code><a href="https://rdrr.io/pkg/janitor/man/tabyl.html" class="external-link">janitor::tabyl</a></code>, <code><a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble::tibble</a></code>, and <code>tsibble::tsibble</code>. AMR package functions that have a data set as output (such as <code><a href="../reference/proportion.html">rsi_df()</a></code> and <code><a href="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code>), will now return the same data type as the input.</li>
<li>All data sets in this package are now exported as <code>tibble</code>, instead of base R <code>data.frame</code>s. Older R versions are still supported.</li>
<li>Support for the following languages: Chinese, Greek, Japanese, Polish, Turkish and Ukrainian. We are very grateful for the valuable input by our colleagues from other countries. The <code>AMR</code> package is now available in 16 languages.</li>
<li>Support for the following languages: Chinese, Greek, Japanese, Polish, Turkish and Ukrainian. We are very grateful for the valuable input by our colleagues from other countries. The <code>AMR</code> package is now available in 16 languages. The automatic language determination will give a note at start-up on systems in supported languages.</li>
<li>Our data sets are now also continually exported to Apache Feather and Apache Parquet formats. You can find more info <a href="https://msberends.github.io/AMR/articles/datasets.html">in this article on our website</a>.</li>
<li>Added confidence intervals in AMR calculation. This is now included in <code><a href="../reference/proportion.html">rsi_df()</a></code> and <code><a href="../reference/proportion.html">proportion_df()</a></code> and manually available as <code><a href="../reference/proportion.html">rsi_confidence_interval()</a></code>
</li>
<li>Support for using antibiotic selectors in <code><a href="https://dplyr.tidyverse.org/reference/vars.html" class="external-link">dplyr::vars()</a></code>, such as in: <code>... %&gt;% summarise_at(vars(aminoglycosides()), resistance)</code>
</li>
</ul></div>
<div class="section level4">
<h4 id="changed-1-8-2-9023">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-2-9023"></a></h4>
<h4 id="changed-1-8-2-9024">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-2-9024"></a></h4>
<ul><li>Fix for using <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on certain EUCAST breakpoints for MIC values</li>
<li>Fix for using <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on <code>NA</code> values (e.g. <code>as.rsi(as.disk(NA), ...)</code>)</li>
<li>Removed <code><a href="https://rdrr.io/r/base/integer.html" class="external-link">as.integer()</a></code> for MIC values, since MIC are not integer values and running <code><a href="https://rdrr.io/r/base/table.html" class="external-link">table()</a></code> on MIC values consequently failed for not being able to retrieve the level position (as thats how normally <code><a href="https://rdrr.io/r/base/integer.html" class="external-link">as.integer()</a></code> on <code>factor</code>s work)</li>
@ -174,7 +179,6 @@
<li>Fix for using the form <code>df[carbapenems() == "R", ]</code> when using the latest <code>vctrs</code> package</li>
<li>Fix for using <code>info = FALSE</code> in <code><a href="../reference/mdro.html">mdro()</a></code>
</li>
<li>Automatic language determination will give a note once a session</li>
<li>For all interpretation guidelines using <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on amoxicillin, the rules for ampicillin will be used if amoxicillin rules are not available</li>
<li>Fix for using <code><a href="../reference/ab_property.html">ab_atc()</a></code> on non-existing ATC codes</li>
<li>Black and white message texts are now reversed in colour if using an RStudio dark theme</li>
@ -183,7 +187,7 @@
<li>Fix for using <code><a href="../reference/as.ab.html">as.ab()</a></code> on <code>NA</code> values</li>
</ul></div>
<div class="section level4">
<h4 id="other-1-8-2-9023">Other<a class="anchor" aria-label="anchor" href="#other-1-8-2-9023"></a></h4>
<h4 id="other-1-8-2-9024">Other<a class="anchor" aria-label="anchor" href="#other-1-8-2-9024"></a></h4>
<ul><li>New website to make use of the new Bootstrap 5 and pkgdown 2.0. The website now contains results for all examples and will be automatically regenerated with every change to our repository, using GitHub Actions</li>
<li>Added Peter Dutey-Magni, Dmytro Mykhailenko and Anton Mymrikov as contributors, to thank them for their valuable input</li>
<li>All R and Rmd files in this project are now styled using the <code>styler</code> package</li>

View File

@ -11,7 +11,7 @@ articles:
datasets: datasets.html
resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html
last_built: 2022-10-19T09:55Z
last_built: 2022-10-20T14:11Z
urls:
reference: https://msberends.github.io/AMR/reference
article: https://msberends.github.io/AMR/articles

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -62,7 +62,7 @@ Principal component analysis for AMR
<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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -190,16 +190,16 @@
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">df</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> birth_date age age_exact age_at_y2k</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1980-01-01 42 42.79726 20</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1948-08-23 74 74.15616 51</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1973-10-28 48 48.97534 26</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1941-08-03 81 81.21096 58</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1991-05-15 31 31.43014 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1963-06-17 59 59.33973 36</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1972-03-23 50 50.57534 27</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1970-08-17 52 52.17260 29</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1988-10-11 34 34.02192 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1941-10-13 81 81.01644 58</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1968-06-09 54 54.36438 31</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1986-02-19 36 36.66575 13</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1936-04-08 86 86.53425 63</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1965-09-02 57 57.13151 34</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1945-04-27 77 77.48219 54</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1988-02-16 34 34.67397 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1953-02-11 69 69.68767 46</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1976-01-29 46 46.72329 23</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1944-01-06 78 78.78630 55</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1997-02-24 25 25.65205 2</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -484,16 +484,16 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 50 × 13</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> datetime index ab_input ab_consid…¹ mo_in…² mo_conside…³ guide…⁴</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;ab&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&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> 2022-10-19 <span style="color: #949494;">09:56:17</span> 1 ampicillin AMP Strep … B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2022-10-19 <span style="color: #949494;">09:56:17</span> 1 AMP AMP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2022-10-19 <span style="color: #949494;">09:56:17</span> 1 CIP CIP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2022-10-19 <span style="color: #949494;">09:56:18</span> 1 GEN GEN Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2022-10-19 <span style="color: #949494;">09:56:18</span> 1 TOB TOB Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2022-10-19 <span style="color: #949494;">09:56:18</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2022-10-19 <span style="color: #949494;">09:56:19</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2022-10-19 <span style="color: #949494;">09:56:19</span> 2 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2022-10-19 <span style="color: #949494;">09:56:19</span> 3 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2022-10-19 <span style="color: #949494;">09:56:19</span> 4 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2022-10-20 <span style="color: #949494;">14:11:52</span> 1 ampicillin AMP Strep … B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2022-10-20 <span style="color: #949494;">14:11:52</span> 1 AMP AMP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2022-10-20 <span style="color: #949494;">14:11:53</span> 1 CIP CIP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2022-10-20 <span style="color: #949494;">14:11:53</span> 1 GEN GEN Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2022-10-20 <span style="color: #949494;">14:11:53</span> 1 TOB TOB Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2022-10-20 <span style="color: #949494;">14:11:53</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2022-10-20 <span style="color: #949494;">14:11:54</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2022-10-20 <span style="color: #949494;">14:11:54</span> 2 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2022-10-20 <span style="color: #949494;">14:11:54</span> 3 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2022-10-20 <span style="color: #949494;">14:11:54</span> 4 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 40 more rows, 6 more variables: ref_table &lt;chr&gt;, method &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># breakpoint_S &lt;dbl&gt;, breakpoint_R &lt;dbl&gt;, input &lt;dbl&gt;, interpretation &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># and abbreviated variable names ¹ab_considered, ²mo_input, ³mo_considered,</span></span>

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -142,7 +142,6 @@
<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>
<span> combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> combine_IR <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> add_ab_group <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> remove_intrinsic_resistant <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> decimal.mark <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">"OutDec"</span><span class="op">)</span>,</span>
@ -153,7 +152,7 @@
<div class="section level2">
<h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
<p><strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition</strong>, 2014, <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>
<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>
</div>
<div class="section level2">
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
@ -186,11 +185,7 @@
<dt>combine_SI</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant). This used to be the argument <code>combine_IR</code>, but this now follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. Default is <code>TRUE</code>.</p></dd>
<dt>combine_IR</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether values R and I should be summed</p></dd>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether values S and I should be summed, so resistance will be based on only R, defaults to <code>TRUE</code></p></dd>
<dt>add_ab_group</dt>
@ -220,7 +215,7 @@
</div>
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>The function <code><a href="https://rdrr.io/r/base/format.html" class="external-link">format()</a></code> calculates the resistance per bug-drug combination. Use <code>combine_IR = FALSE</code> (default) to test R vs. S+I and <code>combine_IR = TRUE</code> to test R+I vs. S.</p>
<p>The function <code><a href="https://rdrr.io/r/base/format.html" class="external-link">format()</a></code> calculates the resistance per bug-drug combination. Use <code>combine_SI = TRUE</code> (default) to test R vs. S+I and <code>combine_SI = FALSE</code> to test R+I vs. S.</p>
</div>
<div class="section level2">

View File

@ -12,7 +12,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -158,8 +158,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<span> <span class="va">data</span>,</span>
<span> translate_ab <span class="op">=</span> <span class="st">"name"</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> combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> combine_IR <span class="op">=</span> <span class="cn">FALSE</span></span>
<span> combine_SI <span class="op">=</span> <span class="cn">TRUE</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
@ -186,11 +185,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<dt>combine_SI</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant). This used to be the argument <code>combine_IR</code>, but this now follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. Default is <code>TRUE</code>.</p></dd>
<dt>combine_IR</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether all values of I and R must be merged into one, so the output only consists of S vs. I+R (susceptible vs. non-susceptible). This is outdated, see argument <code>combine_SI</code>.</p></dd>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant), defaults to <code>TRUE</code></p></dd>
</dl></div>
<div class="section level2">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -12,7 +12,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
<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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -12,7 +12,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -172,7 +172,7 @@
<div class="section level2">
<h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
<p>Methodology of this function is strictly based on:</p><ul><li><p><strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition</strong>, 2014, <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>
<p>Methodology of this function is strictly based on:</p><ul><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>
<li><p>Hindler JF and Stelling J (2007). <strong>Analysis and Presentation of Cumulative Antibiograms: A New Consensus Guideline from the Clinical and Laboratory Standards Institute.</strong> Clinical Infectious Diseases, 44(6), 867-873. <a href="https://doi.org/10.1086/511864" class="external-link">doi:10.1086/511864</a></p></li>
</ul></div>
<div class="section level2">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -177,41 +177,42 @@
<span class="r-in"><span><span class="va">df</span> <span class="op">&lt;-</span> <span class="va">example_isolates</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/sample.html" class="external-link">sample</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">seq_len</a></span><span class="op">(</span><span class="fl">2000</span><span class="op">)</span>, size <span class="op">=</span> <span class="fl">200</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">get_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, episode_days <span class="op">=</span> <span class="fl">60</span><span class="op">)</span> <span class="co"># indices</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 54 9 4 2 23 7 29 14 21 37 18 58 61 29 16 13 27 63 35 56 9 8 52 60 12</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 14 19 62 16 61 48 34 46 59 48 31 2 5 30 25 9 3 56 53 4 31 32 6 23 49</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 55 57 32 3 64 63 14 4 30 65 61 62 14 58 48 17 11 13 1 52 21 51 61 56 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 21 60 17 49 37 43 42 48 63 21 43 63 1 62 11 58 64 58 49 11 10 21 56 48 63</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 53 20 4 23 6 55 30 42 6 6 39 37 28 8 33 42 39 47 55 7 43 6 43 1 60</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 43 24 56 19 48 32 16 4 38 28 29 14 44 53 39 23 20 51 13 53 3 45 60 20 24</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 35 36 36 29 41 33 10 46 51 1 40 41 17 22 8 26 52 21 27 31 1 52 64 38 64</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 63 53 16 34 8 50 57 12 10 59 64 6 10 15 43 65 25 9 48 9 32 17 15 4 43</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 38 54 24 6 7 33 20 44 53 63 25 55 56 49 61 62 9 8 45 9 36 17 37 2 50</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 35 20 13 11 23 63 59 61 43 59 41 25 22 12 46 18 62 57 17 27 8 36 29 24 41</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 58 35 61 48 12 18 3 31 20 41 56 9 56 51 64 16 1 36 40 50 53 19 25 36 12</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 20 9 18 36 62 29 51 45 12 10 23 40 3 38 5 15 7 17 21 3 63 38 40 7 14</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 63 7 17 15 51 17 62 2 61 12 52 32 46 32 27 4 13 61 19 37 41 38 51 22 50</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 41 14 12 29 64 58 52 57 46 57 33 56 16 34 26 5 34 17 42 63 61 22 58 20 44</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 25 38 25 17 12 22 56 28 13 34 3 47 25 63 16 1 5 1 22 39 31 14 31 51 30</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 1 61 46 6 27 19 1 56 40 30 20 10 57 60 18 24 60 30 22 47 23 62 26 62 5</span>
<span class="r-in"><span><span class="fu">is_new_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, episode_days <span class="op">=</span> <span class="fl">60</span><span class="op">)</span> <span class="co"># TRUE/FALSE</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TRUE FALSE TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] FALSE TRUE TRUE TRUE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] FALSE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] TRUE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] FALSE FALSE TRUE TRUE FALSE TRUE TRUE FALSE TRUE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [157] FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] TRUE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] FALSE TRUE FALSE TRUE TRUE TRUE FALSE TRUE TRUE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] FALSE TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] FALSE TRUE FALSE TRUE TRUE TRUE FALSE TRUE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] TRUE FALSE FALSE TRUE TRUE FALSE TRUE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] FALSE TRUE TRUE FALSE FALSE TRUE FALSE TRUE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [157] FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] FALSE TRUE FALSE TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] FALSE FALSE TRUE FALSE FALSE FALSE TRUE TRUE</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># filter on results from the third 60-day episode only, using base R</span></span></span>
<span class="r-in"><span><span class="va">df</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/which.html" class="external-link">which</a></span><span class="op">(</span><span class="fu">get_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, <span class="fl">60</span><span class="op">)</span> <span class="op">==</span> <span class="fl">3</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 3 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender ward mo PEN OXA FLC AMX </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&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;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2002-07-15 C42193 84 M ICU B_STPHY_HMNS R NA R R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2002-07-28 F54261 69 M Clinical B_STPHY_CONS R NA S NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2002-07-23 F35553 51 M ICU B_STPHY_AURS R NA S R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 4 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender ward mo PEN OXA FLC AMX </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&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;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2002-08-19 A49852 70 M Clinical B_ESCHR_COLI R NA NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2002-07-16 241328 78 M Outpatie… B_STPHY_CONS R NA S R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2002-06-23 798871 82 M Clinical B_ENTRC_FCLS NA NA NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> 2002-06-22 FD8039 75 F ICU B_ESCHR_COLI R NA NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 36 more variables: AMC &lt;rsi&gt;, AMP &lt;rsi&gt;, TZP &lt;rsi&gt;, CZO &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># FEP &lt;rsi&gt;, CXM &lt;rsi&gt;, FOX &lt;rsi&gt;, CTX &lt;rsi&gt;, CAZ &lt;rsi&gt;, CRO &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># GEN &lt;rsi&gt;, TOB &lt;rsi&gt;, AMK &lt;rsi&gt;, KAN &lt;rsi&gt;, TMP &lt;rsi&gt;, SXT &lt;rsi&gt;,</span></span>
@ -247,16 +248,16 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: condition [3]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient date condition new_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> E99D61 2015-04-07 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 394107 2004-01-16 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> F35553 2002-09-23 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> F41248 2002-04-04 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 5B78D5 2007-02-21 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 032343 2003-06-09 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> D43890 2008-11-28 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> F41D7B 2005-01-12 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 94BB11 2006-08-14 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> D82303 2010-12-11 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 687590 2011-10-29 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> C54153 2015-08-09 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 1710B8 2008-01-22 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 914520 2003-07-11 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 999565 2003-10-09 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 953526 2010-04-23 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 418311 2006-11-10 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 298662 2013-03-12 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2C8499 2015-05-22 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> F67215 2017-08-15 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 190 more rows</span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="va">df</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
@ -268,19 +269,19 @@
<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;"># A tibble: 200 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [182]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward date patient new_index new_logical</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&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;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> ICU 2015-04-07 E99D61 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> ICU 2004-01-16 394107 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> ICU 2002-09-23 F35553 2 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical 2002-04-04 F41248 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2007-02-21 5B78D5 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Clinical 2003-06-09 032343 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Outpatient 2008-11-28 D43890 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> ICU 2005-01-12 F41D7B 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> Clinical 2006-08-14 94BB11 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> ICU 2010-12-11 D82303 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [189]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward date patient new_index new_logical</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&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;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> Clinical 2011-10-29 687590 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> Clinical 2015-08-09 C54153 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical 2008-01-22 1710B8 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> ICU 2003-07-11 914520 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2003-10-09 999565 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> ICU 2010-04-23 953526 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> ICU 2006-11-10 418311 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> Clinical 2013-03-12 298662 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> ICU 2015-05-22 2C8499 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Clinical 2017-08-15 F67215 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 190 more rows</span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="va">df</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
@ -295,9 +296,9 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 3 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward n_patients n_episodes_365 n_episodes_60 n_episodes_30</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 105 14 52 67</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 64 12 38 46</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 13 7 11 12</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 119 14 48 72</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 59 14 37 42</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 11 8 9 11</span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span> <span class="co"># grouping on patients and microorganisms leads to the same</span></span></span>
@ -327,19 +328,19 @@
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">select</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_data.html" class="external-link">group_vars</a></span><span class="op">(</span><span class="va">.</span><span class="op">)</span>, <span class="va">flag_episode</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;"># A tibble: 200 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, mo, ward [188]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient mo ward flag_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> E99D61 B_STPHY_EPDR ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 394107 B_STPHY_CONS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> F35553 B_STPHY_AURS ICU FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> F41248 B_STPHY_AURS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 5B78D5 B_STPHY_AURS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 032343 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> D43890 UNKNOWN Outpatient TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> F41D7B B_STRPT_PNMN ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 94BB11 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> D82303 B_ESCHR_COLI ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, mo, ward [193]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient mo ward flag_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 687590 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> C54153 B_STPHY_EPDR Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 1710B8 B_PROTS_MRBL Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 914520 B_STPHY_CONS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 999565 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 953526 B_STPHY_CONS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 418311 B_STPHY_CONS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 298662 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2C8499 B_ESCHR_COLI ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> F67215 B_STPHY_EPDR Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 190 more rows</span></span>
<span class="r-in"><span><span class="co"># }</span></span></span>
</code></pre></div>

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -143,7 +143,6 @@
<span> limits <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> translate_ab <span class="op">=</span> <span class="st">"name"</span>,</span>
<span> combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> combine_IR <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> minimum <span class="op">=</span> <span class="fl">30</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> nrow <span class="op">=</span> <span class="cn">NULL</span>,</span>
@ -168,7 +167,6 @@
<span> minimum <span class="op">=</span> <span class="fl">30</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> combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> combine_IR <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
@ -187,7 +185,6 @@
<span> minimum <span class="op">=</span> <span class="fl">30</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> combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> combine_IR <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> datalabels.size <span class="op">=</span> <span class="fl">3</span>,</span>
<span> datalabels.colour <span class="op">=</span> <span class="st">"grey15"</span></span>
<span><span class="op">)</span></span></code></pre></div>
@ -228,11 +225,7 @@
<dt>combine_SI</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant). This used to be the argument <code>combine_IR</code>, but this now follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. Default is <code>TRUE</code>.</p></dd>
<dt>combine_IR</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether all values of I and R must be merged into one, so the output only consists of S vs. I+R (susceptible vs. non-susceptible). This is outdated, see argument <code>combine_SI</code>.</p></dd>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant), defaults to <code>TRUE</code></p></dd>
<dt>minimum</dt>

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -236,7 +236,7 @@
<dl><dt>
<code><a href="proportion.html">resistance()</a></code> <code><a href="proportion.html">susceptibility()</a></code> <code><a href="proportion.html">proportion_R()</a></code> <code><a href="proportion.html">proportion_IR()</a></code> <code><a href="proportion.html">proportion_I()</a></code> <code><a href="proportion.html">proportion_SI()</a></code> <code><a href="proportion.html">proportion_S()</a></code> <code><a href="proportion.html">proportion_df()</a></code> <code><a href="proportion.html">rsi_df()</a></code>
<code><a href="proportion.html">resistance()</a></code> <code><a href="proportion.html">susceptibility()</a></code> <code><a href="proportion.html">rsi_confidence_interval()</a></code> <code><a href="proportion.html">proportion_R()</a></code> <code><a href="proportion.html">proportion_IR()</a></code> <code><a href="proportion.html">proportion_I()</a></code> <code><a href="proportion.html">proportion_SI()</a></code> <code><a href="proportion.html">proportion_S()</a></code> <code><a href="proportion.html">proportion_df()</a></code> <code><a href="proportion.html">rsi_df()</a></code>
</dt>
<dd>Calculate Microbial Resistance</dd>
</dl><dl><dt>

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -167,9 +167,9 @@
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">kurtosis</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fl">10000</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 3.078481</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 3.100538</span>
<span class="r-in"><span><span class="fu">kurtosis</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fl">10000</span><span class="op">)</span>, excess <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.07857002</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.02950212</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -195,10 +195,11 @@
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="random.html">random_mic</a></span><span class="op">(</span><span class="fl">10</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">x</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 1 &gt;=128 &gt;=128 0.001 4 0.125 0.25 0.01 0.001 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 4 128 2 4 256 &lt;=0.001 &lt;=0.001 4 1 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 0.01 </span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.23800503 1.38104904 1.38104904 -1.38932783 0.56458903 -0.25187098</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.08857897 -0.84688355 -1.38932783 0.40129703</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.38501534 1.16834939 0.22834853 0.38501534 1.32501620 -1.48962591</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -1.48962591 0.38501534 0.07168172 -0.96919003</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">y</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> id <span class="op">=</span> <span class="va">LETTERS</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">10</span><span class="op">]</span>,</span></span>
@ -208,38 +209,38 @@
<span class="r-in"><span> tobr <span class="op">=</span> <span class="fu"><a href="random.html">random_mic</a></span><span class="op">(</span><span class="fl">10</span>, ab <span class="op">=</span> <span class="st">"tobr"</span>, mo <span class="op">=</span> <span class="st">"Escherichia coli"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">y</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 16 &lt;=0.025 &gt;=4 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 4 0.5 1 &lt;=0.25</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 4 0.0625 1 &lt;=0.25</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D &gt;=32 1 &gt;=4 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 4 0.125 2 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 8 0.0625 &gt;=4 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G 4 0.0625 2 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H &gt;=32 0.0625 1 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I 8 0.25 &lt;=0.25 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J &gt;=32 0.0625 &lt;=0.25 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 4 0.25 1 &gt;=16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B &lt;=2 &gt;=2 1 &lt;=1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C &lt;=2 0.025 0.5 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 4 &gt;=2 4 &lt;=1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E &gt;=16 0.025 4 &gt;=16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F &gt;=16 0.125 0.5 &gt;=16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G &lt;=2 &gt;=2 0.25 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H &lt;=2 0.025 2 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I &gt;=16 0.0625 0.25 &lt;=1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J 8 0.025 4 8</span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">y</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent",</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> "id" and "tobr"</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>NAs introduced by coercion</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.14091001 -0.32396107 -0.78118181 0.85710543 0.08049237 0.41685866</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.07191455 0.18697943 -0.07834229 -0.14512615</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.2679478 -0.2300449 -0.6609425 0.2703257 0.6591997 0.3959389</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.1096818 -0.4920944 -0.4283259 0.3276773</span>
<span class="r-in"><span><span class="va">y</span><span class="op">$</span><span class="va">amr_distance</span> <span class="op">&lt;-</span> <span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">y</span>, <span class="fu">where</span><span class="op">(</span><span class="va">is.mic</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent" and</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> "tobr"</span>
<span class="r-in"><span><span class="va">y</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/order.html" class="external-link">order</a></span><span class="op">(</span><span class="va">y</span><span class="op">$</span><span class="va">amr_distance</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 4 0.0625 1 &lt;=0.25 -0.78118181</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 4 0.5 1 &lt;=0.25 -0.32396107</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J &gt;=32 0.0625 &lt;=0.25 2 -0.14512615</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 16 &lt;=0.025 &gt;=4 0.5 -0.14091001</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I 8 0.25 &lt;=0.25 4 -0.07834229</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G 4 0.0625 2 4 -0.07191455</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 4 0.125 2 4 0.08049237</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H &gt;=32 0.0625 1 2 0.18697943</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 8 0.0625 &gt;=4 8 0.41685866</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D &gt;=32 1 &gt;=4 0.5 0.85710543</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C &lt;=2 0.025 0.5 4 -0.6609425</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H &lt;=2 0.025 2 2 -0.4920944</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I &gt;=16 0.0625 0.25 &lt;=1 -0.4283259</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B &lt;=2 &gt;=2 1 &lt;=1 -0.2300449</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G &lt;=2 &gt;=2 0.25 8 -0.1096818</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 4 0.25 1 &gt;=16 0.2679478</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 4 &gt;=2 4 &lt;=1 0.2703257</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J 8 0.025 4 8 0.3276773</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F &gt;=16 0.125 0.5 &gt;=16 0.3959389</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E &gt;=16 0.025 4 &gt;=16 0.6591997</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="va">y</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
@ -251,17 +252,17 @@
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent" and</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> "tobr"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance check_id_C</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 C 4 0.0625 1 &lt;=0.25 -0.78118181 0.0000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 4 0.5 1 &lt;=0.25 -0.32396107 0.4572207</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 J &gt;=32 0.0625 &lt;=0.25 2 -0.14512615 0.6360557</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 A 16 &lt;=0.025 &gt;=4 0.5 -0.14091001 0.6402718</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 I 8 0.25 &lt;=0.25 4 -0.07834229 0.7028395</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 G 4 0.0625 2 4 -0.07191455 0.7092673</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 E 4 0.125 2 4 0.08049237 0.8616742</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H &gt;=32 0.0625 1 2 0.18697943 0.9681612</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 F 8 0.0625 &gt;=4 8 0.41685866 1.1980405</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 D &gt;=32 1 &gt;=4 0.5 0.85710543 1.6382872</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance check_id_C</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 C &lt;=2 0.025 0.5 4 -0.6609425 0.0000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 H &lt;=2 0.025 2 2 -0.4920944 0.1688482</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 I &gt;=16 0.0625 0.25 &lt;=1 -0.4283259 0.2326166</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 B &lt;=2 &gt;=2 1 &lt;=1 -0.2300449 0.4308977</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 G &lt;=2 &gt;=2 0.25 8 -0.1096818 0.5512607</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 A 4 0.25 1 &gt;=16 0.2679478 0.9288903</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 D 4 &gt;=2 4 &lt;=1 0.2703257 0.9312683</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 J 8 0.025 4 8 0.3276773 0.9886199</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 F &gt;=16 0.125 0.5 &gt;=16 0.3959389 1.0568815</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 E &gt;=16 0.025 4 &gt;=16 0.6591997 1.3201423</span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="co"># support for groups</span></span></span>
<span class="r-in"><span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -12,7 +12,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
<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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -12,7 +12,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
<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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -140,6 +140,16 @@ resistance() should be used to calculate resistance, susceptibility() should be
<span></span>
<span><span class="fu">susceptibility</span><span class="op">(</span><span class="va">...</span>, minimum <span class="op">=</span> <span class="fl">30</span>, as_percent <span class="op">=</span> <span class="cn">FALSE</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">rsi_confidence_interval</span><span class="op">(</span></span>
<span> <span class="va">...</span>,</span>
<span> ab_result <span class="op">=</span> <span class="st">"R"</span>,</span>
<span> minimum <span class="op">=</span> <span class="fl">30</span>,</span>
<span> as_percent <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> confidence_level <span class="op">=</span> <span class="fl">0.95</span>,</span>
<span> side <span class="op">=</span> <span class="st">"both"</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">proportion_R</span><span class="op">(</span><span class="va">...</span>, minimum <span class="op">=</span> <span class="fl">30</span>, as_percent <span class="op">=</span> <span class="cn">FALSE</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">proportion_IR</span><span class="op">(</span><span class="va">...</span>, minimum <span class="op">=</span> <span class="fl">30</span>, as_percent <span class="op">=</span> <span class="cn">FALSE</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
@ -157,7 +167,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
<span> minimum <span class="op">=</span> <span class="fl">30</span>,</span>
<span> as_percent <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> combine_IR <span class="op">=</span> <span class="cn">FALSE</span></span>
<span> confidence_level <span class="op">=</span> <span class="fl">0.95</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">rsi_df</span><span class="op">(</span></span>
@ -167,13 +177,13 @@ resistance() should be used to calculate resistance, susceptibility() should be
<span> minimum <span class="op">=</span> <span class="fl">30</span>,</span>
<span> as_percent <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> combine_IR <span class="op">=</span> <span class="cn">FALSE</span></span>
<span> confidence_level <span class="op">=</span> <span class="fl">0.95</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
<p><strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition</strong>, 2014, <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>
<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>
</div>
<div class="section level2">
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
@ -193,6 +203,18 @@ resistance() should be used to calculate resistance, susceptibility() should be
<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 antibiotics, see section <em>Combination Therapy</em> below</p></dd>
<dt>ab_result</dt>
<dd><p>antibiotic results to test against, must be one of more values of "R", "S", "I"</p></dd>
<dt>confidence_level</dt>
<dd><p>the confidence level for the returned confidence interval. For the calculation, the number of S or SI isolates, and R isolates are compared with the total number of available isolates with R, S, or I by using <code><a href="https://rdrr.io/r/stats/binom.test.html" class="external-link">binom.test()</a></code>, i.e., the Clopper-Pearson method.</p></dd>
<dt>side</dt>
<dd><p>the side of the confidence interval to return. Defaults to <code>"both"</code> for a length 2 vector, but can also be (abbreviated as) <code>"min"</code>/<code>"left"</code>/<code>"lower"</code>/<code>"less"</code> or <code>"max"</code>/<code>"right"</code>/<code>"higher"</code>/<code>"greater"</code>.</p></dd>
<dt>data</dt>
<dd><p>a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> containing columns with class <code><a href="as.rsi.html">rsi</a></code> (see <code><a href="as.rsi.html">as.rsi()</a></code>)</p></dd>
@ -206,11 +228,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
<dt>combine_SI</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant). This used to be the argument <code>combine_IR</code>, but this now follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. Default is <code>TRUE</code>.</p></dd>
<dt>combine_IR</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether all values of I and R must be merged into one, so the output only consists of S vs. I+R (susceptible vs. non-susceptible). This is outdated, see argument <code>combine_SI</code>.</p></dd>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant), defaults to <code>TRUE</code></p></dd>
</dl></div>
<div class="section level2">
@ -222,6 +240,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>The function <code>resistance()</code> is equal to the function <code>proportion_R()</code>. The function <code>susceptibility()</code> is equal to the function <code>proportion_SI()</code>.</p>
<p>Use <code>rsi_confidence_interval()</code> to calculate the confidence interval, which relies on <code><a href="https://rdrr.io/r/stats/binom.test.html" class="external-link">binom.test()</a></code>, i.e., the Clopper-Pearson method. This function returns a vector of length 2 at default for antimicrobial <em>resistance</em>. Change the <code>side</code> argument to "left"/"min" or "right"/"max" to return a single value, and change the <code>ab_result</code> argument to e.g. <code>c("S", "I")</code> to test for antimicrobial <em>susceptibility</em>, see Examples.</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.</p>
<p>These functions are not meant to count isolates, but to calculate the proportion of resistance/susceptibility. Use the <code><a href="count.html">count()</a></code> functions to count isolates. The function <code>susceptibility()</code> is essentially equal to <code>count_susceptible() / count_all()</code>. <em>Low counts can influence the outcome - the <code>proportion</code> functions may camouflage this, since they only return the proportion (albeit being dependent on the <code>minimum</code> argument).</em></p>
<p>The function <code>proportion_df()</code> takes any variable from <code>data</code> that has an <code><a href="as.rsi.html">rsi</a></code> class (created with <code><a href="as.rsi.html">as.rsi()</a></code>) and calculates the proportions R, I and S. It also supports grouped variables. The function <code>rsi_df()</code> works exactly like <code>proportion_df()</code>, but adds the number of isolates.</p>
@ -278,10 +297,21 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-in"><span><span class="co"># run ?example_isolates for more info.</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># base R ------------------------------------------------------------</span></span></span>
<span class="r-in"><span><span class="fu">resistance</span><span class="op">(</span><span class="va">example_isolates</span><span class="op">$</span><span class="va">AMX</span><span class="op">)</span> <span class="co"># determines %R</span></span></span>
<span class="r-in"><span><span class="co"># determines %R</span></span></span>
<span class="r-in"><span><span class="fu">resistance</span><span class="op">(</span><span class="va">example_isolates</span><span class="op">$</span><span class="va">AMX</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.5955556</span>
<span class="r-in"><span><span class="fu">susceptibility</span><span class="op">(</span><span class="va">example_isolates</span><span class="op">$</span><span class="va">AMX</span><span class="op">)</span> <span class="co"># determines %S+I</span></span></span>
<span class="r-in"><span><span class="fu">rsi_confidence_interval</span><span class="op">(</span><span class="va">example_isolates</span><span class="op">$</span><span class="va">AMX</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.5688204 0.6218738</span>
<span class="r-in"><span><span class="fu">rsi_confidence_interval</span><span class="op">(</span><span class="va">example_isolates</span><span class="op">$</span><span class="va">AMX</span>,</span></span>
<span class="r-in"><span> confidence_level <span class="op">=</span> <span class="fl">0.975</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.5650148 0.6255670</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># determines %S+I:</span></span></span>
<span class="r-in"><span><span class="fu">susceptibility</span><span class="op">(</span><span class="va">example_isolates</span><span class="op">$</span><span class="va">AMX</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.4044444</span>
<span class="r-in"><span><span class="fu">rsi_confidence_interval</span><span class="op">(</span><span class="va">example_isolates</span><span class="op">$</span><span class="va">AMX</span>,</span></span>
<span class="r-in"><span> ab_result <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="st">"S"</span>, <span class="st">"I"</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.3781262 0.4311796</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># be more specific</span></span></span>
<span class="r-in"><span><span class="fu">proportion_S</span><span class="op">(</span><span class="va">example_isolates</span><span class="op">$</span><span class="va">AMX</span><span class="op">)</span></span></span>
@ -298,12 +328,39 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-in"><span><span class="co"># dplyr -------------------------------------------------------------</span></span></span>
<span class="r-in"><span><span class="co"># \donttest{</span></span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">ward</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> r <span class="op">=</span> <span class="fu">resistance</span><span class="op">(</span><span class="va">CIP</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> n <span class="op">=</span> <span class="fu"><a href="count.html">n_rsi</a></span><span class="op">(</span><span class="va">CIP</span><span class="op">)</span></span></span>
<span class="r-in"><span> <span class="op">)</span> <span class="co"># n_rsi works like n_distinct in dplyr, see ?n_rsi</span></span></span>
<span class="r-in"><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;"># A tibble: 3 × 3</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward r n</span>
<span class="r-out co"><span class="r-pr">#&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;int&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 0.147 869</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 0.190 447</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 0.161 93</span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">ward</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> cipro_R <span class="op">=</span> <span class="fu">resistance</span><span class="op">(</span><span class="va">CIP</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> ci_min <span class="op">=</span> <span class="fu">rsi_confidence_interval</span><span class="op">(</span><span class="va">CIP</span>, side <span class="op">=</span> <span class="st">"min"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> ci_max <span class="op">=</span> <span class="fu">rsi_confidence_interval</span><span class="op">(</span><span class="va">CIP</span>, side <span class="op">=</span> <span class="st">"max"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> <span class="op">)</span></span></span>
<span class="r-in"><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;"># A tibble: 3 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward cipro_R ci_min ci_max</span>
<span class="r-out co"><span class="r-pr">#&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> Clinical 0.147 0.124 0.173</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 0.190 0.155 0.230</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 0.161 0.093<span style="text-decoration: underline;">2</span> 0.252</span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">ward</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
@ -366,21 +423,21 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">ward</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span> <span class="fu">rsi_df</span><span class="op">(</span>translate <span class="op">=</span> <span class="cn">FALSE</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;"># A tibble: 12 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward antibiotic interpretation value isolates</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;ord&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> Clinical AMX SI 0.423 357</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> Clinical AMX R 0.577 487</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical CIP SI 0.853 741</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical CIP R 0.147 128</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> ICU AMX SI 0.369 158</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> ICU AMX R 0.631 270</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> ICU CIP SI 0.810 362</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> ICU CIP R 0.190 85</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> Outpatient AMX SI 0.397 31</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Outpatient AMX R 0.603 47</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">11</span> Outpatient CIP SI 0.839 78</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">12</span> Outpatient CIP R 0.161 15</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 12 × 7</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward antibiotic interpretation value ci_min ci_max isolates</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;ord&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;int&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> Clinical AMX SI 0.423 0.389 0.457 357</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> Clinical AMX R 0.577 0.543 0.611 487</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical CIP SI 0.853 0.827 0.876 741</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical CIP R 0.147 0.124 0.173 128</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> ICU AMX SI 0.369 0.323 0.417 158</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> ICU AMX R 0.631 0.583 0.677 270</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> ICU CIP SI 0.810 0.770 0.845 362</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> ICU CIP R 0.190 0.155 0.230 85</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> Outpatient AMX SI 0.397 0.288 0.515 31</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Outpatient AMX R 0.603 0.485 0.712 47</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">11</span> Outpatient CIP SI 0.839 0.748 0.907 78</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">12</span> Outpatient CIP R 0.161 0.093<span style="text-decoration: underline;">2</span> 0.252 15</span>
<span class="r-in"><span><span class="co"># }</span></span></span>
</code></pre></div>
</div>

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -178,42 +178,43 @@
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">random_mic</span><span class="op">(</span><span class="fl">25</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 8 0.25 0.002 0.0625 128 256 1 4 1 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 128 &lt;=0.001 0.0625 64 0.0625 0.125 0.025 0.25 0.002 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [19] 0.5 8 64 128 0.025 8 256 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 1 0.001 16 &gt;=256 0.002 16 64 2 16 0.125 0.001 0.005</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] 0.001 0.01 64 0.001 0.002 128 0.5 32 1 0.001 2 0.125</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] 2 </span>
<span class="r-in"><span><span class="fu">random_disk</span><span class="op">(</span><span class="fl">25</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'disk'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 50 37 18 41 39 28 16 24 31 40 13 12 46 25 6 27 21 45 13 43 15 21 36 27 21</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 31 40 42 6 12 20 44 35 47 47 49 11 41 10 9 7 35 32 48 13 28 15 37 35 28</span>
<span class="r-in"><span><span class="fu">random_rsi</span><span class="op">(</span><span class="fl">25</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'rsi'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] R S I R R R R S I S I S S S R S I I S S R R S S I</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] I S I S S I I I I R R I I R R R S S I R R I R R I</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># \donttest{</span></span></span>
<span class="r-in"><span><span class="co"># make the random generation more realistic by setting a bug and/or drug:</span></span></span>
<span class="r-in"><span><span class="fu">random_mic</span><span class="op">(</span><span class="fl">25</span>, <span class="st">"Klebsiella pneumoniae"</span><span class="op">)</span> <span class="co"># range 0.0625-64</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 4 64 0.025 0.025 64 0.01 128 &gt;=256 0.5 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 2 0.125 0.0625 16 0.005 0.002 0.25 0.002 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [19] 0.25 8 &lt;=0.001 4 &lt;=0.001 0.125 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2 1 32 64 &lt;=0.001 2 0.025 8 32 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 32 0.002 0.005 2 0.025 0.005 0.025 128 32 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [19] 32 8 128 0.005 1 0.01 0.5 </span>
<span class="r-in"><span><span class="fu">random_mic</span><span class="op">(</span><span class="fl">25</span>, <span class="st">"Klebsiella pneumoniae"</span>, <span class="st">"meropenem"</span><span class="op">)</span> <span class="co"># range 0.0625-16</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 4 2 4 &lt;=1 &lt;=1 8 8 16 4 4 2 &lt;=1 &lt;=1 16 4 &lt;=1 16 16 4 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [20] &lt;=1 8 16 16 16 4 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] &lt;=0.5 &gt;=16 1 4 &gt;=16 &gt;=16 2 &gt;=16 8 1 &lt;=0.5 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] &gt;=16 4 2 2 8 2 2 4 1 8 &gt;=16 1 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] 1 </span>
<span class="r-in"><span><span class="fu">random_mic</span><span class="op">(</span><span class="fl">25</span>, <span class="st">"Streptococcus pneumoniae"</span>, <span class="st">"meropenem"</span><span class="op">)</span> <span class="co"># range 0.0625-4</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.5 1 0.5 0.5 0.0625 2 1 0.5 0.5 0.0625</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 1 0.25 0.125 2 0.25 2 0.125 1 0.0625 0.25 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] &gt;=4 1 0.125 1 0.0625</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] &lt;=0.025 &lt;=0.025 0.5 0.125 &lt;=0.025 &lt;=0.025 16 0.5 0.125 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 8 1 2 16 16 &lt;=0.025 16 0.5 &lt;=0.025</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [19] 0.25 4 2 0.125 1 1 &lt;=0.025</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">random_disk</span><span class="op">(</span><span class="fl">25</span>, <span class="st">"Klebsiella pneumoniae"</span><span class="op">)</span> <span class="co"># range 8-50</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'disk'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 42 48 22 13 8 14 38 49 12 38 37 21 41 11 48 44 34 27 33 41 10 44 36 11 42</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 34 18 36 49 44 12 50 42 50 50 28 17 42 40 16 44 24 44 48 10 15 49 49 16 45</span>
<span class="r-in"><span><span class="fu">random_disk</span><span class="op">(</span><span class="fl">25</span>, <span class="st">"Klebsiella pneumoniae"</span>, <span class="st">"ampicillin"</span><span class="op">)</span> <span class="co"># range 11-17</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'disk'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 11 17 12 17 17 14 15 17 16 16 16 15 16 12 13 12 15 12 12 11 13 14 17 13 16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 17 14 16 16 17 16 16 16 17 13 14 11 15 11 17 12 13 13 14 14 17 16 11 14 11</span>
<span class="r-in"><span><span class="fu">random_disk</span><span class="op">(</span><span class="fl">25</span>, <span class="st">"Streptococcus pneumoniae"</span>, <span class="st">"ampicillin"</span><span class="op">)</span> <span class="co"># range 12-27</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'disk'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 19 27 24 21 24 19 16 17 19 22 26 24 18 25 22 27 20 24 24 19 27 26 21 27 21</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 18 17 15 19 25 23 27 23 15 22 23 17 16 27 22 21 20 19 17 20 25 15 26 24 23</span>
<span class="r-in"><span><span class="co"># }</span></span></span>
</code></pre></div>
</div>

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

View File

@ -12,7 +12,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
<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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">
@ -166,7 +166,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">skewness</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Uniform.html" class="external-link">runif</a></span><span class="op">(</span><span class="fl">1000</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.03698095</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.0329977</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>

View File

@ -10,7 +10,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="">1.8.2.9023</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9024</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">

File diff suppressed because one or more lines are too long