Built site for AMR: 1.8.2.9101@7b00b4f

This commit is contained in:
github-actions 2023-01-24 14:05:39 +00:00
parent 93271b2c07
commit 21650ffec3
99 changed files with 521 additions and 530 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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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">
@ -406,69 +406,69 @@ data set:</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2016-07-10</td>
<td align="center">S7</td>
<td align="center">2014-12-24</td>
<td align="center">I1</td>
<td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">I</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2011-04-22</td>
<td align="center">J2</td>
<td align="center">Hospital A</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">I</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2010-08-09</td>
<td align="center">T2</td>
<td align="center">Hospital D</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2016-11-08</td>
<td align="center">W2</td>
<td align="center">2011-04-07</td>
<td align="center">E9</td>
<td align="center">Hospital B</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">Escherichia coli</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">I</td>
<td align="center">I</td>
<td align="center">I</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2011-05-09</td>
<td align="center">W10</td>
<td align="center">Hospital A</td>
<td align="center">2011-11-29</td>
<td align="center">M8</td>
<td align="center">Hospital D</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2014-02-21</td>
<td align="center">R6</td>
<td align="center">Hospital C</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2014-12-12</td>
<td align="center">H2</td>
<td align="center">Hospital A</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2017-03-14</td>
<td align="center">I10</td>
<td align="center">Hospital C</td>
<td align="center">Escherichia coli</td>
<td align="center">2010-03-10</td>
<td align="center">J7</td>
<td align="center">Hospital B</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
</tbody>
@ -505,18 +505,18 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</td>
<td align="right">10,398</td>
<td align="right">51.99%</td>
<td align="right">10,398</td>
<td align="right">51.99%</td>
<td align="right">10,320</td>
<td align="right">51.6%</td>
<td align="right">10,320</td>
<td align="right">51.6%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,602</td>
<td align="right">48.01%</td>
<td align="right">9,680</td>
<td align="right">48.4%</td>
<td align="right">20,000</td>
<td align="right">100.00%</td>
<td align="right">100.0%</td>
</tr>
</tbody>
</table>
@ -627,9 +627,9 @@ takes into account the antimicrobial susceptibility test results using
<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 12,181 'phenotype-based' first isolates (60.9% of total where a</span></span>
<span><span class="co"># =&gt; Found 12,380 'phenotype-based' first isolates (61.9% of total where a</span></span>
<span><span class="co"># microbial ID was available)</span></span></code></pre></div>
<p>So only 60.9% is suitable for resistance analysis! We can now filter
<p>So only 61.9% 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">
@ -640,11 +640,11 @@ on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html"
<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 12,181 isolates for analysis. Now our data looks
<p>So we end up with 12,380 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%">
@ -658,7 +658,7 @@ like:</p>
<col width="6%">
<col width="11%">
<col width="12%">
<col width="7%">
<col width="9%">
<col width="5%">
</colgroup>
<thead><tr class="header">
@ -680,14 +680,46 @@ like:</p>
<tbody>
<tr class="odd">
<td align="left">1</td>
<td align="center">2016-07-10</td>
<td align="center">S7</td>
<td align="center">2014-12-24</td>
<td align="center">I1</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">I</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="even">
<td align="left">2</td>
<td align="center">2011-04-22</td>
<td align="center">J2</td>
<td align="center">Hospital A</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">I</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">TRUE</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="center">2010-08-09</td>
<td align="center">T2</td>
<td align="center">Hospital D</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
@ -695,14 +727,30 @@ like:</p>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="center">2014-02-21</td>
<td align="center">R6</td>
<td align="center">Hospital C</td>
<td align="center">B_ESCHR_COLI</td>
<td align="left">6</td>
<td align="center">2010-03-10</td>
<td align="center">J7</td>
<td align="center">Hospital B</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">I</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">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">8</td>
<td align="center">2014-08-13</td>
<td align="center">T6</td>
<td align="center">Hospital D</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
@ -710,64 +758,16 @@ like:</p>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">11</td>
<td align="center">2017-08-05</td>
<td align="center">Z10</td>
<td align="center">Hospital B</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">S</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="even">
<td align="left">15</td>
<td align="center">2017-10-24</td>
<td align="center">W2</td>
<td align="center">Hospital B</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">R</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="left">16</td>
<td align="center">2017-01-01</td>
<td align="center">Y9</td>
<td align="left">10</td>
<td align="center">2017-02-03</td>
<td align="center">A10</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">I</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">TRUE</td>
</tr>
<tr class="even">
<td align="left">17</td>
<td align="center">2011-09-19</td>
<td align="center">K10</td>
<td align="center">Hospital C</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
@ -807,8 +807,8 @@ readable:</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://msberends.github.io/cleaner/reference/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: 12,181<br>
Available: 12,181 (100%, NA: 0 = 0%)<br>
Length: 12,380<br>
Available: 12,380 (100%, NA: 0 = 0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -833,33 +833,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">5,814</td>
<td align="right">47.73%</td>
<td align="right">5,814</td>
<td align="right">47.73%</td>
<td align="right">5,838</td>
<td align="right">47.16%</td>
<td align="right">5,838</td>
<td align="right">47.16%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">3,254</td>
<td align="right">26.71%</td>
<td align="right">9,068</td>
<td align="right">74.44%</td>
<td align="right">3,300</td>
<td align="right">26.66%</td>
<td align="right">9,138</td>
<td align="right">73.81%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">1,814</td>
<td align="right">14.89%</td>
<td align="right">10,882</td>
<td align="right">89.34%</td>
<td align="right">1,886</td>
<td align="right">15.23%</td>
<td align="right">11,024</td>
<td align="right">89.05%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,299</td>
<td align="right">10.66%</td>
<td align="right">12,181</td>
<td align="right">1,356</td>
<td align="right">10.95%</td>
<td align="right">12,380</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -908,69 +908,39 @@ antibiotic class they are in:</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2016-07-10</td>
<td align="center">S7</td>
<td align="center">Hospital D</td>
<td align="center">2010-03-10</td>
<td align="center">J7</td>
<td align="center">Hospital B</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">F</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="even">
<td align="center">2017-10-24</td>
<td align="center">W2</td>
<td align="center">Hospital B</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">2016-03-10</td>
<td align="center">N10</td>
<td align="center">Hospital D</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</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">2011-09-19</td>
<td align="center">K10</td>
<td align="center">Hospital C</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">M</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="center">2016-11-01</td>
<td align="center">X5</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="odd">
<td align="center">2015-10-12</td>
<td align="center">Q10</td>
<td align="center">Hospital B</td>
<td align="center">2013-06-19</td>
<td align="center">X3</td>
<td align="center">Hospital A</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
@ -983,13 +953,43 @@ antibiotic class they are in:</p>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2016-06-03</td>
<td align="center">G1</td>
<td align="center">Hospital A</td>
<td align="center">2011-01-30</td>
<td align="center">W6</td>
<td align="center">Hospital C</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">I</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">2014-08-09</td>
<td align="center">G3</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">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">2013-10-22</td>
<td align="center">I10</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">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
@ -1019,50 +1019,50 @@ different bug/drug combinations, you can use the
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">AMX</td>
<td align="center">1429</td>
<td align="center">1211</td>
<td align="center">3174</td>
<td align="center">5814</td>
<td align="center">1503</td>
<td align="center">1236</td>
<td align="center">3099</td>
<td align="center">5838</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">AMC</td>
<td align="center">2674</td>
<td align="center">1190</td>
<td align="center">1950</td>
<td align="center">5814</td>
<td align="center">2754</td>
<td align="center">1167</td>
<td align="center">1917</td>
<td align="center">5838</td>
</tr>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">2013</td>
<td align="center">1796</td>
<td align="center">2005</td>
<td align="center">5814</td>
<td align="center">1994</td>
<td align="center">1798</td>
<td align="center">2046</td>
<td align="center">5838</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">1931</td>
<td align="center">1816</td>
<td align="center">2067</td>
<td align="center">5814</td>
<td align="center">1990</td>
<td align="center">1840</td>
<td align="center">2008</td>
<td align="center">5838</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">1299</td>
<td align="center">1299</td>
<td align="center">1356</td>
<td align="center">1356</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">AMC</td>
<td align="center">589</td>
<td align="center">258</td>
<td align="center">452</td>
<td align="center">1299</td>
<td align="center">585</td>
<td align="center">293</td>
<td align="center">478</td>
<td align="center">1356</td>
</tr>
</tbody>
</table>
@ -1084,34 +1084,34 @@ different bug/drug combinations, you can use the
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">1931</td>
<td align="center">1816</td>
<td align="center">2067</td>
<td align="center">5814</td>
<td align="center">1990</td>
<td align="center">1840</td>
<td align="center">2008</td>
<td align="center">5838</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">GEN</td>
<td align="center">443</td>
<td align="center">411</td>
<td align="center">445</td>
<td align="center">1299</td>
<td align="center">465</td>
<td align="center">408</td>
<td align="center">483</td>
<td align="center">1356</td>
</tr>
<tr class="odd">
<td align="center">S. aureus</td>
<td align="center">GEN</td>
<td align="center">1156</td>
<td align="center">1009</td>
<td align="center">1089</td>
<td align="center">3254</td>
<td align="center">1113</td>
<td align="center">1036</td>
<td align="center">1151</td>
<td align="center">3300</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">1814</td>
<td align="center">1814</td>
<td align="center">1886</td>
<td align="center">1886</td>
</tr>
</tbody>
</table>
@ -1143,7 +1143,7 @@ I (<code><a href="../reference/proportion.html">proportion_SI()</a></code>, equa
own:</p>
<div class="sourceCode" id="cb25"><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.5895247</span></span></code></pre></div>
<span><span class="co"># [1] 0.5836026</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="cb26"><pre class="downlit sourceCode r">
@ -1158,19 +1158,19 @@ own:</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5991561</td>
<td align="center">0.5942184</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5865273</td>
<td align="center">0.5841676</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5910560</td>
<td align="center">0.5905338</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5797160</td>
<td align="center">0.5620063</td>
</tr>
</tbody>
</table>
@ -1195,23 +1195,23 @@ all isolates available for every group (i.e. values S, I or R):</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5991561</td>
<td align="center">3555</td>
<td align="center">0.5942184</td>
<td align="center">3736</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5865273</td>
<td align="center">4305</td>
<td align="center">0.5841676</td>
<td align="center">4295</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5910560</td>
<td align="center">1856</td>
<td align="center">0.5905338</td>
<td align="center">1817</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5797160</td>
<td align="center">2465</td>
<td align="center">0.5620063</td>
<td align="center">2532</td>
</tr>
</tbody>
</table>
@ -1236,27 +1236,27 @@ therapies very easily:</p>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.6646027</td>
<td align="center">0.6444788</td>
<td align="center">0.8778810</td>
<td align="center">0.6716341</td>
<td align="center">0.6560466</td>
<td align="center">0.8859198</td>
</tr>
<tr class="even">
<td align="center">Klebsiella</td>
<td align="center">0.6520400</td>
<td align="center">0.6574288</td>
<td align="center">0.8760585</td>
<td align="center">0.6474926</td>
<td align="center">0.6438053</td>
<td align="center">0.8753687</td>
</tr>
<tr class="odd">
<td align="center">Staphylococcus</td>
<td align="center">0.6681008</td>
<td align="center">0.6653350</td>
<td align="center">0.8899816</td>
<td align="center">0.6660606</td>
<td align="center">0.6512121</td>
<td align="center">0.8875758</td>
</tr>
<tr class="even">
<td align="center">Streptococcus</td>
<td align="center">0.4751929</td>
<td align="center">0.4729586</td>
<td align="center">0.0000000</td>
<td align="center">0.4751929</td>
<td align="center">0.4729586</td>
</tr>
</tbody>
</table>
@ -1284,23 +1284,23 @@ classes, use a antibiotic class selector such as
<tbody>
<tr class="odd">
<td align="left">Hospital A</td>
<td align="right">59.9%</td>
<td align="right">35.9%</td>
<td align="right">59.4%</td>
<td align="right">36.3%</td>
</tr>
<tr class="even">
<td align="left">Hospital B</td>
<td align="right">58.7%</td>
<td align="right">36.4%</td>
<td align="right">58.4%</td>
<td align="right">36.3%</td>
</tr>
<tr class="odd">
<td align="left">Hospital C</td>
<td align="right">59.1%</td>
<td align="right">37.4%</td>
<td align="right">38.5%</td>
</tr>
<tr class="even">
<td align="left">Hospital D</td>
<td align="right">58.0%</td>
<td align="right">36.4%</td>
<td align="right">56.2%</td>
<td align="right">34.7%</td>
</tr>
</tbody>
</table>
@ -1416,18 +1416,16 @@ classes) <code>&lt;mic&gt;</code> and <code>&lt;disk&gt;</code>:</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.025 &lt;=0.001 &lt;=0.001 32 0.01 4 0.002 0.125 0.01 </span></span>
<span><span class="co"># [10] 32 0.002 0.125 0.005 0.5 1 2 16 4 </span></span>
<span><span class="co"># [19] &lt;=0.001 0.25 0.125 128 &lt;=0.001 0.005 &gt;=256 64 16 </span></span>
<span><span class="co"># [28] 32 0.025 8 0.125 1 0.25 64 0.0625 0.25 </span></span>
<span><span class="co"># [37] 0.5 0.5 16 0.002 0.002 0.5 0.005 16 0.25 </span></span>
<span><span class="co"># [46] 0.125 8 &lt;=0.001 1 0.025 &lt;=0.001 0.5 8 16 </span></span>
<span><span class="co"># [55] 1 16 8 0.002 0.5 0.5 128 16 &gt;=256 </span></span>
<span><span class="co"># [64] 2 0.005 0.01 4 8 0.0625 0.125 0.125 0.125 </span></span>
<span><span class="co"># [73] 16 0.002 0.01 8 1 8 0.125 2 32 </span></span>
<span><span class="co"># [82] 0.0625 &gt;=256 4 0.005 128 0.025 1 128 0.005 </span></span>
<span><span class="co"># [91] &gt;=256 0.025 32 8 &lt;=0.001 &lt;=0.001 &lt;=0.001 1 0.025 </span></span>
<span><span class="co"># [100] 0.01</span></span></code></pre></div>
<span><span class="co"># [1] 0.005 0.0625 0.25 0.025 4 16 0.5 16 &gt;=256 0.0625</span></span>
<span><span class="co"># [11] 1 8 8 0.025 64 8 128 2 16 0.25 </span></span>
<span><span class="co"># [21] 0.025 0.001 0.002 1 1 32 8 8 0.01 0.01 </span></span>
<span><span class="co"># [31] 8 16 8 0.025 0.025 0.025 0.01 0.025 0.125 64 </span></span>
<span><span class="co"># [41] 8 0.025 4 0.01 32 32 0.025 0.005 64 0.025 </span></span>
<span><span class="co"># [51] &gt;=256 2 4 32 0.002 0.01 0.5 8 1 8 </span></span>
<span><span class="co"># [61] 0.125 8 0.001 0.5 128 0.25 128 0.025 4 0.025 </span></span>
<span><span class="co"># [71] 0.0625 0.002 1 0.001 4 0.125 0.5 32 0.5 0.005 </span></span>
<span><span class="co"># [81] 0.25 4 &gt;=256 8 &gt;=256 0.01 &gt;=256 0.01 16 &gt;=256 </span></span>
<span><span class="co"># [91] 1 0.0625 0.01 1 0.005 0.001 16 0.125 0.005 2</span></span></code></pre></div>
<div class="sourceCode" id="cb36"><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>
@ -1461,10 +1459,10 @@ plotting:</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] 22 28 30 21 25 20 18 28 17 29 29 23 17 17 21 18 17 17 23 20 21 21 23 28 29</span></span>
<span><span class="co"># [26] 18 19 31 17 20 26 29 27 29 18 30 21 30 28 20 26 28 30 30 23 31 20 22 25 30</span></span>
<span><span class="co"># [51] 22 19 25 25 26 21 22 23 22 24 24 27 23 29 30 26 18 24 31 29 30 31 19 25 22</span></span>
<span><span class="co"># [76] 28 20 18 31 17 18 23 27 23 26 28 22 28 18 25 22 28 24 31 26 25 18 30 18 21</span></span></code></pre></div>
<span><span class="co"># [1] 22 25 18 25 31 22 24 27 25 17 20 31 24 28 26 23 19 28 19 23 29 29 17 25 22</span></span>
<span><span class="co"># [26] 17 18 18 26 27 28 19 27 24 22 23 18 29 19 25 24 18 21 17 17 29 18 25 28 29</span></span>
<span><span class="co"># [51] 22 20 27 21 27 27 31 31 18 22 20 26 24 20 25 28 25 20 19 28 30 19 28 19 23</span></span>
<span><span class="co"># [76] 28 28 27 21 23 27 21 31 23 30 31 19 25 31 25 30 22 28 29 31 28 21 22 25 21</span></span></code></pre></div>
<div class="sourceCode" id="cb42"><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: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 40 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: 49 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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">
@ -380,19 +380,19 @@ names or codes, this would have worked exactly the same way:</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 R I I</span></span>
<span><span class="co"># 2 I R R S I I</span></span>
<span><span class="co"># 3 I S R S I R</span></span>
<span><span class="co"># 4 S S R R R I</span></span>
<span><span class="co"># 5 R I R S S I</span></span>
<span><span class="co"># 6 S R S I I I</span></span>
<span><span class="co"># 1 S S R R I R</span></span>
<span><span class="co"># 2 I R S S R I</span></span>
<span><span class="co"># 3 I S R S R I</span></span>
<span><span class="co"># 4 S I S S I R</span></span>
<span><span class="co"># 5 I I I R R R</span></span>
<span><span class="co"># 6 I I R R S I</span></span>
<span><span class="co"># kanamycin</span></span>
<span><span class="co"># 1 I</span></span>
<span><span class="co"># 1 S</span></span>
<span><span class="co"># 2 S</span></span>
<span><span class="co"># 3 I</span></span>
<span><span class="co"># 4 S</span></span>
<span><span class="co"># 5 R</span></span>
<span><span class="co"># 6 S</span></span></code></pre></div>
<span><span class="co"># 3 S</span></span>
<span><span class="co"># 4 I</span></span>
<span><span class="co"># 5 S</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">
@ -433,40 +433,40 @@ Unique: 5</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Mono-resistant</td>
<td align="right">3237</td>
<td align="right">64.74%</td>
<td align="right">3237</td>
<td align="right">64.74%</td>
<td align="right">3190</td>
<td align="right">63.80%</td>
<td align="right">3190</td>
<td align="right">63.80%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Negative</td>
<td align="right">975</td>
<td align="right">19.50%</td>
<td align="right">4212</td>
<td align="right">84.24%</td>
<td align="right">1031</td>
<td align="right">20.62%</td>
<td align="right">4221</td>
<td align="right">84.42%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Multi-drug-resistant</td>
<td align="right">458</td>
<td align="right">9.16%</td>
<td align="right">4670</td>
<td align="right">93.40%</td>
<td align="right">454</td>
<td align="right">9.08%</td>
<td align="right">4675</td>
<td align="right">93.50%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Poly-resistant</td>
<td align="right">234</td>
<td align="right">4.68%</td>
<td align="right">4904</td>
<td align="right">98.08%</td>
<td align="right">233</td>
<td align="right">4.66%</td>
<td align="right">4908</td>
<td align="right">98.16%</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="left">Extensively drug-resistant</td>
<td align="right">96</td>
<td align="right">1.92%</td>
<td align="right">92</td>
<td align="right">1.84%</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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">
@ -137,7 +137,7 @@
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="1.8.2.9100" id="amr-1829100">AMR 1.8.2.9100<a class="anchor" aria-label="anchor" href="#amr-1829100"></a></h2>
<h2 class="pkg-version" data-toc-text="1.8.2.9101" id="amr-1829101">AMR 1.8.2.9101<a class="anchor" aria-label="anchor" href="#amr-1829101"></a></h2>
<p><em>(this beta version will eventually become v2.0! Were happy to reach a new major milestone soon!)</em></p>
<p>This is a new major release of the AMR package, with great new additions but also some breaking changes for current users. These are all listed below.</p>
<p><strong><a href="https://en.wikipedia.org/wiki/TL;DR" class="external-link">TL;DR</a></strong></p>
@ -151,25 +151,25 @@
<li>Many new interesting functions, such as <code><a href="../reference/proportion.html">sir_confidence_interval()</a></code> and <code><a href="../reference/mean_amr_distance.html">mean_amr_distance()</a></code>, and <code><a href="../reference/add_custom_microorganisms.html">add_custom_microorganisms()</a></code> to add custom microorganisms to this package</li>
<li>Many small bug fixes</li>
</ul><div class="section level3">
<h3 id="new-1-8-2-9100">New<a class="anchor" aria-label="anchor" href="#new-1-8-2-9100"></a></h3>
<h3 id="new-1-8-2-9101">New<a class="anchor" aria-label="anchor" href="#new-1-8-2-9101"></a></h3>
<div class="section level4">
<h4 id="sir-vs-rsi-1-8-2-9100">SIR vs. RSI<a class="anchor" aria-label="anchor" href="#sir-vs-rsi-1-8-2-9100"></a></h4>
<h4 id="sir-vs-rsi-1-8-2-9101">SIR vs. RSI<a class="anchor" aria-label="anchor" href="#sir-vs-rsi-1-8-2-9101"></a></h4>
<p>For this milestone version, we replaced all mentions of RSI with SIR, to comply with what is actually being commonly used in the field of clinical microbiology when it comes to this tri-form regarding AMR.</p>
<p>While existing functions such as <code><a href="../reference/AMR-deprecated.html">as.rsi()</a></code>, <code><a href="../reference/AMR-deprecated.html">rsi_df()</a></code> and <code><a href="../reference/AMR-deprecated.html">ggplot_rsi()</a></code> still work, their replacements <code><a href="../reference/as.sir.html">as.sir()</a></code>, <code><a href="../reference/proportion.html">sir_df()</a></code>, <code><a href="../reference/ggplot_sir.html">ggplot_sir()</a></code> are now the current functions for AMR data analysis. A warning will be thrown once a session to remind users about this. The data set <code>rsi_translation</code> is now called <code>clinical_breakpoints</code> to better reflect its content.</p>
<p>The RSI functions will be removed in a future version, but not before late 2023 / early 2024.</p>
</div>
<div class="section level4">
<h4 id="interpretation-of-mic-and-disk-diffusion-values-1-8-2-9100">Interpretation of MIC and disk diffusion values<a class="anchor" aria-label="anchor" href="#interpretation-of-mic-and-disk-diffusion-values-1-8-2-9100"></a></h4>
<h4 id="interpretation-of-mic-and-disk-diffusion-values-1-8-2-9101">Interpretation of MIC and disk diffusion values<a class="anchor" aria-label="anchor" href="#interpretation-of-mic-and-disk-diffusion-values-1-8-2-9101"></a></h4>
<p>The clinical breakpoints and intrinsic resistance of EUCAST 2022 and CLSI 2022 have been added for <code><a href="../reference/as.sir.html">as.sir()</a></code>. EUCAST 2022 (v12.0) is now the new default guideline for all MIC and disks diffusion interpretations, and for <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> to apply EUCAST Expert Rules. The default guideline (EUCAST) can now be changed with the new <code>AMR_guideline</code> option, such as: <code>options(AMR_guideline = "CLSI 2020")</code>.</p>
<p>Interpretation guidelines older than 10 years were removed, the oldest now included guidelines of EUCAST and CLSI are from 2013.</p>
</div>
<div class="section level4">
<h4 id="supported-languages-1-8-2-9100">Supported languages<a class="anchor" aria-label="anchor" href="#supported-languages-1-8-2-9100"></a></h4>
<h4 id="supported-languages-1-8-2-9101">Supported languages<a class="anchor" aria-label="anchor" href="#supported-languages-1-8-2-9101"></a></h4>
<p>We added support for the following languages: Chinese, Greek, Japanese, Polish, Turkish and Ukrainian. All antibiotic names are now available in these languages, and the AMR package will automatically determine a supported language based on the user system language.</p>
<p>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 and according to download stats used in almost all countries in the world!</p>
</div>
<div class="section level4">
<h4 id="microbiological-taxonomy-1-8-2-9100">Microbiological taxonomy<a class="anchor" aria-label="anchor" href="#microbiological-taxonomy-1-8-2-9100"></a></h4>
<h4 id="microbiological-taxonomy-1-8-2-9101">Microbiological taxonomy<a class="anchor" aria-label="anchor" href="#microbiological-taxonomy-1-8-2-9101"></a></h4>
<p>The <code>microorganisms</code> data set no longer relies on the Catalogue of Life, but on the List of Prokaryotic names with Standing in Nomenclature (LPSN) and is supplemented with the backbone taxonomy from 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,400 taxonomic names from 2022.</p>
<p>We previously relied on our own experience to categorise species into pathogenic groups, but we were very happy to encounter the very recent work of Bartlett <em>et al.</em> (2022, DOI <a href="https://doi.org/10.1099/mic.0.001269" class="external-link">10.1099/mic.0.001269</a>) who extensively studied medical-scientific literature to categorise all bacterial species into groups. See <code><a href="../reference/mo_matching_score.html">mo_matching_score()</a></code> on how their work was incorporated into the <code>prevalence</code> column of the <code>microorganisms</code> data set. Using their results, the <code><a href="../reference/as.mo.html">as.mo()</a></code> and all <code>mo_*()</code> functions are now much better capable of converting user input to valid taxonomic records.</p>
<p>The new function <code><a href="../reference/add_custom_microorganisms.html">add_custom_microorganisms()</a></code> allows users to add custom microorganisms to the <code>AMR</code> package.</p>
@ -193,7 +193,7 @@
<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>
</ul></div>
<div class="section level4">
<h4 id="antibiotic-agents-and-selectors-1-8-2-9100">Antibiotic agents and selectors<a class="anchor" aria-label="anchor" href="#antibiotic-agents-and-selectors-1-8-2-9100"></a></h4>
<h4 id="antibiotic-agents-and-selectors-1-8-2-9101">Antibiotic agents and selectors<a class="anchor" aria-label="anchor" href="#antibiotic-agents-and-selectors-1-8-2-9101"></a></h4>
<p>The new function <code><a href="../reference/add_custom_antimicrobials.html">add_custom_antimicrobials()</a></code> allows users to add custom antimicrobial codes and names to the <code>AMR</code> package.</p>
<p>The <code>antibiotics</code> data set was greatly updated:</p>
<ul><li>The following 20 antibiotics have been added (also includes the <a href="https://www.whocc.no/atc_ddd_index/?code=J01RA&amp;showdescription=no" class="external-link">new J01RA ATC group</a>): azithromycin/fluconazole/secnidazole (AFC), cefepime/amikacin (CFA), cefixime/ornidazole (CEO), ceftriaxone/beta-lactamase inhibitor (CEB), ciprofloxacin/metronidazole (CIM), ciprofloxacin/ornidazole (CIO), ciprofloxacin/tinidazole (CIT), furazidin (FUR), isoniazid/sulfamethoxazole/trimethoprim/pyridoxine (IST), lascufloxacin (LSC), levofloxacin/ornidazole (LEO), nemonoxacin (NEM), norfloxacin/metronidazole (NME), norfloxacin/tinidazole (NTI), ofloxacin/ornidazole (OOR), oteseconazole (OTE), rifampicin/ethambutol/isoniazid (REI), sarecycline (SRC), tetracycline/oleandomycin (TOL), and thioacetazone (TAT)</li>
@ -205,14 +205,14 @@
</ul><p>Also, we added support for using antibiotic selectors in scoped <code>dplyr</code> verbs (with or without using <code><a href="https://dplyr.tidyverse.org/reference/vars.html" class="external-link">vars()</a></code>), such as in: <code>... %&gt;% summarise_at(aminoglycosides(), resistance)</code>, please see <code><a href="../reference/proportion.html">resistance()</a></code> for examples.</p>
</div>
<div class="section level4">
<h4 id="antiviral-agents-1-8-2-9100">Antiviral agents<a class="anchor" aria-label="anchor" href="#antiviral-agents-1-8-2-9100"></a></h4>
<h4 id="antiviral-agents-1-8-2-9101">Antiviral agents<a class="anchor" aria-label="anchor" href="#antiviral-agents-1-8-2-9101"></a></h4>
<p>We now added extensive support for antiviral agents! For the first time, the <code>AMR</code> package has extensive support for antiviral drugs and to work with their names, codes and other data in any way.</p>
<ul><li>The <code>antivirals</code> data set has been extended with 18 new drugs (also from the <a href="https://www.whocc.no/atc_ddd_index/?code=J05AJ&amp;showdescription=no" class="external-link">new J05AJ ATC group</a>) and now also contains antiviral identifiers and LOINC codes</li>
<li>A new data type <code>av</code> (<em>antivirals</em>) has been added, which is functionally similar to <code>ab</code> for antibiotics</li>
<li>Functions <code><a href="../reference/as.av.html">as.av()</a></code>, <code><a href="../reference/av_property.html">av_name()</a></code>, <code><a href="../reference/av_property.html">av_atc()</a></code>, <code><a href="../reference/av_property.html">av_synonyms()</a></code>, <code><a href="../reference/av_from_text.html">av_from_text()</a></code> have all been added as siblings to their <code>ab_*()</code> equivalents</li>
</ul></div>
<div class="section level4">
<h4 id="other-new-functions-1-8-2-9100">Other new functions<a class="anchor" aria-label="anchor" href="#other-new-functions-1-8-2-9100"></a></h4>
<h4 id="other-new-functions-1-8-2-9101">Other new functions<a class="anchor" aria-label="anchor" href="#other-new-functions-1-8-2-9101"></a></h4>
<ul><li>Function <code><a href="../reference/proportion.html">sir_confidence_interval()</a></code> to add confidence intervals in AMR calculation. This is now also included in <code><a href="../reference/proportion.html">sir_df()</a></code> and <code><a href="../reference/proportion.html">proportion_df()</a></code>.</li>
<li>Function <code><a href="../reference/mean_amr_distance.html">mean_amr_distance()</a></code> to calculate the mean AMR distance. The mean AMR distance is a normalised numeric value to compare AMR test results and can help to identify similar isolates, without comparing antibiograms by hand.</li>
<li>Function <code><a href="../reference/as.sir.html">sir_interpretation_history()</a></code> to view the history of previous runs of <code><a href="../reference/as.sir.html">as.sir()</a></code> (previously <code><a href="../reference/AMR-deprecated.html">as.rsi()</a></code>). This returns a logbook with the selected guideline, reference table and specific interpretation of each row in a data set on which <code><a href="../reference/as.sir.html">as.sir()</a></code> was run.</li>
@ -221,7 +221,7 @@
</ul></div>
</div>
<div class="section level3">
<h3 id="changes-1-8-2-9100">Changes<a class="anchor" aria-label="anchor" href="#changes-1-8-2-9100"></a></h3>
<h3 id="changes-1-8-2-9101">Changes<a class="anchor" aria-label="anchor" href="#changes-1-8-2-9101"></a></h3>
<ul><li>Argument <code>combine_IR</code> has been removed from this package (affecting functions <code><a href="../reference/count.html">count_df()</a></code>, <code><a href="../reference/proportion.html">proportion_df()</a></code>, and <code><a href="../reference/proportion.html">sir_df()</a></code> and some plotting functions), since it was replaced with <code>combine_SI</code> three years ago</li>
<li>Using <code>units</code> in <code>ab_ddd(..., units = "...")</code> had been deprecated for some time and is now not supported anymore. Use <code><a href="../reference/ab_property.html">ab_ddd_units()</a></code> instead.</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><a href="https://tsibble.tidyverts.org/reference/tsibble.html" class="external-link">tsibble::tsibble</a></code>. AMR package functions that have a data set as output (such as <code><a href="../reference/proportion.html">sir_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>
@ -260,7 +260,7 @@
<li>Cleaning columns with <code><a href="../reference/as.sir.html">as.sir()</a></code>, <code><a href="../reference/as.mic.html">as.mic()</a></code>, or <code><a href="../reference/as.disk.html">as.disk()</a></code> will now show the column name in the warning for invalid results</li>
</ul></div>
<div class="section level3">
<h3 id="other-1-8-2-9100">Other<a class="anchor" aria-label="anchor" href="#other-1-8-2-9100"></a></h3>
<h3 id="other-1-8-2-9101">Other<a class="anchor" aria-label="anchor" href="#other-1-8-2-9101"></a></h3>
<ul><li>Added Peter Dutey-Magni, Dmytro Mykhailenko, Anton Mymrikov, Andrew Norgan, and Jonas Salm as contributors, to thank them for their valuable input</li>
<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>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: 2023-01-24T09:26Z
last_built: 2023-01-24T14:02Z
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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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

@ -18,7 +18,7 @@ The AMR package is available in English, Chinese, Danish, Dutch, French, German,
<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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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: 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: 14 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.2 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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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">
@ -200,16 +200,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 1939-03-18 83 83.85479 60</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1968-10-11 54 54.28767 31</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1936-08-29 86 86.40548 63</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1968-03-01 54 54.90137 31</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1990-07-12 32 32.53699 9</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1977-07-21 45 45.51233 22</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1987-03-10 35 35.87671 12</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1967-09-18 55 55.35068 32</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1975-05-21 47 47.67945 24</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1948-01-07 75 75.04658 51</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1991-08-29 31 31.40548 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1975-10-07 47 47.29863 24</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1951-09-28 71 71.32329 48</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1977-10-23 45 45.25479 22</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1966-09-10 56 56.37260 33</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1979-04-26 43 43.74795 20</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1994-03-06 28 28.88767 5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1943-04-26 79 79.74795 56</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1989-09-22 33 33.33973 10</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1984-05-03 38 38.72877 15</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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">
@ -519,16 +519,16 @@ A microorganism is categorised as "Resistant" when there is a high likelihood of
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 50 × 12</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> datetime index ab_input ab_guid…¹ mo_in…² mo_guideline 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> 2023-01-24 <span style="color: #949494;">09:27:14</span> 1 TOB TOB Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2023-01-24 <span style="color: #949494;">09:27:14</span> 1 GEN GEN Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2023-01-24 <span style="color: #949494;">09:27:14</span> 1 CIP CIP Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2023-01-24 <span style="color: #949494;">09:27:13</span> 1 AMP AMP Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2023-01-24 <span style="color: #949494;">09:27:09</span> 1 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2023-01-24 <span style="color: #949494;">09:27:09</span> 2 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2023-01-24 <span style="color: #949494;">09:27:09</span> 3 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2023-01-24 <span style="color: #949494;">09:27:09</span> 4 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2023-01-24 <span style="color: #949494;">09:27:09</span> 5 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2023-01-24 <span style="color: #949494;">09:27:09</span> 6 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2023-01-24 <span style="color: #949494;">14:02:55</span> 1 TOB TOB Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2023-01-24 <span style="color: #949494;">14:02:54</span> 1 GEN GEN Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2023-01-24 <span style="color: #949494;">14:02:54</span> 1 CIP CIP Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2023-01-24 <span style="color: #949494;">14:02:54</span> 1 AMP AMP Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2023-01-24 <span style="color: #949494;">14:02:49</span> 1 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2023-01-24 <span style="color: #949494;">14:02:49</span> 2 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2023-01-24 <span style="color: #949494;">14:02:49</span> 3 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2023-01-24 <span style="color: #949494;">14:02:49</span> 4 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2023-01-24 <span style="color: #949494;">14:02:49</span> 5 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2023-01-24 <span style="color: #949494;">14:02:49</span> 6 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 40 more rows, 5 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;"># input &lt;dbl&gt;, outcome &lt;sir&gt;, breakpoint_S_R &lt;chr&gt;, and abbreviated variable</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># names ¹ab_guideline, ²mo_input, ³guideline</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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 @@ 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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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">
@ -187,46 +187,40 @@
<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] 30 23 17 37 39 24 64 19 62 48 55 64 45 60 51 62 4 14 40 19 5 28 20 1 31</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 55 21 11 17 9 2 10 41 22 43 47 41 44 33 48 1 25 11 55 40 23 4 9 26 53</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 62 11 10 57 28 57 8 27 28 49 14 51 7 39 18 23 46 58 9 59 20 63 2 40 33</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 41 26 12 36 58 30 44 29 1 41 3 31 32 36 25 1 11 60 1 13 3 23 33 57 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 27 56 7 42 63 29 56 35 21 62 62 24 12 52 10 28 14 55 50 7 8 61 8 35 64</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 40 58 62 15 15 13 9 51 31 40 20 3 40 47 6 44 46 18 45 17 46 60 8 50 16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 16 42 22 26 29 50 6 34 9 31 63 17 24 2 3 4 56 63 30 14 54 2 63 29 6</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 37 18 63 40 60 48 61 3 38 24 58 34 26 29 3 3 20 40 4 63 1 46 3 34 26</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 28 43 21 45 27 10 29 4 56 6 39 24 21 6 13 31 23 41 51 7 62 9 12 7 14</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 29 52 4 60 22 40 28 51 2 61 48 62 11 48 38 27 34 23 64 11 1 20 22 55 63</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 53 19 24 65 7 22 18 5 45 61 15 4 10 43 23 17 16 61 59 11 10 56 11 28 23</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 41 8 8 6 13 63 40 49 65 3 5 1 25 52 48 36 38 57 57 5 16 47 6 59 49</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 15 4 12 64 2 63 9 50 65 53 55 5 47 13 60 43 42 18 43 61 56 62 27 47 60</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 58 43 16 32 53 33 62 58 11 15 47 53 32 9 26 39 25 27 54 40 52 13 37 44 54</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 35 62 15 63 30 24 3 10 43 2 15 17 45 53 2 46 22 44 34 56 46 17 61 20 59</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 28 5 59 47 1 40 41 57 4 48 35 38 49 63 29 58 36 57 6 62 8 39 45 15 13</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] FALSE FALSE FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] FALSE FALSE TRUE FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] FALSE FALSE TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] FALSE TRUE FALSE FALSE TRUE FALSE FALSE TRUE TRUE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] TRUE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [157] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] FALSE FALSE TRUE TRUE TRUE TRUE FALSE TRUE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] TRUE TRUE TRUE TRUE TRUE FALSE FALSE TRUE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] TRUE TRUE FALSE TRUE TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] FALSE TRUE TRUE TRUE FALSE TRUE FALSE TRUE FALSE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] TRUE FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] TRUE TRUE FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [157] FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] FALSE FALSE FALSE TRUE TRUE TRUE TRUE FALSE</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: 8 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 2 × 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;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2002-07-30 218912 76 F ICU 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-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;">3</span> 2002-07-15 426426 67 F ICU B_ESCHR_COLI R NA NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</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;">5</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: #BCBCBC;">6</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: #BCBCBC;">7</span> 2002-08-14 785317 51 F ICU B_ESCHR_COLI R NA NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">8</span> 2002-08-14 785317 51 F ICU B_ESCHR_COLI R NA NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2002-08-28 390178 57 M Clinical B_STRPT_SLVR S NA NA S </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2002-09-23 F35553 51 M ICU B_STPHY_AURS S NA S NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 36 more variables: AMC &lt;sir&gt;, AMP &lt;sir&gt;, TZP &lt;sir&gt;, CZO &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># FEP &lt;sir&gt;, CXM &lt;sir&gt;, FOX &lt;sir&gt;, CTX &lt;sir&gt;, CAZ &lt;sir&gt;, CRO &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># GEN &lt;sir&gt;, TOB &lt;sir&gt;, AMK &lt;sir&gt;, KAN &lt;sir&gt;, TMP &lt;sir&gt;, SXT &lt;sir&gt;,</span></span>
@ -263,16 +257,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> 408807 2009-05-07 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> A68B33 2007-04-14 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 67B300 2005-10-06 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> B61944 2010-10-18 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 675872 2011-03-03 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> B52127 2007-06-03 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 8DD375 2017-09-13 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 887DF6 2006-04-18 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> A49648 2017-04-06 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 545388 2013-12-05 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 533225 2008-10-01 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 686445 2012-05-24 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 351193 2007-01-15 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 175532 2012-10-11 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> F50462 2008-05-06 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 1B144C 2004-05-10 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 353710 2008-12-29 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 450741 2002-11-21 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> A76045 2015-10-06 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 914520 2003-07-11 A 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>
@ -284,19 +278,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 [179]</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 2009-05-07 408807 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> ICU 2007-04-14 A68B33 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical 2005-10-06 67B300 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> ICU 2010-10-18 B61944 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2011-03-03 675872 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> ICU 2007-06-03 B52127 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> ICU 2017-09-13 8DD375 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> ICU 2006-04-18 887DF6 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> Clinical 2017-04-06 A49648 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Clinical 2013-12-05 545388 2 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [184]</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 2008-10-01 533225 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> Clinical 2012-05-24 686445 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> ICU 2007-01-15 351193 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical 2012-10-11 175532 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> ICU 2008-05-06 F50462 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Outpatient 2004-05-10 1B144C 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> ICU 2008-12-29 353710 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> ICU 2002-11-21 450741 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> ICU 2015-10-06 A76045 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> ICU 2003-07-11 914520 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>
@ -311,9 +305,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 102 14 50 65</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 62 10 33 41</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 15 8 12 13</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 104 15 51 69</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 68 13 38 50</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 12 7 11 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 class="co"># grouping on patients and microorganisms leads to the same</span></span></span>
<span class="r-in"><span> <span class="co"># results as first_isolate() when using 'episode-based':</span></span></span>
@ -341,19 +335,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> 408807 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> A68B33 B_STPHY_AURS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 67B300 B_KLBSL_PNMN Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> B61944 B_STPHY_CONS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 675872 B_BCTRD_FRGL Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> B52127 B_ESCHR_COLI ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 8DD375 B_ESCHR_COLI ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 887DF6 B_BCTRD_FRGL ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> A49648 B_ACNTB_BMNN Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 545388 B_STPHY_CPTS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, mo, ward [192]</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> 533225 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 686445 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 351193 B_ESCHR_COLI ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 175532 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> F50462 B_BCTRD_FRGL ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 1B144C B_STRPT_PNMN Outpatient TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 353710 B_STPHY_EPDR ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 450741 B_STPHY_EPDR ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> A76045 B_STPHY_EPDR ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 914520 B_STPHY_CONS ICU 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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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,9 +177,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.03596</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 3.040775</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.04625385</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.03250172</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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">
@ -196,31 +196,30 @@
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">sir</span> <span class="op">&lt;-</span> <span class="fu"><a href="random.html">random_sir</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">sir</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'sir'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] S I R I R S I I S S</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] I I I I R S S R S I</span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">sir</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.4743416 -0.4743416 1.8973666 -0.4743416 1.8973666 -0.4743416</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.4743416 -0.4743416 -0.4743416 -0.4743416</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.4743416 -0.4743416 -0.4743416 -0.4743416 1.8973666 -0.4743416</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.4743416 1.8973666 -0.4743416 -0.4743416</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">mic</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">mic</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] 2 0.5 32 0.025 &lt;=0.005 &lt;=0.005 1 0.01 0.025 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 0.01 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 4 8 0.001 1 0.025 0.01 64 1 0.25 8 </span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">mic</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 1.0124233 0.5545130 1.9282440 -0.4350148 -0.9666323 -0.9666323</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.7834682 -0.7376771 -0.4350148 -0.7376771</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.6000773 0.8005604 -1.7988600 0.1991111 -0.8678454 -1.1328696</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 1.4020096 0.1991111 -0.2018550 0.8005604</span>
<span class="r-in"><span><span class="co"># equal to the Z-score of their log2:</span></span></span>
<span class="r-in"><span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log2</a></span><span class="op">(</span><span class="va">mic</span><span class="op">)</span> <span class="op">-</span> <span class="fu"><a href="https://rdrr.io/r/base/mean.html" class="external-link">mean</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log2</a></span><span class="op">(</span><span class="va">mic</span><span class="op">)</span><span class="op">)</span><span class="op">)</span> <span class="op">/</span> <span class="fu"><a href="https://rdrr.io/r/stats/sd.html" class="external-link">sd</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log2</a></span><span class="op">(</span><span class="va">mic</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 1.0124233 0.5545130 1.9282440 -0.4350148 -0.9666323 -0.9666323</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.7834682 -0.7376771 -0.4350148 -0.7376771</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.6000773 0.8005604 -1.7988600 0.1991111 -0.8678454 -1.1328696</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 1.4020096 0.1991111 -0.2018550 0.8005604</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">disk</span> <span class="op">&lt;-</span> <span class="fu"><a href="random.html">random_disk</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">disk</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] 27 42 47 19 21 32 7 27 11 32</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 47 47 48 11 25 47 41 41 25 43</span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">disk</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.03968726 1.23030512 1.62717774 -0.59530893 -0.43655988 0.43655988</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -1.54780321 0.03968726 -1.23030512 0.43655988</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.7483177 0.7483177 0.8270879 -2.0874124 -0.9846285 0.7483177</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.2756960 0.2756960 -0.9846285 0.4332365</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>
@ -231,35 +230,35 @@
<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 S 24 2 &gt;=16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B I 31 4 &gt;=16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C S 22 4 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D R 18 1 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E I 18 0.5 &gt;=16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F S 25 1 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G I 30 2 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H I 25 0.5 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I R 31 2 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J I 19 4 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A I 23 2 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B R 24 2 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C I 17 4 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D I 28 &gt;=8 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E R 21 2 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F I 22 0.25 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G S 28 &gt;=8 &lt;=1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H R 22 1 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I R 24 4 &lt;=1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J I 30 4 4</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" 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> [1] 0.2382463 0.7955297 -0.1157524 -0.2672839 -0.4858364 -0.4005406</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.4131124 -0.4981535 0.5828624 -0.2621839</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.36533824 0.18335833 -0.58549269 0.60903763 -0.01036260 -0.61484124</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.02482806 0.20385648 0.03371288 0.57089751</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 "gent" and "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> 4 D R 18 1 0.5 -0.8682389</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H I 25 0.5 2 -0.8274710</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F S 25 1 1 -0.6322451</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I R 31 2 0.5 -0.4370192</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E I 18 0.5 &gt;=16 -0.1194896</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C S 22 4 1 0.2301943</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J I 19 4 1 0.2301943</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G I 30 2 8 0.5069560</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A S 24 2 &gt;=16 0.7429498</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B I 31 4 &gt;=16 1.1741694</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F I 22 0.25 4 -0.59700430</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I R 24 4 &lt;=1 -0.52643647</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A I 23 2 2 -0.22714558</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B R 24 2 2 -0.22714558</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E R 21 2 2 -0.22714558</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G S 28 &gt;=8 &lt;=1 -0.19186166</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H R 22 1 4 0.07214531</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C I 17 4 2 0.10742922</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J I 30 4 4 0.74129491</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D I 28 &gt;=8 4 1.07586972</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>
@ -272,16 +271,16 @@
<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 S 22 4 1 -0.1157524 0.0000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 J I 19 4 1 -0.2621839 0.1464315</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 D R 18 1 0.5 -0.2672839 0.1515315</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 F S 25 1 1 -0.4005406 0.2847882</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 A S 24 2 &gt;=16 0.2382463 0.3539987</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 E I 18 0.5 &gt;=16 -0.4858364 0.3700839</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 H I 25 0.5 2 -0.4981535 0.3824011</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 G I 30 2 8 0.4131124 0.5288649</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I R 31 2 0.5 0.5828624 0.6986148</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 B I 31 4 &gt;=16 0.7955297 0.9112821</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 C I 17 4 2 -0.58549269 0.00000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 F I 22 0.25 4 -0.61484124 0.02934854</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 A I 23 2 2 -0.36533824 0.22015446</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 G S 28 &gt;=8 &lt;=1 -0.02482806 0.56066463</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E R 21 2 2 -0.01036260 0.57513009</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 I R 24 4 &lt;=1 0.03371288 0.61920557</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 B R 24 2 2 0.18335833 0.76885102</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H R 22 1 4 0.20385648 0.78934918</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 J I 30 4 4 0.57089751 1.15639020</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 D I 28 &gt;=8 4 0.60903763 1.19453032</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 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: 38 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: 36 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 54 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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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">
@ -188,42 +188,42 @@
<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] 64 1 4 0.025 0.01 0.5 0.25 2 &gt;=256 1 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 1 8 8 64 0.0625 0.005 0.125 2 0.001 1 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] 0.005 0.005 32 128 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.005 8 1 0.005 0.025 0.5 2 0.25 1 0.005 256 0.01 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] 128 1 64 256 2 0.01 0.002 0.025 16 128 0.005 1 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] 256 </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] 10 21 50 40 30 50 48 27 34 18 41 40 11 43 28 31 8 27 48 43 23 22 42 39 23</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 47 46 41 50 25 23 41 13 13 22 41 39 22 31 34 43 20 42 8 13 45 44 34 10 40</span>
<span class="r-in"><span><span class="fu">random_sir</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 'sir'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] R S S R S I I R S I R S I I I S R I S S S S I S I</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] I R R S R I S S I R R S S I S R S I S S R R S S R</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] 0.025 0.001 16 32 16 0.0625 0.0625 8 256 128 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 0.01 0.5 128 0.005 8 16 32 0.0625 0.002 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] 0.01 2 0.025 2 256 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.0625 0.025 0.002 4 64 1 32 0.0625 8 0.25 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 16 16 2 0.01 0.25 0.002 0.0625 0.0625 16 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] 0.125 0.025 0.002 256 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] &lt;=1 4 &lt;=1 16 2 &lt;=1 4 2 4 2 4 32 4 2 4 2 16 2 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [20] &lt;=1 &lt;=1 32 2 &lt;=1 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2 8 2 1 1 8 0.5 2 4 1 4 0.5 8 1 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [16] 0.5 16 16 8 2 8 0.25 4 0.5 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] 4 0.125 8 1 4 0.125 0.125 0.5 2 0.5 8 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] 1 0.25 0.125 0.125 1 2 0.5 8 8 4 1 0.125</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] 0.125</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.0625 4 8 2 4 0.5 0.0625 8 0.5 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 0.5 0.25 8 0.0625 8 0.125 0.125 2 4 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [19] 0.25 2 0.25 8 0.25 2 &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] 40 36 14 10 48 38 42 9 50 22 15 43 22 32 19 41 10 30 22 48 45 50 35 38 43</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 21 40 47 36 48 49 42 26 12 46 42 47 39 44 17 30 14 50 9 35 49 22 24 40 31</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 11 12 11 17 17 15 12 16 12 11 11 15 14 13 13 11 15 12 11 13 14 17 14 17</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 12 15 11 13 11 11 11 17 13 14 16 11 12 11 13 13 17 16 11 13 13 14 11 14 14</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] 20 16 25 17 20 20 23 17 27 25 16 20 24 16 21 22 24 21 26 23 21 25 15 24 21</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 26 20 25 16 25 27 18 17 16 15 20 18 19 16 20 26 27 16 19 24 16 21 18 20 19</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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">
@ -176,7 +176,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.002589053</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.03887497</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.9100</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9101</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