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

Built site for AMR: 1.8.1.9049@63fe160

This commit is contained in:
github-actions 2022-09-01 13:38:26 +00:00
parent ac481f348b
commit 97c789d01f
97 changed files with 582 additions and 695 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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -162,7 +162,7 @@
<img src="../logo.svg" class="logo" alt=""><h1>How to conduct AMR data analysis</h1>
<h4 data-toc-skip class="author">Dr. Matthijs Berends</h4>
<h4 data-toc-skip class="date">30 August 2022</h4>
<h4 data-toc-skip class="date">01 September 2022</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/AMR.Rmd" class="external-link"><code>vignettes/AMR.Rmd</code></a></small>
<div class="d-none name"><code>AMR.Rmd</code></div>
@ -170,7 +170,7 @@
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/" class="external-link">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 30 August 2022.</p>
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/" class="external-link">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 01 September 2022.</p>
<div class="section level2">
<h2 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a>
</h2>
@ -201,21 +201,21 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2022-08-30</td>
<td align="center">2022-09-01</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-08-30</td>
<td align="center">2022-09-01</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-08-30</td>
<td align="center">2022-09-01</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -325,69 +325,69 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2012-12-24</td>
<td align="center">A3</td>
<td align="center">2016-11-10</td>
<td align="center">P6</td>
<td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2011-10-29</td>
<td align="center">T4</td>
<td align="center">Hospital A</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">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2011-07-22</td>
<td align="center">G4</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2015-10-11</td>
<td align="center">S9</td>
<td align="center">Hospital C</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2013-10-26</td>
<td align="center">Q7</td>
<td align="center">Hospital C</td>
<td align="center">2011-04-20</td>
<td align="center">O10</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2014-03-21</td>
<td align="center">Y1</td>
<td align="center">Hospital A</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2016-02-25</td>
<td align="center">V4</td>
<td align="center">Hospital B</td>
<td align="center">2012-08-21</td>
<td align="center">I2</td>
<td align="center">Hospital D</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2014-07-02</td>
<td align="center">N6</td>
<td align="center">2017-03-26</td>
<td align="center">T2</td>
<td align="center">Hospital B</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
</tbody>
@ -422,16 +422,16 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</td>
<td align="right">10,470</td>
<td align="right">52.35%</td>
<td align="right">10,470</td>
<td align="right">52.35%</td>
<td align="right">10,422</td>
<td align="right">52.11%</td>
<td align="right">10,422</td>
<td align="right">52.11%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,530</td>
<td align="right">47.65%</td>
<td align="right">9,578</td>
<td align="right">47.89%</td>
<td align="right">20,000</td>
<td align="right">100.00%</td>
</tr>
@ -488,9 +488,9 @@ Longest: 1</p>
<span><span class="co"># Basing inclusion on all antimicrobial results, using a points threshold of</span></span>
<span><span class="co"># 2</span></span>
<span><span class="co"># Including isolates from ICU.</span></span>
<span><span class="co"># =&gt; Found 10,675 'phenotype-based' first isolates (53.4% of total where a</span></span>
<span><span class="co"># =&gt; Found 10,604 'phenotype-based' first isolates (53.0% of total where a</span></span>
<span><span class="co"># microbial ID was available)</span></span></code></pre></div>
<p>So only 53.4% 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>
<p>So only 53.0% 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">
<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="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter</a></span><span class="op">(</span><span class="va">first</span> <span class="op">==</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
@ -499,10 +499,10 @@ Longest: 1</p>
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="../reference/first_isolate.html">filter_first_isolate</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="co"># Including isolates from ICU.</span></span></code></pre></div>
<p>So we end up with 10,675 isolates for analysis. Now our data looks like:</p>
<p>So we end up with 10,604 isolates for analysis. Now our data looks like:</p>
<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">data_1st</span><span class="op">)</span></span></code></pre></div>
<table style="width:100%;" class="table">
<table class="table">
<colgroup>
<col width="2%">
<col width="9%">
@ -516,7 +516,7 @@ Longest: 1</p>
<col width="6%">
<col width="11%">
<col width="12%">
<col width="9%">
<col width="7%">
<col width="5%">
</colgroup>
<thead><tr class="header">
@ -537,44 +537,12 @@ Longest: 1</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="left">4</td>
<td align="center">2014-03-21</td>
<td align="center">Y1</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">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="left">5</td>
<td align="center">2016-02-25</td>
<td align="center">V4</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">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="odd">
<td align="left">6</td>
<td align="center">2014-07-02</td>
<td align="center">N6</td>
<td align="center">Hospital B</td>
<td align="left">1</td>
<td align="center">2016-11-10</td>
<td align="center">P6</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">S</td>
@ -585,13 +553,13 @@ Longest: 1</p>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">9</td>
<td align="center">2011-11-29</td>
<td align="center">Q4</td>
<td align="center">Hospital B</td>
<td align="left">2</td>
<td align="center">2011-10-29</td>
<td align="center">T4</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
@ -601,14 +569,30 @@ Longest: 1</p>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">14</td>
<td align="center">2013-03-07</td>
<td align="center">A2</td>
<td align="left">7</td>
<td align="center">2015-01-09</td>
<td align="center">J10</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="even">
<td align="left">9</td>
<td align="center">2016-05-25</td>
<td align="center">F8</td>
<td align="center">Hospital A</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</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-positive</td>
@ -616,20 +600,36 @@ Longest: 1</p>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">15</td>
<td align="center">2010-02-05</td>
<td align="center">X6</td>
<td align="center">Hospital D</td>
<td align="center">B_KLBSL_PNMN</td>
<tr class="odd">
<td align="left">10</td>
<td align="center">2010-01-21</td>
<td align="center">Z8</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">S</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="even">
<td align="left">11</td>
<td align="center">2012-10-12</td>
<td align="center">B5</td>
<td align="center">Hospital D</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
</tbody>
@ -653,8 +653,8 @@ Longest: 1</p>
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">genus</span>, <span class="va">species</span><span class="op">)</span></span></code></pre></div>
<p><strong>Frequency table</strong></p>
<p>Class: character<br>
Length: 10,675<br>
Available: 10,675 (100.0%, NA: 0 = 0.0%)<br>
Length: 10,604<br>
Available: 10,604 (100.0%, NA: 0 = 0.0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -671,33 +671,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">4,591</td>
<td align="right">43.01%</td>
<td align="right">4,591</td>
<td align="right">43.01%</td>
<td align="right">4,672</td>
<td align="right">44.06%</td>
<td align="right">4,672</td>
<td align="right">44.06%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">2,738</td>
<td align="right">25.65%</td>
<td align="right">7,329</td>
<td align="right">68.66%</td>
<td align="right">2,714</td>
<td align="right">25.59%</td>
<td align="right">7,386</td>
<td align="right">69.65%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">2,156</td>
<td align="right">20.20%</td>
<td align="right">9,485</td>
<td align="right">88.85%</td>
<td align="right">2,051</td>
<td align="right">19.34%</td>
<td align="right">9,437</td>
<td align="right">88.99%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,190</td>
<td align="right">11.15%</td>
<td align="right">10,675</td>
<td align="right">1,167</td>
<td align="right">11.01%</td>
<td align="right">10,604</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -716,14 +716,14 @@ Longest: 24</p>
<col width="9%">
<col width="9%">
<col width="9%">
<col width="11%">
<col width="10%">
<col width="3%">
<col width="3%">
<col width="3%">
<col width="3%">
<col width="6%">
<col width="11%">
<col width="11%">
<col width="12%">
<col width="9%">
<col width="5%">
</colgroup>
@ -744,13 +744,43 @@ Longest: 24</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2014-03-21</td>
<td align="center">Y1</td>
<td align="center">Hospital A</td>
<td align="center">2012-10-12</td>
<td align="center">B5</td>
<td align="center">Hospital D</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2017-11-10</td>
<td align="center">A8</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2010-08-21</td>
<td align="center">Y3</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
@ -759,75 +789,45 @@ Longest: 24</p>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2016-02-25</td>
<td align="center">V4</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">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="odd">
<td align="center">2011-06-30</td>
<td align="center">I1</td>
<td align="center">Hospital D</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">2015-12-30</td>
<td align="center">B1</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">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2017-06-02</td>
<td align="center">D10</td>
<td align="center">Hospital B</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Klebsiella</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2012-11-07</td>
<td align="center">W10</td>
<td align="center">Hospital A</td>
<td align="center">2014-10-15</td>
<td align="center">N2</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">I</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2017-09-12</td>
<td align="center">O7</td>
<td align="center">Hospital D</td>
<td align="center">2016-04-25</td>
<td align="center">H4</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">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
@ -854,50 +854,50 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">AMX</td>
<td align="center">2171</td>
<td align="center">122</td>
<td align="center">2298</td>
<td align="center">4591</td>
<td align="center">2216</td>
<td align="center">117</td>
<td align="center">2339</td>
<td align="center">4672</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">AMC</td>
<td align="center">3395</td>
<td align="center">143</td>
<td align="center">1053</td>
<td align="center">4591</td>
<td align="center">3414</td>
<td align="center">156</td>
<td align="center">1102</td>
<td align="center">4672</td>
</tr>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">3378</td>
<td align="center">3392</td>
<td align="center">0</td>
<td align="center">1213</td>
<td align="center">4591</td>
<td align="center">1280</td>
<td align="center">4672</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">4022</td>
<td align="center">4084</td>
<td align="center">0</td>
<td align="center">569</td>
<td align="center">4591</td>
<td align="center">588</td>
<td align="center">4672</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">1190</td>
<td align="center">1190</td>
<td align="center">1167</td>
<td align="center">1167</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">AMC</td>
<td align="center">931</td>
<td align="center">47</td>
<td align="center">212</td>
<td align="center">1190</td>
<td align="center">912</td>
<td align="center">53</td>
<td align="center">202</td>
<td align="center">1167</td>
</tr>
</tbody>
</table>
@ -920,34 +920,34 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">4022</td>
<td align="center">4084</td>
<td align="center">0</td>
<td align="center">569</td>
<td align="center">4591</td>
<td align="center">588</td>
<td align="center">4672</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">GEN</td>
<td align="center">1066</td>
<td align="center">1054</td>
<td align="center">0</td>
<td align="center">124</td>
<td align="center">1190</td>
<td align="center">113</td>
<td align="center">1167</td>
</tr>
<tr class="odd">
<td align="center">S. aureus</td>
<td align="center">GEN</td>
<td align="center">2420</td>
<td align="center">2439</td>
<td align="center">0</td>
<td align="center">318</td>
<td align="center">2738</td>
<td align="center">275</td>
<td align="center">2714</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">2156</td>
<td align="center">2156</td>
<td align="center">2051</td>
<td align="center">2051</td>
</tr>
</tbody>
</table>
@ -961,7 +961,7 @@ Longest: 24</p>
<p>As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (<code><a href="../reference/proportion.html">proportion_R()</a></code>, equal to <code><a href="../reference/proportion.html">resistance()</a></code>) and susceptibility as the proportion of S and I (<code><a href="../reference/proportion.html">proportion_SI()</a></code>, equal to <code><a href="../reference/proportion.html">susceptibility()</a></code>). These functions can be used on their own:</p>
<div class="sourceCode" id="cb26"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMX</span><span class="op">)</span></span>
<span><span class="co"># [1] 0.5525995</span></span></code></pre></div>
<span><span class="co"># [1] 0.5453602</span></span></code></pre></div>
<p>Or can be used in conjunction with <code><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb27"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
@ -975,19 +975,19 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5429191</td>
<td align="center">0.5524672</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5560949</td>
<td align="center">0.5320304</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5516169</td>
<td align="center">0.5509434</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5619137</td>
<td align="center">0.5535714</td>
</tr>
</tbody>
</table>
@ -1008,23 +1008,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5429191</td>
<td align="center">3227</td>
<td align="center">0.5524672</td>
<td align="center">3202</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5560949</td>
<td align="center">3708</td>
<td align="center">0.5320304</td>
<td align="center">3684</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5516169</td>
<td align="center">1608</td>
<td align="center">0.5509434</td>
<td align="center">1590</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5619137</td>
<td align="center">2132</td>
<td align="center">0.5535714</td>
<td align="center">2128</td>
</tr>
</tbody>
</table>
@ -1047,27 +1047,27 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.7706382</td>
<td align="center">0.8760619</td>
<td align="center">0.9797430</td>
<td align="center">0.7641267</td>
<td align="center">0.8741438</td>
<td align="center">0.9762414</td>
</tr>
<tr class="even">
<td align="center">Klebsiella</td>
<td align="center">0.8218487</td>
<td align="center">0.8957983</td>
<td align="center">0.9840336</td>
<td align="center">0.8269066</td>
<td align="center">0.9031705</td>
<td align="center">0.9837189</td>
</tr>
<tr class="odd">
<td align="center">Staphylococcus</td>
<td align="center">0.7797663</td>
<td align="center">0.8838568</td>
<td align="center">0.9762600</td>
<td align="center">0.7940310</td>
<td align="center">0.8986735</td>
<td align="center">0.9812085</td>
</tr>
<tr class="even">
<td align="center">Streptococcus</td>
<td align="center">0.5245826</td>
<td align="center">0.5324232</td>
<td align="center">0.0000000</td>
<td align="center">0.5245826</td>
<td align="center">0.5324232</td>
</tr>
</tbody>
</table>
@ -1092,23 +1092,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="left">Hospital A</td>
<td align="right">54.3%</td>
<td align="right">27.1%</td>
<td align="right">55.2%</td>
<td align="right">26.6%</td>
</tr>
<tr class="even">
<td align="left">Hospital B</td>
<td align="right">55.6%</td>
<td align="right">26.6%</td>
<td align="right">53.2%</td>
<td align="right">26.1%</td>
</tr>
<tr class="odd">
<td align="left">Hospital C</td>
<td align="right">55.2%</td>
<td align="right">27.8%</td>
<td align="right">55.1%</td>
<td align="right">27.3%</td>
</tr>
<tr class="even">
<td align="left">Hospital D</td>
<td align="right">56.2%</td>
<td align="right">27.5%</td>
<td align="right">55.4%</td>
<td align="right">27.0%</td>
</tr>
</tbody>
</table>
@ -1206,16 +1206,18 @@ Longest: 24</p>
<code class="sourceCode R"><span><span class="va">mic_values</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/random.html">random_mic</a></span><span class="op">(</span>size <span class="op">=</span> <span class="fl">100</span><span class="op">)</span></span>
<span><span class="va">mic_values</span></span>
<span><span class="co"># Class &lt;mic&gt;</span></span>
<span><span class="co"># [1] 2 0.5 0.5 &gt;=256 0.5 1 0.002 0.025 64 0.25 </span></span>
<span><span class="co"># [11] 0.5 0.0625 0.002 0.025 16 32 8 32 0.125 4 </span></span>
<span><span class="co"># [21] 64 0.002 0.5 &gt;=256 0.001 0.001 0.01 8 0.002 128 </span></span>
<span><span class="co"># [31] 16 0.0625 0.125 0.01 2 0.25 128 2 16 0.01 </span></span>
<span><span class="co"># [41] 4 0.002 16 1 2 0.005 32 0.0625 &gt;=256 4 </span></span>
<span><span class="co"># [51] 0.01 0.01 128 0.5 0.01 0.25 0.25 0.005 2 8 </span></span>
<span><span class="co"># [61] 0.025 64 0.002 1 4 0.01 1 1 16 0.5 </span></span>
<span><span class="co"># [71] 0.005 32 &gt;=256 0.25 0.0625 16 0.125 1 0.125 128 </span></span>
<span><span class="co"># [81] 0.005 0.125 0.001 0.25 1 0.01 32 32 2 64 </span></span>
<span><span class="co"># [91] &gt;=256 0.25 0.025 4 32 16 0.0625 4 0.002 0.002</span></span></code></pre></div>
<span><span class="co"># [1] 0.0625 128 32 32 0.125 2 0.0625 8 0.002 </span></span>
<span><span class="co"># [10] 2 0.0625 64 2 128 0.025 0.125 0.002 64 </span></span>
<span><span class="co"># [19] 0.025 4 0.002 &lt;=0.001 0.0625 0.125 8 16 0.0625 </span></span>
<span><span class="co"># [28] 128 128 256 8 8 16 0.0625 &lt;=0.001 &lt;=0.001</span></span>
<span><span class="co"># [37] 8 256 0.025 &lt;=0.001 32 0.125 128 0.125 1 </span></span>
<span><span class="co"># [46] 0.01 64 0.125 4 2 0.005 128 0.25 32 </span></span>
<span><span class="co"># [55] 1 0.01 0.25 0.0625 0.01 0.25 0.25 8 0.125 </span></span>
<span><span class="co"># [64] 0.25 0.025 &lt;=0.001 8 1 4 1 32 64 </span></span>
<span><span class="co"># [73] 0.5 32 2 2 0.125 0.01 32 64 &lt;=0.001</span></span>
<span><span class="co"># [82] 4 0.5 0.5 4 0.25 4 &lt;=0.001 256 1 </span></span>
<span><span class="co"># [91] 4 4 0.002 0.125 0.125 2 0.002 8 16 </span></span>
<span><span class="co"># [100] 1</span></span></code></pre></div>
<div class="sourceCode" id="cb37"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># base R:</span></span>
<span><span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">mic_values</span><span class="op">)</span></span></code></pre></div>
@ -1244,10 +1246,10 @@ Longest: 24</p>
<span><span class="co"># coli). Run `mo_uncertainties()` to review this.</span></span>
<span><span class="va">disk_values</span></span>
<span><span class="co"># Class &lt;disk&gt;</span></span>
<span><span class="co"># [1] 23 31 24 27 29 20 24 22 27 17 21 28 25 18 29 24 28 17 24 19 22 30 29 17 27</span></span>
<span><span class="co"># [26] 18 20 29 23 23 20 24 20 24 24 18 31 31 29 17 27 19 25 21 18 26 29 18 17 30</span></span>
<span><span class="co"># [51] 27 26 31 18 26 31 30 18 25 25 27 18 30 19 19 25 30 28 19 26 30 21 20 24 22</span></span>
<span><span class="co"># [76] 25 31 17 18 23 27 23 29 24 27 28 25 29 30 27 24 27 28 25 23 27 24 22 27 18</span></span></code></pre></div>
<span><span class="co"># [1] 28 26 29 24 22 28 18 17 22 24 17 18 20 25 23 22 30 21 24 30 26 18 23 28 19</span></span>
<span><span class="co"># [26] 25 24 25 17 25 21 25 20 30 20 29 20 22 25 19 17 29 21 28 28 18 24 26 25 28</span></span>
<span><span class="co"># [51] 20 26 24 19 24 27 19 22 18 28 29 30 31 30 30 30 17 18 20 26 27 27 28 24 23</span></span>
<span><span class="co"># [76] 25 30 29 20 20 20 20 30 24 28 20 30 31 17 17 23 25 27 26 18 23 21 18 22 21</span></span></code></pre></div>
<div class="sourceCode" id="cb43"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># base R:</span></span>
<span><span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">disk_values</span>, mo <span class="op">=</span> <span class="st">"E. coli"</span>, ab <span class="op">=</span> <span class="st">"cipro"</span><span class="op">)</span></span></code></pre></div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 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: 37 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: 49 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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -314,18 +314,18 @@ Unique: 2</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span></span>
<span><span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span></span>
<span><span class="co"># 1 R S I R R R</span></span>
<span><span class="co"># 2 S R R R I S</span></span>
<span><span class="co"># 3 R S I S I S</span></span>
<span><span class="co"># 4 R S R R I S</span></span>
<span><span class="co"># 5 I I R I S I</span></span>
<span><span class="co"># 6 R S R S I R</span></span>
<span><span class="co"># 1 R R I S S R</span></span>
<span><span class="co"># 2 S I R S S S</span></span>
<span><span class="co"># 3 S R R S S I</span></span>
<span><span class="co"># 4 R I R R I I</span></span>
<span><span class="co"># 5 S R I R R I</span></span>
<span><span class="co"># 6 R I R R R S</span></span>
<span><span class="co"># kanamycin</span></span>
<span><span class="co"># 1 I</span></span>
<span><span class="co"># 2 R</span></span>
<span><span class="co"># 2 I</span></span>
<span><span class="co"># 3 S</span></span>
<span><span class="co"># 4 S</span></span>
<span><span class="co"># 5 I</span></span>
<span><span class="co"># 4 R</span></span>
<span><span class="co"># 5 S</span></span>
<span><span class="co"># 6 I</span></span></code></pre></div>
<p>We can now add the interpretation of MDR-TB to our data set. You can use:</p>
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
@ -357,40 +357,40 @@ Unique: 5</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Mono-resistant</td>
<td align="right">3167</td>
<td align="right">63.34%</td>
<td align="right">3167</td>
<td align="right">63.34%</td>
<td align="right">3202</td>
<td align="right">64.04%</td>
<td align="right">3202</td>
<td align="right">64.04%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Negative</td>
<td align="right">994</td>
<td align="right">19.88%</td>
<td align="right">4161</td>
<td align="right">83.22%</td>
<td align="right">970</td>
<td align="right">19.40%</td>
<td align="right">4172</td>
<td align="right">83.44%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Multi-drug-resistant</td>
<td align="right">487</td>
<td align="right">9.74%</td>
<td align="right">4648</td>
<td align="right">92.96%</td>
<td align="right">472</td>
<td align="right">9.44%</td>
<td align="right">4644</td>
<td align="right">92.88%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Poly-resistant</td>
<td align="right">246</td>
<td align="right">4.92%</td>
<td align="right">4894</td>
<td align="right">97.88%</td>
<td align="right">257</td>
<td align="right">5.14%</td>
<td align="right">4901</td>
<td align="right">98.02%</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="left">Extensively drug-resistant</td>
<td align="right">106</td>
<td align="right">2.12%</td>
<td align="right">99</td>
<td align="right">1.98%</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -162,7 +162,7 @@
<img src="../logo.svg" class="logo" alt=""><h1>How to import data from SPSS / SAS / Stata</h1>
<h4 data-toc-skip class="author">Dr. Matthijs Berends</h4>
<h4 data-toc-skip class="date">30 August 2022</h4>
<h4 data-toc-skip class="date">01 September 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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -161,7 +161,7 @@
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Data sets for download / own use</h1>
<h4 data-toc-skip class="date">30 August 2022</h4>
<h4 data-toc-skip class="date">01 September 2022</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
<div class="d-none name"><code>datasets.Rmd</code></div>
@ -177,7 +177,7 @@
</h2>
<p>A data set with 70,764 rows and 16 columns, containing the following column names:<br><em>mo</em>, <em>fullname</em>, <em>kingdom</em>, <em>phylum</em>, <em>class</em>, <em>order</em>, <em>family</em>, <em>genus</em>, <em>species</em>, <em>subspecies</em>, <em>rank</em>, <em>ref</em>, <em>species_id</em>, <em>source</em>, <em>prevalence</em> and <em>snomed</em>.</p>
<p>This data set is in R available as <code>microorganisms</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 30 August 2022 20:17:48 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.html">here</a>.</p>
<p>It was last updated on 1 September 2022 13:33:21 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.rds" class="external-link">original R Data Structure (RDS) file</a> (1.3 MB)<br>
@ -403,7 +403,7 @@
<p>A data set with 14,338 rows and 4 columns, containing the following column names:<br><em>fullname</em>, <em>fullname_new</em>, <em>ref</em> and <em>prevalence</em>.</p>
<p><strong>Note:</strong> remember that the ref columns contains the scientific reference to the old taxonomic entries, i.e. of column <em>fullname</em>. For the scientific reference of the new names, i.e. of column <em>fullname_new</em>, see the <code>microorganisms</code> data set.</p>
<p>This data set is in R available as <code>microorganisms.old</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 30 August 2022 20:17:48 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.old.html">here</a>.</p>
<p>It was last updated on 1 September 2022 13:33:21 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.old.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.old.rds" class="external-link">original R Data Structure (RDS) file</a> (0.2 MB)<br>
@ -473,7 +473,7 @@
</h2>
<p>A data set with 464 rows and 14 columns, containing the following column names:<br><em>ab</em>, <em>cid</em>, <em>name</em>, <em>group</em>, <em>atc</em>, <em>atc_group1</em>, <em>atc_group2</em>, <em>abbreviations</em>, <em>synonyms</em>, <em>oral_ddd</em>, <em>oral_units</em>, <em>iv_ddd</em>, <em>iv_units</em> and <em>loinc</em>.</p>
<p>This data set is in R available as <code>antibiotics</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 30 August 2022 20:17:48 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p>It was last updated on 1 September 2022 13:33:21 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.rds" class="external-link">original R Data Structure (RDS) file</a> (36 kB)<br>
@ -646,7 +646,7 @@
</h2>
<p>A data set with 102 rows and 9 columns, containing the following column names:<br><em>atc</em>, <em>cid</em>, <em>name</em>, <em>atc_group</em>, <em>synonyms</em>, <em>oral_ddd</em>, <em>oral_units</em>, <em>iv_ddd</em> and <em>iv_units</em>.</p>
<p>This data set is in R available as <code>antivirals</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 30 August 2022 20:17:48 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p>It was last updated on 1 September 2022 13:33:21 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.rds" class="external-link">original R Data Structure (RDS) file</a> (4 kB)<br>
@ -778,7 +778,7 @@
</h2>
<p>A data set with 20,369 rows and 11 columns, containing the following column names:<br><em>guideline</em>, <em>method</em>, <em>site</em>, <em>mo</em>, <em>rank_index</em>, <em>ab</em>, <em>ref_tbl</em>, <em>disk_dose</em>, <em>breakpoint_S</em>, <em>breakpoint_R</em> and <em>uti</em>.</p>
<p>This data set is in R available as <code>rsi_translation</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 30 August 2022 20:17:48 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
<p>It was last updated on 1 September 2022 13:33:21 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.rds" class="external-link">original R Data Structure (RDS) file</a> (49 kB)<br>
@ -937,7 +937,7 @@
</h2>
<p>A data set with 134,956 rows and 2 columns, containing the following column names:<br><em>mo</em> and <em>ab</em>.</p>
<p>This data set is in R available as <code>intrinsic_resistant</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 30 August 2022 20:17:48 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/intrinsic_resistant.html">here</a>.</p>
<p>It was last updated on 1 September 2022 13:33:21 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/intrinsic_resistant.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.rds" class="external-link">original R Data Structure (RDS) file</a> (78 kB)<br>
@ -1209,7 +1209,7 @@
</h2>
<p>A data set with 169 rows and 9 columns, containing the following column names:<br><em>ab</em>, <em>name</em>, <em>type</em>, <em>dose</em>, <em>dose_times</em>, <em>administration</em>, <em>notes</em>, <em>original_txt</em> and <em>eucast_version</em>.</p>
<p>This data set is in R available as <code>dosage</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 30 August 2022 20:17:48 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/dosage.html">here</a>.</p>
<p>It was last updated on 1 September 2022 13:33:21 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/dosage.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.rds" class="external-link">original R Data Structure (RDS) file</a> (3 kB)<br>
@ -1326,7 +1326,7 @@
</h2>
<p>A data set with 2,000 rows and 46 columns, containing the following column names:<br><em>date</em>, <em>patient</em>, <em>age</em>, <em>gender</em>, <em>ward</em>, <em>mo</em>, <em>PEN</em>, <em>OXA</em>, <em>FLC</em>, <em>AMX</em>, <em>AMC</em>, <em>AMP</em>, <em>TZP</em>, <em>CZO</em>, <em>FEP</em>, <em>CXM</em>, <em>FOX</em>, <em>CTX</em>, <em>CAZ</em>, <em>CRO</em>, <em>GEN</em>, <em>TOB</em>, <em>AMK</em>, <em>KAN</em>, <em>TMP</em>, <em>SXT</em>, <em>NIT</em>, <em>FOS</em>, <em>LNZ</em>, <em>CIP</em>, <em>MFX</em>, <em>VAN</em>, <em>TEC</em>, <em>TCY</em>, <em>TGC</em>, <em>DOX</em>, <em>ERY</em>, <em>CLI</em>, <em>AZM</em>, <em>IPM</em>, <em>MEM</em>, <em>MTR</em>, <em>CHL</em>, <em>COL</em>, <em>MUP</em> and <em>RIF</em>.</p>
<p>This data set is in R available as <code>example_isolates</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 30 August 2022 20:17:48 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates.html">here</a>.</p>
<p>It was last updated on 1 September 2022 13:33:21 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates.html">here</a>.</p>
<div class="section level3">
<h3 id="source-7">Source<a class="anchor" aria-label="anchor" href="#source-7"></a>
</h3>
@ -1731,7 +1731,7 @@
</h2>
<p>A data set with 3,000 rows and 8 columns, containing the following column names:<br><em>patient_id</em>, <em>hospital</em>, <em>date</em>, <em>bacteria</em>, <em>AMX</em>, <em>AMC</em>, <em>CIP</em> and <em>GEN</em>.</p>
<p>This data set is in R available as <code>example_isolates_unclean</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 30 August 2022 20:17:48 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates_unclean.html">here</a>.</p>
<p>It was last updated on 1 September 2022 13:33:21 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates_unclean.html">here</a>.</p>
<div class="section level3">
<h3 id="source-8">Source<a class="anchor" aria-label="anchor" href="#source-8"></a>
</h3>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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

@ -44,7 +44,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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -127,17 +127,18 @@
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="1.8.1.9047" id="amr-1819047">AMR 1.8.1.9047<a class="anchor" aria-label="anchor" href="#amr-1819047"></a></h2>
<h2 class="pkg-version" data-toc-text="1.8.1.9049" id="amr-1819049">AMR 1.8.1.9049<a class="anchor" aria-label="anchor" href="#amr-1819049"></a></h2>
<div class="section level4">
<h4 id="new-1-8-1-9047">New<a class="anchor" aria-label="anchor" href="#new-1-8-1-9047"></a></h4>
<h4 id="new-1-8-1-9049">New<a class="anchor" aria-label="anchor" href="#new-1-8-1-9049"></a></h4>
<ul><li>EUCAST 2022 and CLSI 2022 guidelines have been added for <code><a href="../reference/as.rsi.html">as.rsi()</a></code>. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations.</li>
<li>Function to calculate the mean AMR distance: <code><a href="../reference/mean_amr_distance.html">mean_amr_distance()</a></code>. 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/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>
<li>Support for <code>data.frame</code>-enhancing R packages, more specifically: <code>data.table</code>, <code>tibble</code>, and <code>tsibble</code>. AMR package functions that have a data set as output (such as <code><a href="../reference/proportion.html">rsi_df()</a></code> and <code><a href="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code>), will now return the same data type as the input. Furthermore, all our data sets are now in <code>tibble</code> format.</li>
<li>Our data sets are now also continually exported to Apache Feather and Apache Parquet formats. You can find more info <a href="https://msberends.github.io/AMR/articles/datasets.html">in this article on our website</a>.</li>
<li>Support for the following languages: Chinese, Greek, Japanese, Polish, Turkish and Ukrainian. We are very grateful for the valuable input by our colleagues from other countries. The <code>AMR</code> package is now available in 16 languages.</li>
</ul></div>
<div class="section level4">
<h4 id="changed-1-8-1-9047">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-1-9047"></a></h4>
<h4 id="changed-1-8-1-9049">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-1-9049"></a></h4>
<ul><li>Fix for using <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on certain EUCAST breakpoints for MIC values</li>
<li>Fix for using <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on <code>NA</code> values (e.g. <code>as.rsi(as.disk(NA), ...)</code>)</li>
<li>Removed <code><a href="https://rdrr.io/r/base/integer.html" class="external-link">as.integer()</a></code> for MIC values, since MIC are not integer values and running <code><a href="https://rdrr.io/r/base/table.html" class="external-link">table()</a></code> on MIC values consequently failed for not being able to retrieve the level position (as thats how normally <code><a href="https://rdrr.io/r/base/integer.html" class="external-link">as.integer()</a></code> on <code>factor</code>s work)</li>
@ -158,9 +159,10 @@
<li>Automatic language determination will give a note once a session</li>
<li>For all interpretation guidelines using <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on amoxicillin, the rules for ampicillin will be used if amoxicillin rules are not available</li>
<li>Fix for using <code><a href="../reference/ab_property.html">ab_atc()</a></code> on non-existing ATC codes</li>
<li>Black and white message texts are now reversed in colour if using an RStudio dark theme</li>
</ul></div>
<div class="section level4">
<h4 id="other-1-8-1-9047">Other<a class="anchor" aria-label="anchor" href="#other-1-8-1-9047"></a></h4>
<h4 id="other-1-8-1-9049">Other<a class="anchor" aria-label="anchor" href="#other-1-8-1-9049"></a></h4>
<ul><li>New website to make use of the new Bootstrap 5 and pkgdown v2.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 and Anton Mymrikov as contributors, to thank them for their valuable input</li>
<li>Set up Git Large File Storage (Git LFS) for the large SAS and SPSS file formats</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-08-30T20:19Z
last_built: 2022-09-01T13:35Z
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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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: 15 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -190,16 +190,16 @@
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">df</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> birth_date age age_exact age_at_y2k</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1948-08-18 74 74.03288 51</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1996-10-11 25 25.88493 3</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1968-11-21 53 53.77260 31</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1962-11-19 59 59.77808 37</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1961-12-24 60 60.68219 38</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1943-01-20 79 79.60822 56</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1934-03-25 88 88.43288 65</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1989-07-16 33 33.12329 10</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1988-11-22 33 33.76986 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1961-11-12 60 60.79726 38</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1950-02-05 72 72.56986 49</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1947-04-13 75 75.38630 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1963-10-26 58 58.84932 36</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1935-04-02 87 87.41644 64</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1954-12-13 67 67.71781 45</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1972-05-21 50 50.28219 27</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1969-12-18 52 52.70411 30</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1932-08-07 90 90.06849 67</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1963-09-17 58 58.95616 36</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1937-01-30 85 85.58630 62</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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">
@ -207,8 +207,8 @@
<span class="r-in"><span> ab <span class="op">=</span> <span class="st">"ampicillin"</span>, <span class="co"># and `ab` with as.ab()</span></span></span>
<span class="r-in"><span> guideline <span class="op">=</span> <span class="st">"EUCAST"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'ampicillin' according to EUCAST</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'ampicillin' (AMP, ampicillin)</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;rsi&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] R</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -176,7 +176,9 @@
<span> conserve_capped_values <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> add_intrinsic_resistance <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> reference_data <span class="op">=</span> <span class="fu">AMR</span><span class="fu">::</span><span class="va"><a href="rsi_translation.html">rsi_translation</a></span></span>
<span><span class="op">)</span></span></code></pre></div>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">rsi_interpretation_history</span><span class="op">(</span>clean <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
@ -228,6 +230,10 @@
<dt>col_mo</dt>
<dd><p>column name of the IDs of the microorganisms (see <code><a href="as.mo.html">as.mo()</a></code>), defaults to the first column of class <code><a href="as.mo.html">mo</a></code>. Values will be coerced using <code><a href="as.mo.html">as.mo()</a></code>.</p></dd>
<dt>clean</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether previously stored results should be forgotten after returning the 'logbook' with results</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
@ -255,7 +261,8 @@
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a>your_data <span class="sc">%&gt;%</span> <span class="fu">mutate</span>(<span class="fu">across</span>(<span class="fu">where</span>(is.disk), as.rsi)) <span class="co"># since dplyr 1.0.0</span></span></code></pre><p></p></div></li>
</ul></li>
<li><p>For <strong>interpreting a complete data set</strong>, with automatic determination of MIC values, disk diffusion diameters, microorganism names or codes, and antimicrobial test results. This is done very simply by running <code>as.rsi(your_data)</code>.</p></li>
</ol></div>
</ol><p>For points 2, 3 and 4: Use <code>rsi_interpretation_history()</code> to retrieve a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> (or <a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a> if the <code>tibble</code> package is installed) with all results of the last <code>as.rsi()</code> call.</p>
</div>
<div class="section">
<h3 id="supported-guidelines">Supported Guidelines<a class="anchor" aria-label="anchor" href="#supported-guidelines"></a></h3>
@ -451,7 +458,6 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-in"><span> CIP <span class="op">=</span> <span class="fu"><a href="as.mic.html">as.mic</a></span><span class="op">(</span><span class="fl">0.256</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> GEN <span class="op">=</span> <span class="fu"><a href="as.disk.html">as.disk</a></span><span class="op">(</span><span class="fl">18</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> TOB <span class="op">=</span> <span class="fu"><a href="as.disk.html">as.disk</a></span><span class="op">(</span><span class="fl">16</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> NIT <span class="op">=</span> <span class="fu"><a href="as.mic.html">as.mic</a></span><span class="op">(</span><span class="fl">32</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> ERY <span class="op">=</span> <span class="st">"R"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">as.rsi</span><span class="op">(</span><span class="va">df</span><span class="op">)</span></span></span>
@ -464,26 +470,34 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of column 'GEN' (gentamicin) according</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> to EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of gentamicin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of column 'TOB' (tobramycin) according</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> to EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of tobramycin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of column 'NIT' (nitrofurantoin) according to</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of nitrofurantoin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Assigning class &lt;rsi&gt; to already clean column 'ERY' (erythromycin)...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> microorganism AMP CIP GEN TOB NIT ERY</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 Escherichia coli S I S S &lt;NA&gt; R</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> microorganism AMP CIP GEN TOB ERY</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 Escherichia coli S I S S R</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># return a 'logbook' about the results:</span></span></span>
<span class="r-in"><span><span class="fu">rsi_interpretation_history</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: 50 × 13</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> datetime index ab_input ab_consid…¹ mo_in…² mo_conside…³ guide…⁴</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dttm&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;ab&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2022-09-01 <span style="color: #949494;">13:35:41</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-09-01 <span style="color: #949494;">13:35:41</span> 1 AMP AMP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2022-09-01 <span style="color: #949494;">13:35:41</span> 1 CIP CIP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2022-09-01 <span style="color: #949494;">13:35:41</span> 1 GEN GEN Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2022-09-01 <span style="color: #949494;">13:35:41</span> 1 TOB TOB Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2022-09-01 <span style="color: #949494;">13:35:42</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-09-01 <span style="color: #949494;">13:35:42</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-09-01 <span style="color: #949494;">13:35:42</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-09-01 <span style="color: #949494;">13:35:42</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-09-01 <span style="color: #949494;">13:35:42</span> 4 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 40 more rows, 6 more variables: ref_table &lt;chr&gt;, method &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># breakpoint_S &lt;dbl&gt;, breakpoint_R &lt;dbl&gt;, input &lt;dbl&gt;, interpretation &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># and abbreviated variable names ¹ab_considered, ²mo_input, ³mo_considered,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># ⁴guideline</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># for single values</span></span></span>
<span class="r-in"><span><span class="fu">as.rsi</span><span class="op">(</span></span></span>
@ -506,8 +520,8 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-in"><span> ab <span class="op">=</span> <span class="st">"ampicillin"</span>, <span class="co"># and `ab` with as.ab()</span></span></span>
<span class="r-in"><span> guideline <span class="op">=</span> <span class="st">"EUCAST"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'ampicillin' according to EUCAST</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'ampicillin' (AMP, ampicillin)</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;rsi&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] R</span>
@ -548,12 +562,6 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'CIP' (ciprofloxacin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'NIT' (nitrofurantoin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of nitrofurantoin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMP' (ampicillin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
@ -562,34 +570,16 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'GEN' (gentamicin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of gentamicin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'TOB' (tobramycin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of tobramycin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'NIT' (nitrofurantoin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of nitrofurantoin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMP' (ampicillin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'CIP' (ciprofloxacin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'NIT' (nitrofurantoin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of nitrofurantoin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMP' (ampicillin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
@ -598,16 +588,10 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'GEN' (gentamicin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of gentamicin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'TOB' (tobramycin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of tobramycin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMP' (ampicillin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
@ -616,16 +600,10 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'GEN' (gentamicin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of gentamicin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'TOB' (tobramycin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of tobramycin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMP' (ampicillin) according to EUCAST</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
@ -634,16 +612,10 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'GEN' (gentamicin) according to</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of gentamicin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'TOB' (tobramycin) according to</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: interpretation of tobramycin is only available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (uncomplicated) urinary tract infections (UTI) for some microorganisms. Use</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> argument `uti` to set which isolates are from urine. See ?as.rsi.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Using column 'mo' as input for `col_mo`.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Function `as.mo()` is uncertain about "E. coli" (assuming Escherichia</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> coli). Run `mo_uncertainties()` to review this.</span>
@ -659,25 +631,8 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of column 'NIT' (nitrofurantoin) according to</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Function `as.mo()` is uncertain about "E. coli" (assuming Escherichia</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> coli). Run `mo_uncertainties()` to review this.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMP' (ampicillin) according to EUCAST</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'CIP' (ciprofloxacin) according to EUCAST</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'GEN' (gentamicin) according to</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'TOB' (tobramycin) according to</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'NIT' (nitrofurantoin) according to EUCAST</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> microorganism AMP CIP GEN TOB NIT ERY</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 Escherichia coli S I S S S R</span>
<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in mutate_at(., vars(AMP:NIT), as.rsi, mo = "E. coli", uti = TRUE):</span> Can't subset columns that don't exist.</span>
<span class="r-err co"><span class="r-pr">#&gt;</span> <span style="color: #BB0000;"></span> Column `NIT` doesn't exist.</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># For CLEANING existing R/SI values ------------------------------------</span></span></span>
<span class="r-in"><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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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">
@ -163,7 +163,7 @@ Function <code><a href="as.mo.html">as.mo()</a></code> to use the data for intel
<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="co"># Get version info of included data set</span></span></span>
<span class="r-in"><span><span class="fu"><a href="catalogue_of_life_version.html">catalogue_of_life_version</a></span><span class="op">(</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Included in this AMR package (v1.8.1.9047) are:</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Included in this AMR package (v1.8.1.9049) are:</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Catalogue of Life: 2019 Annual Checklist</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Available at: http://www.catalogueoflife.org</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -161,80 +161,28 @@
<p>If you are familiar with the <code><a href="https://dplyr.tidyverse.org/reference/case_when.html" class="external-link">case_when()</a></code> function of the <code>dplyr</code> package, you will recognise the input method to set your own rules. Rules must be set using what <span style="R">R</span> considers to be the 'formula notation'. The rule itself is written <em>before</em> the tilde (<code>~</code>) and the consequence of the rule is written <em>after</em> the tilde:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/custom_eucast_rules.html">custom_eucast_rules</a></span><span class="op">(</span><span class="va">TZP</span> <span class="op">==</span> <span class="st">"S"</span> <span class="op">~</span> <span class="va">aminopenicillins</span> <span class="op">==</span> <span class="st">"S"</span>,</span>
<span> <span class="va">TZP</span> <span class="op">==</span> <span class="st">"R"</span> <span class="op">~</span> <span class="va">aminopenicillins</span> <span class="op">==</span> <span class="st">"R"</span><span class="op">)</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode {r}"><pre><code></code></pre><p></p></div>
<p>These are two custom EUCAST rules: if TZP (piperacillin/tazobactam) is "S", all aminopenicillins (ampicillin and amoxicillin) must be made "S", and if TZP is "R", aminopenicillins must be made "R". These rules can also be printed to the console, so it is immediately clear how they work:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="va">x</span></span>
<span><span class="co">#&gt; A set of custom EUCAST rules:</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; 1. If TZP is "S" then set to S :</span></span>
<span><span class="co">#&gt; amoxicillin (AMX), ampicillin (AMP)</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; 2. If TZP is "R" then set to R :</span></span>
<span><span class="co">#&gt; amoxicillin (AMX), ampicillin (AMP)</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode {r}"><pre><code></code></pre><p></p></div>
<p>The rules (the part <em>before</em> the tilde, in above example <code>TZP == "S"</code> and <code>TZP == "R"</code>) must be evaluable in your data set: it should be able to run as a filter in your data set without errors. This means for the above example that the column <code>TZP</code> must exist. We will create a sample data set and test the rules set:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="va">df</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>mo <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Escherichia coli"</span>, <span class="st">"Klebsiella pneumoniae"</span><span class="op">)</span>,</span>
<span> TZP <span class="op">=</span> <span class="fu"><a href="../reference/as.rsi.html">as.rsi</a></span><span class="op">(</span><span class="st">"R"</span><span class="op">)</span>,</span>
<span> ampi <span class="op">=</span> <span class="fu"><a href="../reference/as.rsi.html">as.rsi</a></span><span class="op">(</span><span class="st">"S"</span><span class="op">)</span>,</span>
<span> cipro <span class="op">=</span> <span class="fu"><a href="../reference/as.rsi.html">as.rsi</a></span><span class="op">(</span><span class="st">"S"</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="va">df</span></span>
<span><span class="co">#&gt; mo TZP ampi cipro</span></span>
<span><span class="co">#&gt; 1 Escherichia coli R S S</span></span>
<span><span class="co">#&gt; 2 Klebsiella pneumoniae R S S</span></span>
<span></span>
<span><span class="fu"><a href="../reference/eucast_rules.html">eucast_rules</a></span><span class="op">(</span><span class="va">df</span>, rules <span class="op">=</span> <span class="st">"custom"</span>, custom_rules <span class="op">=</span> <span class="va">x</span>, info <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<span><span class="co">#&gt; mo TZP ampi cipro</span></span>
<span><span class="co">#&gt; 1 Escherichia coli R R S</span></span>
<span><span class="co">#&gt; 2 Klebsiella pneumoniae R R S</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode {r}"><pre><code></code></pre><p></p></div>
</div>
<div class="section">
<h3 id="using-taxonomic-properties-in-rules">Using taxonomic properties in rules<a class="anchor" aria-label="anchor" href="#using-taxonomic-properties-in-rules"></a></h3>
<p>There is one exception in variables used for the rules: all column names of the <a href="microorganisms.html">microorganisms</a> data set can also be used, but do not have to exist in the data set. These column names are: "mo", "fullname", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", "rank", "ref", "species_id", "source", "prevalence" and "snomed". Thus, this next example will work as well, despite the fact that the <code>df</code> data set does not contain a column <code>genus</code>:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="va">y</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/custom_eucast_rules.html">custom_eucast_rules</a></span><span class="op">(</span><span class="va">TZP</span> <span class="op">==</span> <span class="st">"S"</span> <span class="op">&amp;</span> <span class="va">genus</span> <span class="op">==</span> <span class="st">"Klebsiella"</span> <span class="op">~</span> <span class="va">aminopenicillins</span> <span class="op">==</span> <span class="st">"S"</span>,</span>
<span> <span class="va">TZP</span> <span class="op">==</span> <span class="st">"R"</span> <span class="op">&amp;</span> <span class="va">genus</span> <span class="op">==</span> <span class="st">"Klebsiella"</span> <span class="op">~</span> <span class="va">aminopenicillins</span> <span class="op">==</span> <span class="st">"R"</span><span class="op">)</span></span>
<span></span>
<span><span class="fu"><a href="../reference/eucast_rules.html">eucast_rules</a></span><span class="op">(</span><span class="va">df</span>, rules <span class="op">=</span> <span class="st">"custom"</span>, custom_rules <span class="op">=</span> <span class="va">y</span>, info <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<span><span class="co">#&gt; mo TZP ampi cipro</span></span>
<span><span class="co">#&gt; 1 Escherichia coli R S S</span></span>
<span><span class="co">#&gt; 2 Klebsiella pneumoniae R R S</span></span></code></pre><p></p></div>
<p>There is one exception in variables used for the rules: all column names of the <a href="microorganisms.html">microorganisms</a> data set can also be used, but do not have to exist in the data set. These column names are: <code>r vector_and(colnames(microorganisms), sort = FALSE)</code>. Thus, this next example will work as well, despite the fact that the <code>df</code> data set does not contain a column <code>genus</code>:</p>
<p></p><div class="sourceCode {r}"><pre><code></code></pre><p></p></div>
</div>
<div class="section">
<h3 id="usage-of-antibiotic-group-names">Usage of antibiotic group names<a class="anchor" aria-label="anchor" href="#usage-of-antibiotic-group-names"></a></h3>
<p>It is possible to define antibiotic groups instead of single antibiotics for the rule consequence, the part <em>after</em> the tilde. In above examples, the antibiotic group <code>aminopenicillins</code> is used to include ampicillin and amoxicillin. The following groups are allowed (case-insensitive). Within parentheses are the agents that will be matched when running the rule.</p><ul><li><p>"aminoglycosides"<br>(amikacin, amikacin/fosfomycin, amphotericin B-high, apramycin, arbekacin, astromicin, bekanamycin, dibekacin, framycetin, gentamicin, gentamicin-high, habekacin, hygromycin, isepamicin, kanamycin, kanamycin-high, kanamycin/cephalexin, micronomicin, neomycin, netilmicin, pentisomicin, plazomicin, propikacin, ribostamycin, sisomicin, streptoduocin, streptomycin, streptomycin-high, tobramycin and tobramycin-high)</p></li>
<li><p>"aminopenicillins"<br>(amoxicillin and ampicillin)</p></li>
<li><p>"antifungals"<br>(5-fluorocytosine, amphotericin B, anidulafungin, butoconazole, caspofungin, ciclopirox, clotrimazole, econazole, fluconazole, fosfluconazole, griseofulvin, hachimycin, ibrexafungerp, isavuconazole, isoconazole, itraconazole, ketoconazole, manogepix, micafungin, miconazole, nystatin, pimaricin, posaconazole, rezafungin, ribociclib, sulconazole, terbinafine, terconazole and voriconazole)</p></li>
<li><p>"antimycobacterials"<br>(4-aminosalicylic acid, calcium aminosalicylate, capreomycin, clofazimine, delamanid, enviomycin, ethambutol, ethambutol/isoniazid, ethionamide, isoniazid, morinamide, p-aminosalicylic acid, pretomanid, prothionamide, pyrazinamide, rifabutin, rifampicin, rifampicin/isoniazid, rifampicin/pyrazinamide/ethambutol/isoniazid, rifampicin/pyrazinamide/isoniazid, rifamycin, rifapentine, simvastatin/fenofibrate, sodium aminosalicylate, streptomycin/isoniazid, terizidone, thioacetazone/isoniazid, tiocarlide and viomycin)</p></li>
<li><p>"betalactams"<br>(amoxicillin, amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin, ampicillin/sulbactam, apalcillin, aspoxicillin, avibactam, azidocillin, azlocillin, aztreonam, aztreonam/avibactam, aztreonam/nacubactam, bacampicillin, benzathine benzylpenicillin, benzathine phenoxymethylpenicillin, benzylpenicillin, biapenem, carbenicillin, carindacillin, cefacetrile, cefaclor, cefadroxil, cefaloridine, cefamandole, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/clavulanic acid, cefepime/nacubactam, cefepime/tazobactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/enzyme inhibitor, ceftolozane/tazobactam, ceftriaxone, cefuroxime, cefuroxime axetil, cephalexin, cephalothin, cephapirin, cephradine, ciclacillin, clometocillin, cloxacillin, dicloxacillin, doripenem, epicillin, ertapenem, flucloxacillin, hetacillin, imipenem, imipenem/EDTA, imipenem/relebactam, latamoxef, lenampicillin, loracarbef, mecillinam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, metampicillin, methicillin, mezlocillin, mezlocillin/sulbactam, nacubactam, nafcillin, oxacillin, panipenem, penamecillin, penicillin/novobiocin, penicillin/sulbactam, phenethicillin, phenoxymethylpenicillin, piperacillin, piperacillin/sulbactam, piperacillin/tazobactam, piridicillin, pivampicillin, pivmecillinam, procaine benzylpenicillin, propicillin, razupenem, ritipenem, ritipenem acoxil, sarmoxicillin, sulbactam, sulbenicillin, sultamicillin, talampicillin, tazobactam, tebipenem, temocillin, ticarcillin and ticarcillin/clavulanic acid)</p></li>
<li><p>"carbapenems"<br>(biapenem, doripenem, ertapenem, imipenem, imipenem/EDTA, imipenem/relebactam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, panipenem, razupenem, ritipenem, ritipenem acoxil and tebipenem)</p></li>
<li><p>"cephalosporins"<br>(cefacetrile, cefaclor, cefadroxil, cefaloridine, cefamandole, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/clavulanic acid, cefepime/tazobactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/enzyme inhibitor, ceftolozane/tazobactam, ceftriaxone, cefuroxime, cefuroxime axetil, cephalexin, cephalothin, cephapirin, cephradine, latamoxef and loracarbef)</p></li>
<li><p>"cephalosporins_1st"<br>(cefacetrile, cefadroxil, cefaloridine, cefatrizine, cefazedone, cefazolin, cefroxadine, ceftezole, cephalexin, cephalothin, cephapirin and cephradine)</p></li>
<li><p>"cephalosporins_2nd"<br>(cefaclor, cefamandole, cefmetazole, cefonicid, ceforanide, cefotetan, cefotiam, cefoxitin, cefoxitin screening, cefprozil, cefuroxime, cefuroxime axetil and loracarbef)</p></li>
<li><p>"cephalosporins_3rd"<br>(cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefetamet, cefetamet pivoxil, cefixime, cefmenoxime, cefodizime, cefoperazone, cefoperazone/sulbactam, cefotaxime, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotiam hexetil, cefovecin, cefpimizole, cefpiramide, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefsulodin, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftriaxone and latamoxef)</p></li>
<li><p>"cephalosporins_4th"<br>(cefepime, cefepime/clavulanic acid, cefepime/tazobactam, cefetecol, cefoselis, cefozopran, cefpirome and cefquinome)</p></li>
<li><p>"cephalosporins_5th"<br>(ceftaroline, ceftaroline/avibactam, ceftobiprole, ceftobiprole medocaril, ceftolozane/enzyme inhibitor and ceftolozane/tazobactam)</p></li>
<li><p>"cephalosporins_except_caz"<br>(cefacetrile, cefaclor, cefadroxil, cefaloridine, cefamandole, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/clavulanic acid, cefepime/tazobactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/enzyme inhibitor, ceftolozane/tazobactam, ceftriaxone, cefuroxime, cefuroxime axetil, cephalexin, cephalothin, cephapirin, cephradine, latamoxef and loracarbef)</p></li>
<li><p>"fluoroquinolones"<br>(besifloxacin, ciprofloxacin, clinafloxacin, danofloxacin, delafloxacin, difloxacin, enoxacin, enrofloxacin, finafloxacin, fleroxacin, garenoxacin, gatifloxacin, gemifloxacin, grepafloxacin, levofloxacin, levonadifloxacin, lomefloxacin, marbofloxacin, metioxate, miloxacin, moxifloxacin, nadifloxacin, nifuroquine, norfloxacin, ofloxacin, orbifloxacin, pazufloxacin, pefloxacin, pradofloxacin, premafloxacin, prulifloxacin, rufloxacin, sarafloxacin, sitafloxacin, sparfloxacin, temafloxacin, tilbroquinol, tioxacin, tosufloxacin and trovafloxacin)</p></li>
<li><p>"glycopeptides"<br>(avoparcin, dalbavancin, norvancomycin, oritavancin, ramoplanin, teicoplanin, teicoplanin-macromethod, telavancin, vancomycin and vancomycin-macromethod)</p></li>
<li><p>"glycopeptides_except_lipo"<br>(avoparcin, norvancomycin, ramoplanin, teicoplanin, teicoplanin-macromethod, vancomycin and vancomycin-macromethod)</p></li>
<li><p>"lincosamides"<br>(acetylmidecamycin, acetylspiramycin, clindamycin, gamithromycin, kitasamycin, lincomycin, meleumycin, nafithromycin, pirlimycin, primycin, solithromycin, tildipirosin, tilmicosin, tulathromycin, tylosin and tylvalosin)</p></li>
<li><p>"lipoglycopeptides"<br>(dalbavancin, oritavancin and telavancin)</p></li>
<li><p>"macrolides"<br>(acetylmidecamycin, acetylspiramycin, azithromycin, clarithromycin, dirithromycin, erythromycin, flurithromycin, gamithromycin, josamycin, kitasamycin, meleumycin, midecamycin, miocamycin, nafithromycin, oleandomycin, pirlimycin, primycin, rokitamycin, roxithromycin, solithromycin, spiramycin, telithromycin, tildipirosin, tilmicosin, troleandomycin, tulathromycin, tylosin and tylvalosin)</p></li>
<li><p>"oxazolidinones"<br>(cadazolid, cycloserine, linezolid, tedizolid and thiacetazone)</p></li>
<li><p>"penicillins"<br>(amoxicillin, amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin, ampicillin/sulbactam, apalcillin, aspoxicillin, avibactam, azidocillin, azlocillin, aztreonam, aztreonam/avibactam, aztreonam/nacubactam, bacampicillin, benzathine benzylpenicillin, benzathine phenoxymethylpenicillin, benzylpenicillin, carbenicillin, carindacillin, cefepime/nacubactam, ciclacillin, clometocillin, cloxacillin, dicloxacillin, epicillin, flucloxacillin, hetacillin, lenampicillin, mecillinam, metampicillin, methicillin, mezlocillin, mezlocillin/sulbactam, nacubactam, nafcillin, oxacillin, penamecillin, penicillin/novobiocin, penicillin/sulbactam, phenethicillin, phenoxymethylpenicillin, piperacillin, piperacillin/sulbactam, piperacillin/tazobactam, piridicillin, pivampicillin, pivmecillinam, procaine benzylpenicillin, propicillin, sarmoxicillin, sulbactam, sulbenicillin, sultamicillin, talampicillin, tazobactam, temocillin, ticarcillin and ticarcillin/clavulanic acid)</p></li>
<li><p>"polymyxins"<br>(colistin, polymyxin B and polymyxin B/polysorbate 80)</p></li>
<li><p>"quinolones"<br>(besifloxacin, cinoxacin, ciprofloxacin, clinafloxacin, danofloxacin, delafloxacin, difloxacin, enoxacin, enrofloxacin, finafloxacin, fleroxacin, flumequine, garenoxacin, gatifloxacin, gemifloxacin, grepafloxacin, levofloxacin, levonadifloxacin, lomefloxacin, marbofloxacin, metioxate, miloxacin, moxifloxacin, nadifloxacin, nalidixic acid, nifuroquine, nitroxoline, norfloxacin, ofloxacin, orbifloxacin, oxolinic acid, pazufloxacin, pefloxacin, pipemidic acid, piromidic acid, pradofloxacin, premafloxacin, prulifloxacin, rosoxacin, rufloxacin, sarafloxacin, sitafloxacin, sparfloxacin, temafloxacin, tilbroquinol, tioxacin, tosufloxacin and trovafloxacin)</p></li>
<li><p>"streptogramins"<br>(pristinamycin and quinupristin/dalfopristin)</p></li>
<li><p>"tetracyclines"<br>(cetocycline, chlortetracycline, clomocycline, demeclocycline, doxycycline, eravacycline, lymecycline, metacycline, minocycline, omadacycline, oxytetracycline, penimepicycline, rolitetracycline, tetracycline and tigecycline)</p></li>
<li><p>"tetracyclines_except_tgc"<br>(cetocycline, chlortetracycline, clomocycline, demeclocycline, doxycycline, eravacycline, lymecycline, metacycline, minocycline, omadacycline, oxytetracycline, penimepicycline, rolitetracycline and tetracycline)</p></li>
<li><p>"trimethoprims"<br>(brodimoprim, sulfadiazine, sulfadiazine/tetroxoprim, sulfadiazine/trimethoprim, sulfadimethoxine, sulfadimidine, sulfadimidine/trimethoprim, sulfafurazole, sulfaisodimidine, sulfalene, sulfamazone, sulfamerazine, sulfamerazine/trimethoprim, sulfamethizole, sulfamethoxazole, sulfamethoxypyridazine, sulfametomidine, sulfametoxydiazine, sulfametrole/trimethoprim, sulfamoxole, sulfamoxole/trimethoprim, sulfanilamide, sulfaperin, sulfaphenazole, sulfapyridine, sulfathiazole, sulfathiourea, trimethoprim and trimethoprim/sulfamethoxazole)</p></li>
<li><p>"ureidopenicillins"<br>(azlocillin, mezlocillin, piperacillin and piperacillin/tazobactam)</p></li>
</ul></div>
<p>It is possible to define antibiotic groups instead of single antibiotics for the rule consequence, the part <em>after</em> the tilde. In above examples, the antibiotic group <code>aminopenicillins</code> is used to include ampicillin and amoxicillin. The following groups are allowed (case-insensitive). Within parentheses are the agents that will be matched when running the rule.</p>
<p><code>r paste0(" * ", sapply(DEFINED_AB_GROUPS, function(x) paste0("\"", tolower(gsub("^AB_", "", x)), "\"\\cr(", vector_and(ab_name(eval(parse(text = x), envir = asNamespace("AMR")), language = NULL, tolower = TRUE), quotes = FALSE), ")"), USE.NAMES = FALSE), "\n", collapse = "")</code></p>
</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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">
@ -229,36 +229,12 @@ Leclercq et al. <strong>EUCAST expert rules in antimicrobial susceptibility test
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p><strong>Note:</strong> This function does not translate MIC values to RSI values. Use <code><a href="as.rsi.html">as.rsi()</a></code> for that. <br><strong>Note:</strong> When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance. <br></p>
<p>The file containing all EUCAST rules is located here: <a href="https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv" class="external-link">https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv</a>. <strong>Note:</strong> Old taxonomic names are replaced with the current taxonomy where applicable. For example, <em>Ochrobactrum anthropi</em> was renamed to <em>Brucella anthropi</em> in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The file used as input for this <code>AMR</code> package contains the taxonomy updated until <a href="catalogue_of_life.html">5 October 2021</a>.</p><div class="section">
<p>The file containing all EUCAST rules is located here: <a href="https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv" class="external-link">https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv</a>. <strong>Note:</strong> Old taxonomic names are replaced with the current taxonomy where applicable. For example, <em>Ochrobactrum anthropi</em> was renamed to <em>Brucella anthropi</em> in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The file used as input for this <code>AMR</code> package contains the taxonomy updated until <code><a href="catalogue_of_life.html">r CATALOGUE_OF_LIFE$yearmonth_LPSN</a></code>.</p><div class="section">
<h3 id="custom-rules">Custom Rules<a class="anchor" aria-label="anchor" href="#custom-rules"></a></h3>
<p>Custom rules can be created using <code><a href="custom_eucast_rules.html">custom_eucast_rules()</a></code>, e.g.:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/custom_eucast_rules.html">custom_eucast_rules</a></span><span class="op">(</span><span class="va">AMC</span> <span class="op">==</span> <span class="st">"R"</span> <span class="op">&amp;</span> <span class="va">genus</span> <span class="op">==</span> <span class="st">"Klebsiella"</span> <span class="op">~</span> <span class="va">aminopenicillins</span> <span class="op">==</span> <span class="st">"R"</span>,</span>
<span> <span class="va">AMC</span> <span class="op">==</span> <span class="st">"I"</span> <span class="op">&amp;</span> <span class="va">genus</span> <span class="op">==</span> <span class="st">"Klebsiella"</span> <span class="op">~</span> <span class="va">aminopenicillins</span> <span class="op">==</span> <span class="st">"I"</span><span class="op">)</span></span>
<span></span>
<span><span class="fu"><a href="../reference/eucast_rules.html">eucast_rules</a></span><span class="op">(</span><span class="va">example_isolates</span>, rules <span class="op">=</span> <span class="st">"custom"</span>, custom_rules <span class="op">=</span> <span class="va">x</span>, info <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<span><span class="co">#&gt; # A tibble: 2,000 x 46</span></span>
<span><span class="co">#&gt; date patient age gender ward mo PEN OXA FLC AMX </span></span>
<span><span class="co">#&gt; * &lt;date&gt; &lt;chr&gt; &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; &lt;mo&gt; &lt;rsi&gt; &lt;rsi&gt; &lt;rsi&gt; &lt;rsi&gt;</span></span>
<span><span class="co">#&gt; 1 2002-01-02 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA </span></span>
<span><span class="co">#&gt; 2 2002-01-03 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA </span></span>
<span><span class="co">#&gt; 3 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA </span></span>
<span><span class="co">#&gt; 4 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA </span></span>
<span><span class="co">#&gt; 5 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA </span></span>
<span><span class="co">#&gt; 6 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA </span></span>
<span><span class="co">#&gt; 7 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R </span></span>
<span><span class="co">#&gt; 8 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R </span></span>
<span><span class="co">#&gt; 9 2002-01-16 067927 45 F ICU B_STPHY_EPDR R NA R NA </span></span>
<span><span class="co">#&gt; 10 2002-01-17 858515 79 F ICU B_STPHY_EPDR R NA S NA </span></span>
<span><span class="co">#&gt; # ... with 1,990 more rows, and 36 more variables: AMC &lt;rsi&gt;, AMP &lt;rsi&gt;,</span></span>
<span><span class="co">#&gt; # TZP &lt;rsi&gt;, CZO &lt;rsi&gt;, FEP &lt;rsi&gt;, CXM &lt;rsi&gt;, FOX &lt;rsi&gt;, CTX &lt;rsi&gt;,</span></span>
<span><span class="co">#&gt; # CAZ &lt;rsi&gt;, CRO &lt;rsi&gt;, GEN &lt;rsi&gt;, TOB &lt;rsi&gt;, AMK &lt;rsi&gt;, KAN &lt;rsi&gt;,</span></span>
<span><span class="co">#&gt; # TMP &lt;rsi&gt;, SXT &lt;rsi&gt;, NIT &lt;rsi&gt;, FOS &lt;rsi&gt;, LNZ &lt;rsi&gt;, CIP &lt;rsi&gt;,</span></span>
<span><span class="co">#&gt; # MFX &lt;rsi&gt;, VAN &lt;rsi&gt;, TEC &lt;rsi&gt;, TCY &lt;rsi&gt;, TGC &lt;rsi&gt;, DOX &lt;rsi&gt;,</span></span>
<span><span class="co">#&gt; # ERY &lt;rsi&gt;, CLI &lt;rsi&gt;, AZM &lt;rsi&gt;, IPM &lt;rsi&gt;, MEM &lt;rsi&gt;, MTR &lt;rsi&gt;,</span></span>
<span><span class="co">#&gt; # CHL &lt;rsi&gt;, COL &lt;rsi&gt;, MUP &lt;rsi&gt;, RIF &lt;rsi&gt;</span></span>
<span><span class="co">#&gt; # i Use `print(n = ...)` to see more rows, and `colnames()` to see all variable names</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode {r}"><pre><code></code></pre><p></p></div>
</div>
<div class="section">

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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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: 56 KiB

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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -177,39 +177,41 @@
<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] 53 18 52 33 48 33 11 63 36 51 38 25 17 19 32 18 28 9 65 43 38 17 51 1 19</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 12 35 40 22 10 37 48 49 53 41 19 30 7 54 19 28 25 20 25 14 57 1 47 49 29</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 34 66 27 18 10 28 54 51 52 6 34 26 4 35 64 29 32 25 14 35 28 22 27 33 55</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 44 45 12 46 13 59 53 46 60 13 41 53 42 10 30 64 18 25 59 3 65 32 44 15 16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 58 2 44 23 21 42 26 41 14 17 16 64 25 50 8 11 63 37 30 28 27 52 53 4 25</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 35 28 45 9 7 61 50 1 53 19 1 58 11 39 21 43 6 24 40 2 63 6 27 16 63</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 41 36 20 23 57 5 64 47 29 58 2 30 57 8 25 11 15 13 14 52 7 31 1 27 62</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 65 60 25 29 7 1 56 55 49 65 28 64 33 26 46 1 18 22 64 14 63 10 66 59 13</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 47 61 41 30 22 55 11 62 22 52 58 11 11 17 15 28 11 13 37 59 31 18 8 48 41</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 45 3 64 1 53 8 64 55 62 41 23 58 64 51 18 16 8 64 40 47 50 20 9 15 31</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 24 58 8 37 7 21 67 30 17 14 1 43 41 9 17 45 44 13 21 31 29 39 2 66 36</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 12 61 52 30 67 58 65 63 30 56 26 60 66 40 60 43 51 35 65 64 7 64 25 54 47</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 19 9 7 9 63 52 41 67 5 33 21 20 42 4 17 35 66 19 34 37 18 23 33 8 7</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 51 41 60 38 2 67 58 10 42 38 1 29 49 10 22 46 67 1 3 39 61 27 32 5 63</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 12 16 3 53 7 49 31 23 11 22 29 37 30 45 32 35 45 1 56 46 23 18 49 64 30</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 27 8 1 6 32 9 10 18 12 20 37 46 49 9 24 10 67 57 8 55 48 62 65 31 61</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 TRUE TRUE FALSE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] FALSE FALSE TRUE FALSE FALSE TRUE TRUE TRUE FALSE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] FALSE TRUE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] TRUE FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] TRUE FALSE FALSE TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] FALSE FALSE TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [157] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] FALSE FALSE TRUE TRUE TRUE FALSE TRUE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] FALSE TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] FALSE FALSE TRUE TRUE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE TRUE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] TRUE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] TRUE TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE TRUE FALSE TRUE FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE 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 FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] TRUE FALSE FALSE TRUE FALSE FALSE FALSE TRUE</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># filter on results from the third 60-day episode only, using base R</span></span></span>
<span class="r-in"><span><span class="va">df</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/which.html" class="external-link">which</a></span><span class="op">(</span><span class="fu">get_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, <span class="fl">60</span><span class="op">)</span> <span class="op">==</span> <span class="fl">3</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 3 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender ward mo PEN OXA FLC AMX </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2002-07-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: #BCBCBC;">1</span> 2002-06-23 798871 82 M Clinical B_ENTRC_FCLS NA NA NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2002-06-06 24D393 20 F Clinical B_ESCHR_COLI R NA NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</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: #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>
@ -245,16 +247,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> 534091 2015-02-15 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 968584 2005-12-29 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 419568 2014-10-19 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 291882 2010-05-01 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> A97263 2013-11-23 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 192353 2010-04-05 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 189363 2004-06-22 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 422833 2017-03-21 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> C34429 2011-01-02 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> C11627 2014-09-11 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 023456 2012-11-24 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> A79917 2016-05-21 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 257844 2011-05-22 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> F50462 2008-05-11 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 3CF3C4 2006-06-26 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> E29972 2014-11-22 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 406502 2004-02-29 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> D10538 2016-08-13 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 336698 2006-07-02 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> DF7736 2014-02-19 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 190 more rows</span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="va">df</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
@ -266,19 +268,19 @@
<span class="r-in"><span> <span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 200 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [182]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward date patient new_index new_logical</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> Clinical 2015-02-15 534091 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> Clinical 2005-12-29 968584 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical 2014-10-19 419568 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical 2010-05-01 291882 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2013-11-23 A97263 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Clinical 2010-04-05 192353 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Clinical 2004-06-22 189363 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> ICU 2017-03-21 422833 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> ICU 2011-01-02 C34429 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Clinical 2014-09-11 C11627 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [178]</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 2012-11-24 023456 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> Clinical 2016-05-21 A79917 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical 2011-05-22 257844 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> ICU 2008-05-11 F50462 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2006-06-26 3CF3C4 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Outpatient 2014-11-22 E29972 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Clinical 2004-02-29 406502 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> ICU 2016-08-13 D10538 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> Clinical 2006-07-02 336698 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> ICU 2014-02-19 DF7736 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>
@ -293,9 +295,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 124 14 54 72</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 48 13 33 39</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 10 7 9 9</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 119 14 54 79</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 48 12 32 34</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 11 6 9 10</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>
@ -325,19 +327,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 [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> 534091 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 968584 B_PSDMN_AERG Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 419568 B_STRPT_PNMN Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 291882 B_STPHY_EPDR Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> A97263 B_KLBSL_PNMN Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 192353 B_STRPT_PNMN Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 189363 B_STPHY_AURS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 422833 B_STPHY_EPDR ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> C34429 B_ESCHR_COLI ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> C11627 B_STRPT_GRPC Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, mo, ward [185]</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> 023456 B_PROTS_MRBL Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> A79917 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 257844 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> F50462 B_STPHY_CONS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 3CF3C4 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> E29972 B_STPHY_HMNS Outpatient TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 406502 B_STRPT_PNMN Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> D10538 B_ESCHR_COLI ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 336698 B_NESSR_SICC Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> DF7736 B_STRPT_PYGN ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 190 more rows</span></span>
<span class="r-in"><span><span class="co"># }</span></span></span>
</code></pre></div>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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,7 +195,7 @@
<dl><dt>
<code><a href="as.rsi.html">as.rsi()</a></code> <code><a href="as.rsi.html">NA_rsi_</a></code> <code><a href="as.rsi.html">is.rsi()</a></code> <code><a href="as.rsi.html">is.rsi.eligible()</a></code>
<code><a href="as.rsi.html">as.rsi()</a></code> <code><a href="as.rsi.html">NA_rsi_</a></code> <code><a href="as.rsi.html">is.rsi()</a></code> <code><a href="as.rsi.html">is.rsi.eligible()</a></code> <code><a href="as.rsi.html">rsi_interpretation_history()</a></code>
</dt>
<dd>Interpret MIC and Disk Values, or Clean Raw R/SI Data</dd>
</dl><dl><dt>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -167,9 +167,9 @@
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">kurtosis</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fl">10000</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2.958293</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2.888967</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.007432764</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.05684207</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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,70 +195,73 @@
<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 &lt;mic&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.5 4 &gt;=128 &lt;=0.002 0.25 32 0.25 0.025 4 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 0.005 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.0625 0.001 0.25 &gt;=128 0.025 1 0.5 0.005 1 16 </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.01781163 0.59141290 1.54741502 -1.50524970 -0.17338879 1.16501418</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.17338879 -0.80854285 0.59141290 -1.25249649</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.41123292 -1.57568929 -0.02085462 1.73584774 -0.66925895 0.36952368</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.17433453 -1.12247412 0.36952368 1.15028028</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>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>
<span class="r-in"><span> amox <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">"amox"</span>, mo <span class="op">=</span> <span class="st">"Escherichia coli"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> cipr <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">"cipr"</span>, mo <span class="op">=</span> <span class="st">"Escherichia coli"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> gent <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">"gent"</span>, mo <span class="op">=</span> <span class="st">"Escherichia coli"</span><span class="op">)</span>,</span></span>
<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 class="op">)</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>
<span class="r-in"><span> amox <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">"amox"</span>, mo <span class="op">=</span> <span class="st">"Escherichia coli"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> cipr <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">"cipr"</span>, mo <span class="op">=</span> <span class="st">"Escherichia coli"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> gent <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">"gent"</span>, mo <span class="op">=</span> <span class="st">"Escherichia coli"</span><span class="op">)</span>,</span></span>
<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 8 0.25 1 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 32 0.5 &lt;=0.5 &lt;=0.25</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 8 0.0625 &lt;=0.5 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 16 1 1 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 16 0.125 4 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 8 1 1 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G 32 0.0625 1 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H 16 0.25 &lt;=0.5 &lt;=0.25</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I 4 0.25 4 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J 16 0.0625 2 1</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 2 2 &lt;=0.25 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 4 2 2 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C &gt;=16 2 &lt;=0.25 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D &lt;=1 0.25 2 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E &gt;=16 &lt;=0.125 &lt;=0.25 0.25</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F &gt;=16 &lt;=0.125 4 &gt;=16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G &lt;=1 2 &lt;=0.25 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H 4 0.25 4 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I &lt;=1 1 0.5 &gt;=16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J 8 2 0.5 &gt;=16</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.1021142 -0.0512292 -0.4408420 0.5640747 0.2717444 -0.0723823</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.3064119 -0.4761266 -0.0939276 -0.1098375</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.15641280 0.42857996 0.14992674 -0.42197963 -0.81679006 0.57661476</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.30349990 0.01816313 -0.02817569 0.55357349</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> 8 H 16 0.25 &lt;=0.5 &lt;=0.25 -0.4761266</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 8 0.0625 &lt;=0.5 8 -0.4408420</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J 16 0.0625 2 1 -0.1098375</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I 4 0.25 4 1 -0.0939276</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 8 1 1 0.5 -0.0723823</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 32 0.5 &lt;=0.5 &lt;=0.25 -0.0512292</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 8 0.25 1 8 0.1021142</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 16 0.125 4 1 0.2717444</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G 32 0.0625 1 8 0.3064119</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 16 1 1 4 0.5640747</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> 5 E &gt;=16 &lt;=0.125 &lt;=0.25 0.25 -0.81679006</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D &lt;=1 0.25 2 2 -0.42197963</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G &lt;=1 2 &lt;=0.25 4 -0.30349990</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 2 2 &lt;=0.25 4 -0.15641280</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I &lt;=1 1 0.5 &gt;=16 -0.02817569</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H 4 0.25 4 2 0.01816313</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C &gt;=16 2 &lt;=0.25 2 0.14992674</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 4 2 2 4 0.42857996</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J 8 2 0.5 &gt;=16 0.55357349</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F &gt;=16 &lt;=0.125 4 &gt;=16 0.57661476</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>
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html" class="external-link">mutate</a></span><span class="op">(</span>amr_distance <span class="op">=</span> <span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">.</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-in"><span> check_id_C <span class="op">=</span> <span class="fu">distance_from_row</span><span class="op">(</span><span class="va">amr_distance</span>, <span class="va">id</span> <span class="op">==</span> <span class="st">"C"</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> </span></span>
<span class="r-in"><span> <span class="va">y</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html" class="external-link">mutate</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> amr_distance <span class="op">=</span> <span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">.</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-in"><span> check_id_C <span class="op">=</span> <span class="fu">distance_from_row</span><span class="op">(</span><span class="va">amr_distance</span>, <span class="va">id</span> <span class="op">==</span> <span class="st">"C"</span><span class="op">)</span></span></span>
<span class="r-in"><span> <span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/arrange.html" class="external-link">arrange</a></span><span class="op">(</span><span class="va">check_id_C</span><span class="op">)</span></span></span>
<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 8 0.0625 &lt;=0.5 8 -0.4408420 0.0000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 H 16 0.25 &lt;=0.5 &lt;=0.25 -0.4761266 0.0352847</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 J 16 0.0625 2 1 -0.1098375 0.3310044</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 I 4 0.25 4 1 -0.0939276 0.3469144</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 F 8 1 1 0.5 -0.0723823 0.3684596</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 B 32 0.5 &lt;=0.5 &lt;=0.25 -0.0512292 0.3896127</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 A 8 0.25 1 8 0.1021142 0.5429562</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 E 16 0.125 4 1 0.2717444 0.7125863</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 G 32 0.0625 1 8 0.3064119 0.7472539</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 D 16 1 1 4 0.5640747 1.0049167</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 2 &lt;=0.25 2 0.14992674 0.0000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 H 4 0.25 4 2 0.01816313 0.1317636</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 I &lt;=1 1 0.5 &gt;=16 -0.02817569 0.1781024</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 B 4 2 2 4 0.42857996 0.2786532</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 A 2 2 &lt;=0.25 4 -0.15641280 0.3063395</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 J 8 2 0.5 &gt;=16 0.55357349 0.4036468</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 F &gt;=16 &lt;=0.125 4 &gt;=16 0.57661476 0.4266880</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 G &lt;=1 2 &lt;=0.25 4 -0.30349990 0.4534266</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 D &lt;=1 0.25 2 2 -0.42197963 0.5719064</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 E &gt;=16 &lt;=0.125 &lt;=0.25 0.25 -0.81679006 0.9667168</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 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: 25 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: 37 KiB

After

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

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -178,43 +178,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 &lt;mic&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 256 1 0.001 128 0.001 64 256 0.001 0.002 16 128 256 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] 0.001 64 8 0.025 2 0.002 128 64 128 0.001 0.01 0.25 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] 0.025</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2 64 16 &gt;=256 64 128 &lt;=0.001 0.5 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 16 2 8 8 2 &gt;=256 32 64 0.5 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [19] &gt;=256 16 0.5 0.0625 64 0.01 0.125 </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 &lt;disk&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 6 22 25 8 47 50 15 46 23 33 41 11 48 17 36 28 15 6 11 44 34 19 9 48 29</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 41 20 7 37 10 50 20 23 38 32 44 6 34 26 19 46 43 11 32 50 18 12 32 19 37</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 &lt;rsi&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] I R R R R R I R I R S R S S S I S S S S I R I I S</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] S R R R I S I S I R I I S S R R R I R R R I S R R</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># \donttest{</span></span></span>
<span class="r-in"><span><span class="co"># make the random generation more realistic by setting a bug and/or drug:</span></span></span>
<span class="r-in"><span><span class="fu">random_mic</span><span class="op">(</span><span class="fl">25</span>, <span class="st">"Klebsiella pneumoniae"</span><span class="op">)</span> <span class="co"># range 0.0625-64</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;mic&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.025 32 0.125 32 0.0625 0.25 0.125 0.002 0.125 0.25 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 0.0625 2 2 0.01 0.5 0.001 0.025 0.25 4 0.01 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] 0.0625 0.002 32 8 &gt;=64 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 8 32 8 0.005 4 8 0.025 &gt;=64 0.5 0.001 0.025 0.001</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] 0.125 &gt;=64 0.125 0.002 0.01 16 &gt;=64 8 &gt;=64 0.5 0.125 32 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] 4 </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 &lt;mic&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2 32 8 &lt;=1 16 8 4 32 32 8 &lt;=1 16 8 &lt;=1 4 8 &lt;=1 8 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [20] 16 2 4 8 32 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 16 4 8 4 16 8 16 &lt;=1 4 2 4 4 4 2 8 4 &lt;=1 16 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [20] 2 &lt;=1 &lt;=1 4 16 4 </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 &lt;mic&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] &lt;=0.0625 1 0.5 0.125 &lt;=0.0625 0.5 4 0.5 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [9] 4 0.25 2 2 &lt;=0.0625 0.25 0.125 &lt;=0.0625</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [17] 1 1 &gt;=8 2 0.125 4 &lt;=0.0625 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] 1 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.5 0.125 0.25 0.125 0.125 0.125 4 2 0.0625 0.125 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 0.0625 2 0.5 1 1 2 2 4 1 0.125 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] 2 2 1 0.25 0.5 </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 &lt;disk&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 27 46 48 46 45 11 8 45 45 13 31 50 41 43 24 16 32 41 42 42 42 46 41 26 26</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 26 40 17 35 19 24 48 16 44 33 47 16 49 50 37 40 41 22 29 46 47 38 22 49 30</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 &lt;disk&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 12 15 14 15 17 12 14 15 11 11 16 15 16 17 13 16 11 17 14 15 16 15 12 16 17</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 16 13 14 15 14 16 17 16 14 11 16 17 12 14 14 12 11 17 13 12 12 11 14 14 15</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 &lt;disk&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 27 16 15 19 18 15 24 26 25 18 22 17 20 26 19 18 23 26 16 24 19 22 21 20 20</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 23 23 21 23 20 23 18 20 18 27 25 17 16 26 22 20 17 20 19 23 20 24 24 18 25</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -166,7 +166,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">skewness</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Uniform.html" class="external-link">runif</a></span><span class="op">(</span><span class="fl">1000</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.06936305</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.1146407</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.1.9047</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.1.9049</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