1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-26 08:46:11 +01:00

Built site for AMR: 1.8.2.9074@1db74e8

This commit is contained in:
github-actions 2022-12-29 15:31:17 +00:00
parent d81e09bddd
commit 6a000be49b
98 changed files with 525 additions and 525 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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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">
@ -168,7 +168,7 @@
<h4 data-toc-skip class="author">Dr. Matthijs
Berends</h4>
<h4 data-toc-skip class="date">28 December 2022</h4>
<h4 data-toc-skip class="date">29 December 2022</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/AMR.Rmd" class="external-link"><code>vignettes/AMR.Rmd</code></a></small>
<div class="d-none name"><code>AMR.Rmd</code></div>
@ -180,7 +180,7 @@ Berends</h4>
website update since they are based on randomly created values and the
page was written in <a href="https://rmarkdown.rstudio.com/" class="external-link">R
Markdown</a>. However, the methodology remains unchanged. This page was
generated on 28 December 2022.</p>
generated on 29 December 2022.</p>
<div class="section level2">
<h2 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a>
</h2>
@ -236,21 +236,21 @@ make the structure of your data generally look like this:</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2022-12-28</td>
<td align="center">2022-12-29</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
</tr>
<tr class="even">
<td align="center">2022-12-28</td>
<td align="center">2022-12-29</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">R</td>
</tr>
<tr class="odd">
<td align="center">2022-12-28</td>
<td align="center">2022-12-29</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -380,12 +380,12 @@ data set:</p>
<col width="13%">
<col width="13%">
<col width="13%">
<col width="26%">
<col width="28%">
<col width="5%">
<col width="5%">
<col width="5%">
<col width="5%">
<col width="9%">
<col width="8%">
</colgroup>
<thead><tr class="header">
<th align="center">date</th>
@ -400,21 +400,21 @@ data set:</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2012-10-08</td>
<td align="center">Q3</td>
<td align="center">2017-11-28</td>
<td align="center">U1</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2013-07-19</td>
<td align="center">E4</td>
<td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">2010-08-10</td>
<td align="center">J3</td>
<td align="center">Hospital B</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
@ -422,48 +422,48 @@ data set:</p>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2013-11-07</td>
<td align="center">T6</td>
<td align="center">Hospital B</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2015-10-03</td>
<td align="center">J10</td>
<td align="center">Hospital A</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">2016-11-06</td>
<td align="center">I10</td>
<td align="center">Hospital D</td>
<td align="center">Escherichia coli</td>
<td align="center">I</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2010-05-23</td>
<td align="center">J8</td>
<tr class="even">
<td align="center">2014-03-16</td>
<td align="center">N7</td>
<td align="center">Hospital A</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2011-08-16</td>
<td align="center">O4</td>
<td align="center">Hospital B</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">S</td>
<td align="center">M</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2016-04-21</td>
<td align="center">D5</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">2017-11-18</td>
<td align="center">Z3</td>
<td align="center">Hospital A</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">R</td>
<td align="center">F</td>
</tr>
</tbody>
</table>
@ -499,16 +499,16 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</td>
<td align="right">10,476</td>
<td align="right">52.38%</td>
<td align="right">10,476</td>
<td align="right">52.38%</td>
<td align="right">10,243</td>
<td align="right">51.22%</td>
<td align="right">10,243</td>
<td align="right">51.22%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,524</td>
<td align="right">47.62%</td>
<td align="right">9,757</td>
<td align="right">48.79%</td>
<td align="right">20,000</td>
<td align="right">100.00%</td>
</tr>
@ -621,9 +621,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 10,714 'phenotype-based' first isolates (53.6% of total where a</span></span>
<span><span class="co"># =&gt; Found 10,640 'phenotype-based' first isolates (53.2% of total where a</span></span>
<span><span class="co"># microbial ID was available)</span></span></code></pre></div>
<p>So only 53.6% is suitable for resistance analysis! We can now filter
<p>So only 53.2% 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">
@ -634,7 +634,7 @@ 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 10,714 isolates for analysis. Now our data looks
<p>So we end up with 10,640 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>
@ -673,94 +673,30 @@ like:</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="left">1</td>
<td align="center">2012-10-08</td>
<td align="center">Q3</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">3</td>
<td align="center">2013-11-07</td>
<td align="center">T6</td>
<td align="center">Hospital B</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">2016-11-06</td>
<td align="center">I10</td>
<td align="center">Hospital D</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">I</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</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="odd">
<td align="left">5</td>
<td align="center">2010-05-23</td>
<td align="center">J8</td>
<tr class="even">
<td align="left">4</td>
<td align="center">2014-03-16</td>
<td align="center">N7</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">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="left">6</td>
<td align="center">2016-04-21</td>
<td align="center">D5</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">7</td>
<td align="center">2017-06-14</td>
<td align="center">J3</td>
<td align="center">Hospital C</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">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">8</td>
<td align="center">2010-04-03</td>
<td align="center">Z10</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
@ -768,6 +704,70 @@ like:</p>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">6</td>
<td align="center">2017-11-18</td>
<td align="center">Z3</td>
<td align="center">Hospital A</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">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="even">
<td align="left">7</td>
<td align="center">2017-06-30</td>
<td align="center">E1</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">S</td>
<td align="center">S</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="odd">
<td align="left">13</td>
<td align="center">2014-08-26</td>
<td align="center">E5</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</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="left">14</td>
<td align="center">2017-08-09</td>
<td align="center">N2</td>
<td align="center">Hospital A</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">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>
</tbody>
</table>
<p>Time for the analysis!</p>
@ -801,8 +801,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: 10,714<br>
Available: 10,714 (100%, NA: 0 = 0%)<br>
Length: 10,640<br>
Available: 10,640 (100%, NA: 0 = 0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -827,33 +827,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">4,648</td>
<td align="right">43.38%</td>
<td align="right">4,648</td>
<td align="right">43.38%</td>
<td align="right">4,559</td>
<td align="right">42.85%</td>
<td align="right">4,559</td>
<td align="right">42.85%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">2,764</td>
<td align="right">25.80%</td>
<td align="right">7,412</td>
<td align="right">69.18%</td>
<td align="right">2,780</td>
<td align="right">26.13%</td>
<td align="right">7,339</td>
<td align="right">68.98%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">2,103</td>
<td align="right">19.63%</td>
<td align="right">9,515</td>
<td align="right">88.81%</td>
<td align="right">2,122</td>
<td align="right">19.94%</td>
<td align="right">9,461</td>
<td align="right">88.92%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,199</td>
<td align="right">11.19%</td>
<td align="right">10,714</td>
<td align="right">1,179</td>
<td align="right">11.08%</td>
<td align="right">10,640</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -902,24 +902,24 @@ antibiotic class they are in:</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2012-10-08</td>
<td align="center">Q3</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">2014-03-16</td>
<td align="center">N7</td>
<td align="center">Hospital A</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">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2013-11-07</td>
<td align="center">T6</td>
<td align="center">Hospital B</td>
<td align="center">2017-11-18</td>
<td align="center">Z3</td>
<td align="center">Hospital A</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
@ -932,58 +932,58 @@ antibiotic class they are in:</p>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2010-04-03</td>
<td align="center">Z10</td>
<td align="center">2012-10-06</td>
<td align="center">U6</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2013-06-09</td>
<td align="center">O7</td>
<td align="center">Hospital B</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Klebsiella</td>
<td align="center">pneumoniae</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2017-04-03</td>
<td align="center">H8</td>
<td align="center">Hospital A</td>
<td align="center">B_STRPT_PNMN</td>
<tr class="even">
<td align="center">2014-12-18</td>
<td align="center">T1</td>
<td align="center">Hospital D</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2015-05-29</td>
<td align="center">X6</td>
<td align="center">Hospital C</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2010-10-05</td>
<td align="center">R6</td>
<td align="center">2011-09-05</td>
<td align="center">T9</td>
<td align="center">Hospital A</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">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
@ -1013,50 +1013,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">2179</td>
<td align="center">143</td>
<td align="center">2326</td>
<td align="center">4648</td>
<td align="center">2174</td>
<td align="center">118</td>
<td align="center">2267</td>
<td align="center">4559</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">AMC</td>
<td align="center">3402</td>
<td align="center">164</td>
<td align="center">1082</td>
<td align="center">4648</td>
<td align="center">3334</td>
<td align="center">183</td>
<td align="center">1042</td>
<td align="center">4559</td>
</tr>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">3405</td>
<td align="center">3360</td>
<td align="center">0</td>
<td align="center">1243</td>
<td align="center">4648</td>
<td align="center">1199</td>
<td align="center">4559</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">4065</td>
<td align="center">3972</td>
<td align="center">0</td>
<td align="center">583</td>
<td align="center">4648</td>
<td align="center">587</td>
<td align="center">4559</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">1199</td>
<td align="center">1199</td>
<td align="center">1179</td>
<td align="center">1179</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">AMC</td>
<td align="center">953</td>
<td align="center">38</td>
<td align="center">208</td>
<td align="center">1199</td>
<td align="center">931</td>
<td align="center">49</td>
<td align="center">199</td>
<td align="center">1179</td>
</tr>
</tbody>
</table>
@ -1078,34 +1078,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">4065</td>
<td align="center">3972</td>
<td align="center">0</td>
<td align="center">583</td>
<td align="center">4648</td>
<td align="center">587</td>
<td align="center">4559</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">GEN</td>
<td align="center">1067</td>
<td align="center">1056</td>
<td align="center">0</td>
<td align="center">132</td>
<td align="center">1199</td>
<td align="center">123</td>
<td align="center">1179</td>
</tr>
<tr class="odd">
<td align="center">S. aureus</td>
<td align="center">GEN</td>
<td align="center">2469</td>
<td align="center">2441</td>
<td align="center">0</td>
<td align="center">295</td>
<td align="center">2764</td>
<td align="center">339</td>
<td align="center">2780</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">2103</td>
<td align="center">2103</td>
<td align="center">2122</td>
<td align="center">2122</td>
</tr>
</tbody>
</table>
@ -1137,7 +1137,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.5460146</span></span></code></pre></div>
<span><span class="co"># [1] 0.5412594</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">
@ -1152,19 +1152,19 @@ own:</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5537216</td>
<td align="center">0.5416017</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5401750</td>
<td align="center">0.5477551</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5323097</td>
<td align="center">0.5425532</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5546335</td>
<td align="center">0.5287303</td>
</tr>
</tbody>
</table>
@ -1189,23 +1189,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.5537216</td>
<td align="center">3211</td>
<td align="center">0.5416017</td>
<td align="center">3209</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5401750</td>
<td align="center">3771</td>
<td align="center">0.5477551</td>
<td align="center">3675</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5323097</td>
<td align="center">1563</td>
<td align="center">0.5425532</td>
<td align="center">1598</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5546335</td>
<td align="center">2169</td>
<td align="center">0.5287303</td>
<td align="center">2158</td>
</tr>
</tbody>
</table>
@ -1230,27 +1230,27 @@ therapies very easily:</p>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.7672117</td>
<td align="center">0.8745697</td>
<td align="center">0.9776248</td>
<td align="center">0.7714411</td>
<td align="center">0.8712437</td>
<td align="center">0.9749945</td>
</tr>
<tr class="even">
<td align="center">Klebsiella</td>
<td align="center">0.8265221</td>
<td align="center">0.8899083</td>
<td align="center">0.9799833</td>
<td align="center">0.8312129</td>
<td align="center">0.8956743</td>
<td align="center">0.9847328</td>
</tr>
<tr class="odd">
<td align="center">Staphylococcus</td>
<td align="center">0.7735166</td>
<td align="center">0.8932706</td>
<td align="center">0.9804631</td>
<td align="center">0.7827338</td>
<td align="center">0.8780576</td>
<td align="center">0.9748201</td>
</tr>
<tr class="even">
<td align="center">Streptococcus</td>
<td align="center">0.5344746</td>
<td align="center">0.5494816</td>
<td align="center">0.0000000</td>
<td align="center">0.5344746</td>
<td align="center">0.5494816</td>
</tr>
</tbody>
</table>
@ -1278,23 +1278,23 @@ classes, use a antibiotic class selector such as
<tbody>
<tr class="odd">
<td align="left">Hospital A</td>
<td align="right">55.4%</td>
<td align="right">27.3%</td>
<td align="right">54.2%</td>
<td align="right">26.5%</td>
</tr>
<tr class="even">
<td align="left">Hospital B</td>
<td align="right">54.0%</td>
<td align="right">26.6%</td>
<td align="right">54.8%</td>
<td align="right">26.7%</td>
</tr>
<tr class="odd">
<td align="left">Hospital C</td>
<td align="right">53.2%</td>
<td align="right">26.2%</td>
<td align="right">54.3%</td>
<td align="right">25.7%</td>
</tr>
<tr class="even">
<td align="left">Hospital D</td>
<td align="right">55.5%</td>
<td align="right">27.9%</td>
<td align="right">52.9%</td>
<td align="right">25.9%</td>
</tr>
</tbody>
</table>
@ -1410,18 +1410,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] 8 0.025 2 128 2 0.125 64 2 0.005 </span></span>
<span><span class="co"># [10] 0.01 32 16 128 1 8 0.5 &lt;=0.001 0.025 </span></span>
<span><span class="co"># [19] 0.0625 4 4 0.25 8 0.5 2 0.005 0.005 </span></span>
<span><span class="co"># [28] 64 8 0.0625 64 0.025 0.5 &lt;=0.001 0.0625 0.25 </span></span>
<span><span class="co"># [37] 0.0625 0.002 0.01 0.25 256 0.01 2 2 1 </span></span>
<span><span class="co"># [46] 32 64 0.125 128 256 &lt;=0.001 &lt;=0.001 64 0.25 </span></span>
<span><span class="co"># [55] 1 &lt;=0.001 0.005 4 32 1 0.002 16 8 </span></span>
<span><span class="co"># [64] &lt;=0.001 0.005 64 0.25 8 0.0625 0.01 16 1 </span></span>
<span><span class="co"># [73] 1 0.0625 0.25 0.5 0.25 8 0.125 0.002 0.25 </span></span>
<span><span class="co"># [82] 0.005 0.5 8 64 0.01 0.002 0.125 8 0.0625 </span></span>
<span><span class="co"># [91] 0.005 0.002 0.002 0.005 0.025 &lt;=0.001 &lt;=0.001 0.025 2 </span></span>
<span><span class="co"># [100] 128</span></span></code></pre></div>
<span><span class="co"># [1] 32 0.01 4 2 0.25 32 0.025 0.001 0.0625 4 </span></span>
<span><span class="co"># [11] 128 64 0.005 0.01 0.025 0.25 0.025 0.125 256 0.0625</span></span>
<span><span class="co"># [21] 0.001 0.125 0.25 0.01 8 0.0625 1 0.125 16 0.5 </span></span>
<span><span class="co"># [31] 0.125 16 0.25 128 0.25 2 256 32 0.005 0.002 </span></span>
<span><span class="co"># [41] 16 0.005 0.001 256 0.025 4 128 256 0.005 32 </span></span>
<span><span class="co"># [51] 1 0.125 16 0.25 0.01 0.5 0.5 0.125 0.0625 64 </span></span>
<span><span class="co"># [61] 0.005 128 0.001 0.005 16 0.0625 32 0.01 8 256 </span></span>
<span><span class="co"># [71] 0.001 0.0625 1 0.01 32 128 0.01 16 2 0.001 </span></span>
<span><span class="co"># [81] 0.01 0.0625 0.0625 16 2 0.001 0.125 0.001 4 0.0625</span></span>
<span><span class="co"># [91] 0.5 1 0.125 0.005 8 4 1 0.025 0.5 32</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>
@ -1455,10 +1453,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] 28 24 19 18 21 30 31 20 21 17 24 27 21 18 28 29 28 19 25 18 18 21 17 18 28</span></span>
<span><span class="co"># [26] 28 27 18 28 20 30 25 17 23 21 18 17 19 19 17 28 26 25 18 31 19 31 23 29 20</span></span>
<span><span class="co"># [51] 29 26 18 18 26 24 23 17 17 25 23 21 23 28 22 22 24 30 18 19 20 24 31 27 27</span></span>
<span><span class="co"># [76] 27 27 26 18 18 30 23 22 26 17 27 19 25 31 30 25 20 18 30 19 20 19 19 22 21</span></span></code></pre></div>
<span><span class="co"># [1] 29 23 28 30 26 21 27 30 21 31 23 25 22 30 18 24 24 24 29 28 31 28 25 31 27</span></span>
<span><span class="co"># [26] 26 30 21 25 30 31 24 24 30 17 30 27 20 31 26 20 23 17 31 31 28 28 26 20 19</span></span>
<span><span class="co"># [51] 24 30 26 24 18 18 17 24 28 24 19 27 31 20 18 23 27 31 19 19 17 27 23 25 19</span></span>
<span><span class="co"># [76] 18 20 26 18 19 26 21 17 28 22 26 24 28 27 22 17 22 28 20 19 17 17 20 19 24</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: 50 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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">
@ -375,19 +375,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 I S R I R I</span></span>
<span><span class="co"># 2 I R R I S R</span></span>
<span><span class="co"># 3 S R S I S S</span></span>
<span><span class="co"># 4 S R S I I I</span></span>
<span><span class="co"># 5 R R S I S S</span></span>
<span><span class="co"># 6 S S S R I I</span></span>
<span><span class="co"># 1 S R S S R R</span></span>
<span><span class="co"># 2 I S I S S R</span></span>
<span><span class="co"># 3 S I I R R S</span></span>
<span><span class="co"># 4 S R I R S R</span></span>
<span><span class="co"># 5 I R S S S I</span></span>
<span><span class="co"># 6 R R S I I I</span></span>
<span><span class="co"># kanamycin</span></span>
<span><span class="co"># 1 R</span></span>
<span><span class="co"># 2 S</span></span>
<span><span class="co"># 3 S</span></span>
<span><span class="co"># 3 I</span></span>
<span><span class="co"># 4 R</span></span>
<span><span class="co"># 5 R</span></span>
<span><span class="co"># 6 I</span></span></code></pre></div>
<span><span class="co"># 5 S</span></span>
<span><span class="co"># 6 S</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">
@ -428,40 +428,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">3249</td>
<td align="right">64.98%</td>
<td align="right">3249</td>
<td align="right">64.98%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Negative</td>
<td align="right">1000</td>
<td align="right">20.00%</td>
<td align="right">4237</td>
<td align="right">84.74%</td>
<td align="right">977</td>
<td align="right">19.54%</td>
<td align="right">4226</td>
<td align="right">84.52%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Multi-drug-resistant</td>
<td align="right">410</td>
<td align="right">8.20%</td>
<td align="right">4647</td>
<td align="right">92.94%</td>
<td align="right">420</td>
<td align="right">8.40%</td>
<td align="right">4646</td>
<td align="right">92.92%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Poly-resistant</td>
<td align="right">261</td>
<td align="right">5.22%</td>
<td align="right">4908</td>
<td align="right">98.16%</td>
<td align="right">249</td>
<td align="right">4.98%</td>
<td align="right">4895</td>
<td align="right">97.90%</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="left">Extensively drug-resistant</td>
<td align="right">92</td>
<td align="right">1.84%</td>
<td align="right">105</td>
<td align="right">2.10%</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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">
@ -168,7 +168,7 @@
<h4 data-toc-skip class="author">Dr. Matthijs
Berends</h4>
<h4 data-toc-skip class="date">28 December 2022</h4>
<h4 data-toc-skip class="date">29 December 2022</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/SPSS.Rmd" class="external-link"><code>vignettes/SPSS.Rmd</code></a></small>
<div class="d-none name"><code>SPSS.Rmd</code></div>

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -166,7 +166,7 @@
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Data sets for download / own use</h1>
<h4 data-toc-skip class="date">28 December 2022</h4>
<h4 data-toc-skip class="date">29 December 2022</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
<div class="d-none name"><code>datasets.Rmd</code></div>

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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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">
@ -132,7 +132,7 @@
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="1.8.2.9073" id="amr-1829073">AMR 1.8.2.9073<a class="anchor" aria-label="anchor" href="#amr-1829073"></a></h2>
<h2 class="pkg-version" data-toc-text="1.8.2.9074" id="amr-1829074">AMR 1.8.2.9074<a class="anchor" aria-label="anchor" href="#amr-1829074"></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>
@ -145,19 +145,19 @@
<li>Many new interesting functions, such as <code><a href="../reference/proportion.html">rsi_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-9073">New<a class="anchor" aria-label="anchor" href="#new-1-8-2-9073"></a></h3>
<h3 id="new-1-8-2-9074">New<a class="anchor" aria-label="anchor" href="#new-1-8-2-9074"></a></h3>
<div class="section level4">
<h4 id="interpretation-of-mic-and-disk-diffusion-values-1-8-2-9073">Interpretation of MIC and disk diffusion values<a class="anchor" aria-label="anchor" href="#interpretation-of-mic-and-disk-diffusion-values-1-8-2-9073"></a></h4>
<h4 id="interpretation-of-mic-and-disk-diffusion-values-1-8-2-9074">Interpretation of MIC and disk diffusion values<a class="anchor" aria-label="anchor" href="#interpretation-of-mic-and-disk-diffusion-values-1-8-2-9074"></a></h4>
<p>EUCAST 2022 and CLSI 2022 guidelines have been added for <code><a href="../reference/as.rsi.html">as.rsi()</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-9073">Supported languages<a class="anchor" aria-label="anchor" href="#supported-languages-1-8-2-9073"></a></h4>
<h4 id="supported-languages-1-8-2-9074">Supported languages<a class="anchor" aria-label="anchor" href="#supported-languages-1-8-2-9074"></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-9073">Microbiological taxonomy<a class="anchor" aria-label="anchor" href="#microbiological-taxonomy-1-8-2-9073"></a></h4>
<h4 id="microbiological-taxonomy-1-8-2-9074">Microbiological taxonomy<a class="anchor" aria-label="anchor" href="#microbiological-taxonomy-1-8-2-9074"></a></h4>
<p>The <code>microorganisms</code> 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>
@ -181,7 +181,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-9073">Antibiotic agents and selectors<a class="anchor" aria-label="anchor" href="#antibiotic-agents-and-selectors-1-8-2-9073"></a></h4>
<h4 id="antibiotic-agents-and-selectors-1-8-2-9074">Antibiotic agents and selectors<a class="anchor" aria-label="anchor" href="#antibiotic-agents-and-selectors-1-8-2-9074"></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>
@ -193,14 +193,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-9073">Antiviral agents<a class="anchor" aria-label="anchor" href="#antiviral-agents-1-8-2-9073"></a></h4>
<h4 id="antiviral-agents-1-8-2-9074">Antiviral agents<a class="anchor" aria-label="anchor" href="#antiviral-agents-1-8-2-9074"></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-9073">Other new functions<a class="anchor" aria-label="anchor" href="#other-new-functions-1-8-2-9073"></a></h4>
<h4 id="other-new-functions-1-8-2-9074">Other new functions<a class="anchor" aria-label="anchor" href="#other-new-functions-1-8-2-9074"></a></h4>
<ul><li>Function <code><a href="../reference/proportion.html">rsi_confidence_interval()</a></code> to add confidence intervals in AMR calculation. This is now also included in <code><a href="../reference/proportion.html">rsi_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.rsi.html">rsi_interpretation_history()</a></code> to view the history of previous runs of <code><a href="../reference/as.rsi.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.rsi.html">as.rsi()</a></code> was run.</li>
@ -209,7 +209,7 @@
</ul></div>
</div>
<div class="section level3">
<h3 id="changes-1-8-2-9073">Changes<a class="anchor" aria-label="anchor" href="#changes-1-8-2-9073"></a></h3>
<h3 id="changes-1-8-2-9074">Changes<a class="anchor" aria-label="anchor" href="#changes-1-8-2-9074"></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">rsi_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">rsi_df()</a></code> and <code><a href="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code>), will now return the same data type as the input.</li>
@ -248,7 +248,7 @@
<li>Cleaning columns with <code><a href="../reference/as.rsi.html">as.rsi()</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-9073">Other<a class="anchor" aria-label="anchor" href="#other-1-8-2-9073"></a></h3>
<h3 id="other-1-8-2-9074">Other<a class="anchor" aria-label="anchor" href="#other-1-8-2-9074"></a></h3>
<ul><li>New website to make use of the new Bootstrap 5 and pkgdown 2.0. The website now contains results for all examples and will be automatically regenerated with every change to our repository, using GitHub Actions</li>
<li>Added Peter Dutey-Magni, Dmytro Mykhailenko, Anton Mymrikov, and Jonas Salm as contributors, to thank them for their valuable input</li>
<li>All R and Rmd files in this project are now styled using the <code>styler</code> package</li>

View File

@ -11,7 +11,7 @@ articles:
datasets: datasets.html
resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html
last_built: 2022-12-28T14:09Z
last_built: 2022-12-29T15:27Z
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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -62,7 +62,7 @@ Principal component analysis for AMR
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -195,16 +195,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 1941-07-04 81 81.48493 58</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1981-12-16 41 41.03288 18</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1998-10-03 24 24.23562 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1944-10-01 78 78.24110 55</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1967-01-03 55 55.98356 32</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1953-07-10 69 69.46849 46</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1997-11-13 25 25.12329 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1951-12-30 70 70.99452 48</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1953-10-07 69 69.22466 46</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1966-07-15 56 56.45479 33</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1987-11-14 35 35.12329 12</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1947-09-16 75 75.28493 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1934-08-16 88 88.36986 65</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1953-01-01 69 69.99178 47</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1982-06-29 40 40.50137 17</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1933-10-19 89 89.19452 66</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1948-12-01 74 74.07671 51</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1957-06-21 65 65.52329 42</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1983-07-20 39 39.44384 16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1950-11-05 72 72.14795 49</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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">
@ -506,16 +506,16 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 50 × 12</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> datetime index ab_input ab_gu…¹ 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> 2022-12-28 <span style="color: #949494;">14:09:48</span> 1 ampicillin AMP Strep … B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2022-12-28 <span style="color: #949494;">14:09:49</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;"> 3</span> 2022-12-28 <span style="color: #949494;">14:09:49</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> 2022-12-28 <span style="color: #949494;">14:09:49</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;"> 5</span> 2022-12-28 <span style="color: #949494;">14:09:50</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;"> 6</span> 2022-12-28 <span style="color: #949494;">14:09:50</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2022-12-28 <span style="color: #949494;">14:09:50</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2022-12-28 <span style="color: #949494;">14:09:50</span> 2 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2022-12-28 <span style="color: #949494;">14:09:50</span> 3 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2022-12-28 <span style="color: #949494;">14:09:50</span> 4 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2022-12-29 <span style="color: #949494;">15:28:10</span> 1 ampicillin AMP Strep … B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2022-12-29 <span style="color: #949494;">15:28:11</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;"> 3</span> 2022-12-29 <span style="color: #949494;">15:28:11</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> 2022-12-29 <span style="color: #949494;">15:28:12</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;"> 5</span> 2022-12-29 <span style="color: #949494;">15:28:12</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;"> 6</span> 2022-12-29 <span style="color: #949494;">15:28:13</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2022-12-29 <span style="color: #949494;">15:28:14</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2022-12-29 <span style="color: #949494;">15:28:14</span> 2 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2022-12-29 <span style="color: #949494;">15:28:14</span> 3 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2022-12-29 <span style="color: #949494;">15:28:14</span> 4 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 40 more rows, 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;rsi&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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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">
@ -182,39 +182,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] 50 55 22 2 7 13 47 45 36 28 21 45 31 46 9 22 42 6 25 28 48 35 10 11 47</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 23 58 59 44 57 34 40 26 33 45 51 39 7 20 38 35 6 18 32 1 1 46 10 9 48</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 37 41 5 36 8 58 40 50 58 59 57 9 35 59 51 16 48 57 33 2 39 35 58 20 7</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 20 4 5 18 2 26 25 8 20 7 33 40 19 28 44 49 28 38 15 27 57 22 43 27 32</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 25 36 32 26 38 27 16 3 32 56 10 51 8 9 40 30 6 29 51 2 53 8 53 33 9</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 28 18 6 19 50 10 51 15 53 28 38 20 38 42 12 49 33 24 58 36 26 52 5 24 10</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 55 37 11 47 22 44 12 57 6 16 21 54 45 36 15 49 12 4 53 38 6 60 13 47 38</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 36 30 14 18 17 10 23 10 56 55 18 1 19 19 24 14 34 45 50 54 2 27 12 15 45</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 8 55 12 47 32 25 57 62 55 32 39 17 62 15 26 41 61 25 44 32 50 54 60 55 33</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 40 36 37 9 32 6 50 12 61 50 4 61 10 19 27 7 38 48 31 63 27 31 46 61 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 34 34 49 8 10 33 13 27 37 12 5 36 47 2 9 8 28 15 15 50 6 30 14 38 13</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 25 61 48 53 4 2 37 43 2 63 62 51 49 20 43 7 45 39 51 59 59 40 12 42 60</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 53 7 24 5 36 16 14 64 38 36 58 16 62 10 56 28 31 28 26 1 38 59 57 57 51</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 17 35 61 6 30 16 2 4 25 37 39 19 7 44 15 24 6 21 63 38 63 52 15 28 30</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 39 11 57 39 13 31 62 62 9 18 42 61 62 62 10 6 13 26 34 41 8 3 59 42 24</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 23 12 9 48 45 25 22 29 36 18 11 3 47 11 21 58 55 46 40 14 42 20 20 49 14</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 FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] TRUE TRUE TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] FALSE TRUE TRUE FALSE FALSE TRUE TRUE TRUE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] FALSE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] FALSE FALSE TRUE FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] TRUE FALSE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [157] FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] TRUE FALSE FALSE TRUE FALSE FALSE TRUE TRUE FALSE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] FALSE TRUE FALSE TRUE FALSE FALSE TRUE FALSE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] FALSE FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] TRUE FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] FALSE TRUE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [157] FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] TRUE FALSE FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] TRUE TRUE TRUE FALSE TRUE FALSE FALSE 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: 1 × 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;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2002-06-19 402950 53 F Clinical B_STPHY_HMNS R NA S NA </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-21 955940 82 F Clinical B_PSDMN_AERG R NA NA R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 36 more variables: AMC &lt;rsi&gt;, AMP &lt;rsi&gt;, TZP &lt;rsi&gt;, CZO &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># FEP &lt;rsi&gt;, CXM &lt;rsi&gt;, FOX &lt;rsi&gt;, CTX &lt;rsi&gt;, CAZ &lt;rsi&gt;, CRO &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># GEN &lt;rsi&gt;, TOB &lt;rsi&gt;, AMK &lt;rsi&gt;, KAN &lt;rsi&gt;, TMP &lt;rsi&gt;, SXT &lt;rsi&gt;,</span></span>
@ -250,16 +251,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> 324415 2015-10-03 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 671620 2016-12-04 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 403631 2007-07-31 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> F30196 2002-04-14 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> A73011 2003-08-13 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> F63168 2005-02-25 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> C34429 2014-12-15 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 658640 2014-05-30 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 687590 2011-10-29 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 408807 2009-05-07 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 739C43 2003-09-26 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 645121 2015-10-15 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> C21760 2004-12-28 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> A97263 2013-11-23 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 09B453 2010-03-21 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 207752 2008-07-11 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 772724 2016-05-24 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 6FC260 2017-06-07 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> A76045 2015-10-07 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 4F6830 2010-03-12 C 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>
@ -271,19 +272,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> ICU 2015-10-03 324415 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> Clinical 2016-12-04 671620 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical 2007-07-31 403631 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Outpatient 2002-04-14 F30196 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2003-08-13 A73011 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Clinical 2005-02-25 F63168 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Clinical 2014-12-15 C34429 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> Clinical 2014-05-30 658640 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> Clinical 2011-10-29 687590 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Clinical 2009-05-07 408807 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [183]</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 2003-09-26 739C43 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> Clinical 2015-10-15 645121 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> ICU 2004-12-28 C21760 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical 2013-11-23 A97263 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2010-03-21 09B453 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> ICU 2008-07-11 207752 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Clinical 2016-05-24 772724 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> ICU 2017-06-07 6FC260 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> ICU 2015-10-07 A76045 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Clinical 2010-03-12 4F6830 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>
@ -298,9 +299,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 118 14 52 75</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 51 12 34 45</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 10 6 11 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 121 14 58 76</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 46 11 29 34</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 16 8 15 16</span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span> <span class="co"># grouping on patients and microorganisms leads to the same</span></span></span>
@ -330,19 +331,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> 324415 B_PROTS_MRBL ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 671620 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 403631 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> F30196 B_STRPT_GRPB Outpatient TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> A73011 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> F63168 B_STRPT_EQUI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> C34429 B_PROTS_MRBL Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 658640 B_STPHY_AURS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 687590 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 408807 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, mo, ward [190]</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> 739C43 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 645121 B_SERRT_MRCS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> C21760 B_STPHY_EPDR ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> A97263 B_KLBSL_PNMN Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 09B453 B_STPHY_AURS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 207752 B_ENTRC_FCLS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 772724 B_STPHY_CPTS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 6FC260 B_STPHY_HMNS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> A76045 B_ENTRC_FACM ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 4F6830 B_KLBSL_PNMN Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 190 more rows</span></span>
<span class="r-in"><span><span class="co"># }</span></span></span>
</code></pre></div>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -172,9 +172,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.04852</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2.983304</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.06879899</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.02950061</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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,10 +200,11 @@
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="random.html">random_mic</a></span><span class="op">(</span><span class="fl">10</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">x</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.5 0.0625 0.0625 64 64 2 &gt;=256 &gt;=256 0.125 0.0625</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.125 1 0.125 16 0.5 0.005 0.025 0.25 &gt;=32 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] &lt;=0.001</span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.44345719 -1.02187960 -1.02187960 0.90619512 0.90619512 -0.05784224</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 1.29181006 1.29181006 -0.82907213 -1.02187960</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.15089674 0.48954269 -0.15089674 1.34346192 0.27606288 -1.14226627</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.64658150 0.06258307 1.55694173 -1.63795104</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>
@ -213,38 +214,38 @@
<span class="r-in"><span> tobr <span class="op">=</span> <span class="fu"><a href="random.html">random_mic</a></span><span class="op">(</span><span class="fl">10</span>, ab <span class="op">=</span> <span class="st">"tobr"</span>, mo <span class="op">=</span> <span class="st">"Escherichia coli"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">y</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A &gt;=64 1 &gt;=4 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 16 0.5 2 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 4 &lt;=0.25 1 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 32 &gt;=2 &lt;=0.5 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 16 &lt;=0.25 &gt;=4 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 16 &lt;=0.25 &gt;=4 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G 32 &gt;=2 &gt;=4 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H 8 0.5 2 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I &lt;=2 1 &gt;=4 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J &gt;=64 &gt;=2 2 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 8 2 &lt;=1 &lt;=1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B &lt;=2 2 16 &lt;=1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C &gt;=16 &gt;=4 2 &lt;=1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D &gt;=16 0.125 2 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 4 &gt;=4 &lt;=1 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 4 &gt;=4 8 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G &lt;=2 0.125 2 &lt;=1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H &gt;=16 0.25 &lt;=1 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I &gt;=16 0.25 8 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J &lt;=2 0.5 &lt;=1 &lt;=1</span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">y</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent",</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> "id" and "tobr"</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>NAs introduced by coercion</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.81284429 -0.28991150 -1.03511883 -0.22702202 0.11273878 0.11273878</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.85671083 -0.80055308 0.04737875 0.41019401</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.18987114 0.10887987 0.28105302 -0.11068834 0.34470481 0.44567516</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.86673217 0.04090765 0.74321579 -0.79714465</span>
<span class="r-in"><span><span class="va">y</span><span class="op">$</span><span class="va">amr_distance</span> <span class="op">&lt;-</span> <span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">y</span>, <span class="fu">where</span><span class="op">(</span><span class="va">is.mic</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent" and</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> "tobr"</span>
<span class="r-in"><span><span class="va">y</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/order.html" class="external-link">order</a></span><span class="op">(</span><span class="va">y</span><span class="op">$</span><span class="va">amr_distance</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 4 &lt;=0.25 1 2 -1.03511883</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H 8 0.5 2 1 -0.80055308</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 16 0.5 2 2 -0.28991150</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 32 &gt;=2 &lt;=0.5 2 -0.22702202</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I &lt;=2 1 &gt;=4 4 0.04737875</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 16 &lt;=0.25 &gt;=4 4 0.11273878</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 16 &lt;=0.25 &gt;=4 4 0.11273878</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J &gt;=64 &gt;=2 2 2 0.41019401</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A &gt;=64 1 &gt;=4 4 0.81284429</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G 32 &gt;=2 &gt;=4 4 0.85671083</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> 7 G &lt;=2 0.125 2 &lt;=1 -0.86673217</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J &lt;=2 0.5 &lt;=1 &lt;=1 -0.79714465</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 8 2 &lt;=1 &lt;=1 -0.18987114</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D &gt;=16 0.125 2 2 -0.11068834</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H &gt;=16 0.25 &lt;=1 4 0.04090765</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B &lt;=2 2 16 &lt;=1 0.10887987</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C &gt;=16 &gt;=4 2 &lt;=1 0.28105302</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 4 &gt;=4 &lt;=1 8 0.34470481</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 4 &gt;=4 8 2 0.44567516</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I &gt;=16 0.25 8 8 0.74321579</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>
@ -256,17 +257,17 @@
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent" and</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> "tobr"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance check_id_C</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 C 4 &lt;=0.25 1 2 -1.03511883 0.0000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 H 8 0.5 2 1 -0.80055308 0.2345657</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 B 16 0.5 2 2 -0.28991150 0.7452073</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 32 &gt;=2 &lt;=0.5 2 -0.22702202 0.8080968</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 I &lt;=2 1 &gt;=4 4 0.04737875 1.0824976</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 E 16 &lt;=0.25 &gt;=4 4 0.11273878 1.1478576</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 F 16 &lt;=0.25 &gt;=4 4 0.11273878 1.1478576</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 J &gt;=64 &gt;=2 2 2 0.41019401 1.4453128</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 A &gt;=64 1 &gt;=4 4 0.81284429 1.8479631</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 G 32 &gt;=2 &gt;=4 4 0.85671083 1.8918297</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 &gt;=16 &gt;=4 2 &lt;=1 0.28105302 0.00000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 E 4 &gt;=4 &lt;=1 8 0.34470481 0.06365179</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 F 4 &gt;=4 8 2 0.44567516 0.16462214</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 B &lt;=2 2 16 &lt;=1 0.10887987 0.17217315</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 H &gt;=16 0.25 &lt;=1 4 0.04090765 0.24014537</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 D &gt;=16 0.125 2 2 -0.11068834 0.39174136</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 I &gt;=16 0.25 8 8 0.74321579 0.46216277</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 A 8 2 &lt;=1 &lt;=1 -0.18987114 0.47092416</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 J &lt;=2 0.5 &lt;=1 &lt;=1 -0.79714465 1.07819767</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 G &lt;=2 0.125 2 &lt;=1 -0.86673217 1.14778519</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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: 27 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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">
@ -183,42 +183,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] 1 0.5 4 1 &lt;=0.001 0.125 16 256 0.01 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 0.125 128 4 0.5 16 0.0625 4 0.005 0.01 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [19] &lt;=0.001 8 64 64 4 0.005 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2 64 0.025 0.5 0.001 0.001 &gt;=128 &gt;=128 4 0.5 0.002 0.01 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] 4 32 32 0.125 0.125 0.005 2 16 0.001 0.125 0.002 0.01 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] 0.01 </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] 47 28 48 25 23 10 14 47 37 13 14 7 23 15 21 7 11 41 41 7 40 30 47 26 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 7 27 48 15 19 48 10 49 9 18 37 43 23 37 26 29 6 40 36 19 36 10 33 18 32</span>
<span class="r-in"><span><span class="fu">random_rsi</span><span class="op">(</span><span class="fl">25</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'rsi'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] S R R I S I R R R R R I I S I S S S R R R R I S I</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] I R R I S R I I I S S S R S S I S I I R S R I I S</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.125 1 0.0625 2 64 1 0.5 32 64 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 0.025 16 0.01 0.005 0.5 0.025 0.0625 16 0.25 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [19] 0.005 &lt;=0.001 0.01 0.002 32 4 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 64 0.005 4 4 0.002 0.001 8 64 32 0.005 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 1 0.025 0.01 2 0.01 0.5 64 4 8 0.002 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] 64 0.01 0.005 0.5 0.0625</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] &gt;=64 32 32 2 16 2 &gt;=64 32 4 &gt;=64 1 32 32 8 1 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [16] &gt;=64 4 8 2 4 &gt;=64 16 4 1 4 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 16 16 1 2 2 16 16 8 2 2 &gt;=32 4 1 4 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [16] 16 16 2 1 2 16 8 16 2 8 </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] 8 8 16 1 2 8 0.25 8 8 0.0625</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 1 0.0625 8 16 8 0.5 0.025 4 1 0.125 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] 4 0.025 2 0.5 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 1 0.125 8 0.0625 0.025 0.025 0.5 8 0.125 0.5 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 8 1 0.5 0.125 1 0.25 8 0.0625 2 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] 0.125 0.0625 1 4 0.125 </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] 41 18 36 26 41 46 31 9 9 33 20 47 10 50 29 49 25 17 48 8 37 41 42 31 42</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 42 27 16 43 29 46 49 22 27 8 36 28 40 44 41 8 12 45 44 42 38 49 24 40 10</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] 13 15 14 14 11 12 16 12 15 17 13 15 12 11 12 17 16 17 17 15 15 16 11 15 15</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 13 16 16 11 17 17 14 14 11 13 15 15 12 12 11 12 16 14 17 15 15 14 14 12 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] 19 19 26 15 15 19 15 20 26 20 26 21 23 26 27 21 15 26 24 26 15 17 20 18 23</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 27 17 19 26 24 23 23 25 17 27 15 15 26 20 19 26 22 19 18 26 21 20 17 24 23</span>
<span class="r-in"><span><span class="co"># }</span></span></span>
</code></pre></div>
</div>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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">
@ -171,7 +171,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.005679332</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.02794763</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.9073</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9074</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