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

Built site for AMR: 1.8.2.9035@afdc48d

This commit is contained in:
github-actions 2022-10-29 14:16:17 +00:00
parent 9a91fdfb99
commit f988c3273a
94 changed files with 646 additions and 537 deletions

View File

@ -36,7 +36,7 @@
<a class="navbar-brand me-2" href="https://msberends.github.io/AMR/index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

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

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -395,31 +395,64 @@ data set:</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2017-07-03</td>
<td align="center">M8</td>
<td align="center">2016-06-08</td>
<td align="center">H2</td>
<td align="center">Hospital B</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">R</td>
<td align="center">Staphylococcus aureus</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-26</td>
<td align="center">B10</td>
<td align="center">2017-12-08</td>
<td align="center">T3</td>
<td align="center">Hospital A</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2013-11-26</td>
<td align="center">C9</td>
<td align="center">Hospital B</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2011-09-18</td>
<td align="center">Y5</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2014-08-30</td>
<td align="center">I4</td>
<td align="center">Hospital A</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">S</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2011-11-13</td>
<td align="center">N6</td>
<td align="center">Hospital A</td>
<tr class="even">
<td align="center">2012-11-04</td>
<td align="center">T9</td>
<td align="center">Hospital D</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
@ -427,39 +460,6 @@ data set:</p>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2010-08-24</td>
<td align="center">J7</td>
<td align="center">Hospital C</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2012-03-12</td>
<td align="center">H2</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">I</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2017-06-02</td>
<td align="center">J9</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">M</td>
</tr>
</tbody>
</table>
<p>Now, lets start the cleaning and the analysis!</p>
@ -494,16 +494,16 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</td>
<td align="right">10,313</td>
<td align="right">51.57%</td>
<td align="right">10,313</td>
<td align="right">51.57%</td>
<td align="right">10,377</td>
<td align="right">51.89%</td>
<td align="right">10,377</td>
<td align="right">51.89%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,687</td>
<td align="right">48.44%</td>
<td align="right">9,623</td>
<td align="right">48.12%</td>
<td align="right">20,000</td>
<td align="right">100.00%</td>
</tr>
@ -616,9 +616,9 @@ takes into account the antimicrobial susceptibility test results using
<span><span class="co"># Basing inclusion on all antimicrobial results, using a points threshold of</span></span>
<span><span class="co"># 2</span></span>
<span><span class="co"># Including isolates from ICU.</span></span>
<span><span class="co"># =&gt; Found 10,691 'phenotype-based' first isolates (53.5% of total where a</span></span>
<span><span class="co"># =&gt; Found 10,687 'phenotype-based' first isolates (53.4% of total where a</span></span>
<span><span class="co"># microbial ID was available)</span></span></code></pre></div>
<p>So only 53.5% is suitable for resistance analysis! We can now filter
<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>
<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r">
@ -629,7 +629,7 @@ on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html"
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="../reference/first_isolate.html">filter_first_isolate</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="co"># Including isolates from ICU.</span></span></code></pre></div>
<p>So we end up with 10,691 isolates for analysis. Now our data looks
<p>So we end up with 10,687 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>
@ -646,8 +646,8 @@ like:</p>
<col width="3%">
<col width="6%">
<col width="11%">
<col width="10%">
<col width="9%">
<col width="12%">
<col width="7%">
<col width="5%">
</colgroup>
<thead><tr class="header">
@ -669,41 +669,57 @@ like:</p>
<tbody>
<tr class="odd">
<td align="left">1</td>
<td align="center">2017-07-03</td>
<td align="center">M8</td>
<td align="center">2016-06-08</td>
<td align="center">H2</td>
<td align="center">Hospital B</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="center">R</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Klebsiella</td>
<td align="center">pneumoniae</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="center">2015-10-26</td>
<td align="center">B10</td>
<td align="center">2017-12-08</td>
<td align="center">T3</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="center">2011-11-13</td>
<td align="center">N6</td>
<td align="center">Hospital A</td>
<td align="center">2013-11-26</td>
<td align="center">C9</td>
<td align="center">Hospital B</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">6</td>
<td align="center">2012-11-04</td>
<td align="center">T9</td>
<td align="center">Hospital D</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
@ -715,52 +731,36 @@ like:</p>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">7</td>
<td align="center">2014-07-24</td>
<td align="center">M2</td>
<td align="center">Hospital D</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">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">11</td>
<td align="center">2015-01-28</td>
<td align="center">D3</td>
<td align="center">Hospital B</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="left">8</td>
<td align="center">2011-09-02</td>
<td align="center">U9</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">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Klebsiella</td>
<td align="center">pneumoniae</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">18</td>
<td align="center">2016-05-13</td>
<td align="center">L1</td>
<td align="center">Hospital B</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="left">10</td>
<td align="center">2015-12-26</td>
<td align="center">Q6</td>
<td align="center">Hospital D</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Klebsiella</td>
<td align="center">pneumoniae</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
</tbody>
@ -796,8 +796,8 @@ readable:</p>
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">genus</span>, <span class="va">species</span><span class="op">)</span></span></code></pre></div>
<p><strong>Frequency table</strong></p>
<p>Class: character<br>
Length: 10,691<br>
Available: 10,691 (100%, NA: 0 = 0%)<br>
Length: 10,687<br>
Available: 10,687 (100%, NA: 0 = 0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -822,33 +822,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">4,678</td>
<td align="right">43.76%</td>
<td align="right">4,678</td>
<td align="right">43.76%</td>
<td align="right">4,686</td>
<td align="right">43.85%</td>
<td align="right">4,686</td>
<td align="right">43.85%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">2,713</td>
<td align="right">25.38%</td>
<td align="right">7,391</td>
<td align="right">69.13%</td>
<td align="right">2,764</td>
<td align="right">25.86%</td>
<td align="right">7,450</td>
<td align="right">69.71%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">2,106</td>
<td align="right">19.70%</td>
<td align="right">9,497</td>
<td align="right">88.83%</td>
<td align="right">2,087</td>
<td align="right">19.53%</td>
<td align="right">9,537</td>
<td align="right">89.24%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,194</td>
<td align="right">11.17%</td>
<td align="right">10,691</td>
<td align="right">1,150</td>
<td align="right">10.76%</td>
<td align="right">10,687</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -869,14 +869,14 @@ antibiotic class they are in:</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>
@ -897,26 +897,56 @@ antibiotic class they are in:</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2017-07-03</td>
<td align="center">M8</td>
<td align="center">Hospital B</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="center">R</td>
<td align="center">2017-01-02</td>
<td align="center">H1</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">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="even">
<td align="center">2014-07-24</td>
<td align="center">M2</td>
<td align="center">Hospital D</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">2014-06-28</td>
<td align="center">F2</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<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">2013-11-15</td>
<td align="center">R3</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2016-09-25</td>
<td align="center">A7</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
@ -927,65 +957,35 @@ antibiotic class they are in:</p>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2015-10-21</td>
<td align="center">E5</td>
<td align="center">Hospital C</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2017-07-08</td>
<td align="center">T1</td>
<td align="center">Hospital D</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2016-07-03</td>
<td align="center">I7</td>
<td align="center">Hospital C</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2012-11-08</td>
<td align="center">P10</td>
<td align="center">2017-08-10</td>
<td align="center">D9</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">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>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2010-12-30</td>
<td align="center">J6</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">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>
</table>
<p>If you want to get a quick glance of the number of isolates in
@ -1009,50 +1009,50 @@ different bug/drug combinations, you can use the
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">AMX</td>
<td align="center">2228</td>
<td align="center">114</td>
<td align="center">2336</td>
<td align="center">4678</td>
<td align="center">2208</td>
<td align="center">140</td>
<td align="center">2338</td>
<td align="center">4686</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">AMC</td>
<td align="center">3442</td>
<td align="center">167</td>
<td align="center">1069</td>
<td align="center">4678</td>
<td align="center">3438</td>
<td align="center">171</td>
<td align="center">1077</td>
<td align="center">4686</td>
</tr>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">3424</td>
<td align="center">3403</td>
<td align="center">0</td>
<td align="center">1254</td>
<td align="center">4678</td>
<td align="center">1283</td>
<td align="center">4686</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">4103</td>
<td align="center">4139</td>
<td align="center">0</td>
<td align="center">575</td>
<td align="center">4678</td>
<td align="center">547</td>
<td align="center">4686</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">1194</td>
<td align="center">1194</td>
<td align="center">1150</td>
<td align="center">1150</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">AMC</td>
<td align="center">964</td>
<td align="center">40</td>
<td align="center">190</td>
<td align="center">1194</td>
<td align="center">902</td>
<td align="center">50</td>
<td align="center">198</td>
<td align="center">1150</td>
</tr>
</tbody>
</table>
@ -1075,34 +1075,34 @@ different bug/drug combinations, you can use the
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">4103</td>
<td align="center">4139</td>
<td align="center">0</td>
<td align="center">575</td>
<td align="center">4678</td>
<td align="center">547</td>
<td align="center">4686</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">GEN</td>
<td align="center">1069</td>
<td align="center">1039</td>
<td align="center">0</td>
<td align="center">125</td>
<td align="center">1194</td>
<td align="center">111</td>
<td align="center">1150</td>
</tr>
<tr class="odd">
<td align="center">S. aureus</td>
<td align="center">GEN</td>
<td align="center">2406</td>
<td align="center">2463</td>
<td align="center">0</td>
<td align="center">307</td>
<td align="center">2713</td>
<td align="center">301</td>
<td align="center">2764</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">2106</td>
<td align="center">2106</td>
<td align="center">2087</td>
<td align="center">2087</td>
</tr>
</tbody>
</table>
@ -1134,7 +1134,7 @@ I (<code><a href="../reference/proportion.html">proportion_SI()</a></code>, equa
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.5445702</span></span></code></pre></div>
<span><span class="co"># [1] 0.5448676</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">
@ -1149,19 +1149,19 @@ own:</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5426092</td>
<td align="center">0.5442717</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5458619</td>
<td align="center">0.5377861</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5291508</td>
<td align="center">0.5453991</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5568834</td>
<td align="center">0.5577913</td>
</tr>
</tbody>
</table>
@ -1186,23 +1186,23 @@ all isolates available for every group (i.e. values S, I or R):</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5426092</td>
<td align="center">3227</td>
<td align="center">0.5442717</td>
<td align="center">3151</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5458619</td>
<td align="center">3794</td>
<td align="center">0.5377861</td>
<td align="center">3758</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5291508</td>
<td align="center">1578</td>
<td align="center">0.5453991</td>
<td align="center">1641</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5568834</td>
<td align="center">2092</td>
<td align="center">0.5577913</td>
<td align="center">2137</td>
</tr>
</tbody>
</table>
@ -1227,27 +1227,27 @@ therapies very easily:</p>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.7714835</td>
<td align="center">0.8770842</td>
<td align="center">0.9803335</td>
<td align="center">0.7701665</td>
<td align="center">0.8832693</td>
<td align="center">0.9812207</td>
</tr>
<tr class="even">
<td align="center">Klebsiella</td>
<td align="center">0.8408710</td>
<td align="center">0.8953099</td>
<td align="center">0.9824121</td>
<td align="center">0.8278261</td>
<td align="center">0.9034783</td>
<td align="center">0.9860870</td>
</tr>
<tr class="odd">
<td align="center">Staphylococcus</td>
<td align="center">0.7906377</td>
<td align="center">0.8868411</td>
<td align="center">0.9808330</td>
<td align="center">0.7948625</td>
<td align="center">0.8910999</td>
<td align="center">0.9851664</td>
</tr>
<tr class="even">
<td align="center">Streptococcus</td>
<td align="center">0.5365622</td>
<td align="center">0.5304264</td>
<td align="center">0.0000000</td>
<td align="center">0.5365622</td>
<td align="center">0.5304264</td>
</tr>
</tbody>
</table>
@ -1275,23 +1275,23 @@ classes, use a antibiotic class selector such as
<tbody>
<tr class="odd">
<td align="left">Hospital A</td>
<td align="right">54.3%</td>
<td align="right">27.6%</td>
<td align="right">54.4%</td>
<td align="right">25.9%</td>
</tr>
<tr class="even">
<td align="left">Hospital B</td>
<td align="right">54.6%</td>
<td align="right">25.6%</td>
<td align="right">53.8%</td>
<td align="right">26.2%</td>
</tr>
<tr class="odd">
<td align="left">Hospital C</td>
<td align="right">52.9%</td>
<td align="right">25.8%</td>
<td align="right">54.5%</td>
<td align="right">27.5%</td>
</tr>
<tr class="even">
<td align="left">Hospital D</td>
<td align="right">55.7%</td>
<td align="right">25.6%</td>
<td align="right">55.8%</td>
<td align="right">26.6%</td>
</tr>
</tbody>
</table>
@ -1407,18 +1407,18 @@ classes) <code>&lt;mic&gt;</code> and <code>&lt;disk&gt;</code>:</p>
<code class="sourceCode R"><span><span class="va">mic_values</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/random.html">random_mic</a></span><span class="op">(</span>size <span class="op">=</span> <span class="fl">100</span><span class="op">)</span></span>
<span><span class="va">mic_values</span></span>
<span><span class="co"># Class 'mic'</span></span>
<span><span class="co"># [1] 1 0.0625 0.25 8 32 0.5 128 0.0625 0.025 </span></span>
<span><span class="co"># [10] 1 4 0.125 0.025 0.125 0.125 4 32 4 </span></span>
<span><span class="co"># [19] &lt;=0.001 256 0.0625 0.125 0.01 4 64 0.0625 128 </span></span>
<span><span class="co"># [28] 4 &lt;=0.001 0.002 &lt;=0.001 64 &lt;=0.001 0.25 0.5 32 </span></span>
<span><span class="co"># [37] 0.125 32 &lt;=0.001 16 0.002 0.01 1 2 0.0625 </span></span>
<span><span class="co"># [46] 8 0.125 0.002 128 256 0.0625 32 2 32 </span></span>
<span><span class="co"># [55] 0.25 0.01 0.002 32 4 1 0.01 64 0.125 </span></span>
<span><span class="co"># [64] 0.5 0.005 0.125 0.005 0.0625 0.002 8 2 0.005 </span></span>
<span><span class="co"># [73] 64 0.5 0.125 0.0625 0.0625 128 0.002 0.125 2 </span></span>
<span><span class="co"># [82] 64 0.0625 0.01 4 &lt;=0.001 0.25 &lt;=0.001 8 4 </span></span>
<span><span class="co"># [91] 4 0.005 0.01 4 0.005 2 4 0.025 0.005 </span></span>
<span><span class="co"># [100] 0.5</span></span></code></pre></div>
<span><span class="co"># [1] 128 8 0.5 0.01 4 0.025 0.002 256 &lt;=0.001</span></span>
<span><span class="co"># [10] 0.002 2 4 0.5 32 0.025 0.002 0.5 16 </span></span>
<span><span class="co"># [19] 0.005 0.025 2 4 4 16 256 4 2 </span></span>
<span><span class="co"># [28] 0.002 2 256 0.025 0.01 0.01 0.01 0.125 &lt;=0.001</span></span>
<span><span class="co"># [37] &lt;=0.001 128 32 0.25 2 0.125 32 32 0.002 </span></span>
<span><span class="co"># [46] 0.002 128 0.002 4 64 0.005 1 8 0.01 </span></span>
<span><span class="co"># [55] &lt;=0.001 0.005 0.005 0.25 0.5 0.0625 0.25 0.0625 0.0625 </span></span>
<span><span class="co"># [64] 0.01 0.002 256 0.5 0.25 0.0625 0.025 0.005 16 </span></span>
<span><span class="co"># [73] 32 0.0625 256 128 128 128 2 256 4 </span></span>
<span><span class="co"># [82] 2 0.005 16 0.005 64 1 0.5 8 0.025 </span></span>
<span><span class="co"># [91] 0.005 0.5 64 0.0625 0.025 0.01 32 128 0.002 </span></span>
<span><span class="co"># [100] 128</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>
@ -1452,10 +1452,10 @@ plotting:</p>
<code class="sourceCode R"><span><span class="va">disk_values</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/random.html">random_disk</a></span><span class="op">(</span>size <span class="op">=</span> <span class="fl">100</span>, mo <span class="op">=</span> <span class="st">"E. coli"</span>, ab <span class="op">=</span> <span class="st">"cipro"</span><span class="op">)</span></span>
<span><span class="va">disk_values</span></span>
<span><span class="co"># Class 'disk'</span></span>
<span><span class="co"># [1] 23 23 17 18 17 19 30 21 31 22 21 28 30 25 17 31 22 26 21 27 23 20 26 26 22</span></span>
<span><span class="co"># [26] 18 28 25 17 22 21 19 27 19 20 25 18 31 22 19 28 23 30 27 24 28 23 23 30 30</span></span>
<span><span class="co"># [51] 23 30 24 23 17 19 18 30 22 24 22 19 19 23 20 19 21 18 26 31 20 20 19 21 24</span></span>
<span><span class="co"># [76] 29 30 18 29 23 22 22 28 23 22 30 18 27 28 26 31 31 22 20 31 28 31 23 31 18</span></span></code></pre></div>
<span><span class="co"># [1] 19 31 30 19 20 26 24 22 22 19 18 20 19 23 20 28 23 28 20 20 21 22 18 17 24</span></span>
<span><span class="co"># [26] 18 22 31 23 22 31 28 29 24 22 26 23 19 18 26 30 23 31 17 27 26 17 17 28 26</span></span>
<span><span class="co"># [51] 17 31 23 30 31 23 17 26 17 23 23 28 23 20 30 17 30 18 23 31 25 31 21 28 19</span></span>
<span><span class="co"># [76] 23 26 29 17 23 29 25 18 25 21 25 22 31 28 24 31 28 19 23 22 17 19 25 23 30</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: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

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

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -370,18 +370,18 @@ names or codes, this would have worked exactly the same way:</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span></span>
<span><span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span></span>
<span><span class="co"># 1 R S I R S S</span></span>
<span><span class="co"># 2 R S I I R I</span></span>
<span><span class="co"># 3 R S S R S R</span></span>
<span><span class="co"># 4 R S R S R I</span></span>
<span><span class="co"># 5 R I S R I I</span></span>
<span><span class="co"># 6 S S R S I I</span></span>
<span><span class="co"># 1 I S S R I I</span></span>
<span><span class="co"># 2 S S R R I I</span></span>
<span><span class="co"># 3 I I S I R R</span></span>
<span><span class="co"># 4 S R S S I R</span></span>
<span><span class="co"># 5 R R S R R S</span></span>
<span><span class="co"># 6 R S R I R R</span></span>
<span><span class="co"># kanamycin</span></span>
<span><span class="co"># 1 I</span></span>
<span><span class="co"># 2 I</span></span>
<span><span class="co"># 1 S</span></span>
<span><span class="co"># 2 S</span></span>
<span><span class="co"># 3 I</span></span>
<span><span class="co"># 4 R</span></span>
<span><span class="co"># 5 R</span></span>
<span><span class="co"># 4 S</span></span>
<span><span class="co"># 5 S</span></span>
<span><span class="co"># 6 R</span></span></code></pre></div>
<p>We can now add the interpretation of MDR-TB to our data set. You can
use:</p>
@ -423,40 +423,40 @@ Unique: 5</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Mono-resistant</td>
<td align="right">3211</td>
<td align="right">64.22%</td>
<td align="right">3211</td>
<td align="right">64.22%</td>
<td align="right">3255</td>
<td align="right">65.10%</td>
<td align="right">3255</td>
<td align="right">65.10%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Negative</td>
<td align="right">1025</td>
<td align="right">20.50%</td>
<td align="right">4236</td>
<td align="right">84.72%</td>
<td align="right">989</td>
<td align="right">19.78%</td>
<td align="right">4244</td>
<td align="right">84.88%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Multi-drug-resistant</td>
<td align="right">425</td>
<td align="right">8.50%</td>
<td align="right">4661</td>
<td align="right">93.22%</td>
<td align="right">427</td>
<td align="right">8.54%</td>
<td align="right">4671</td>
<td align="right">93.42%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Poly-resistant</td>
<td align="right">233</td>
<td align="right">4.66%</td>
<td align="right">4894</td>
<td align="right">97.88%</td>
<td align="right">237</td>
<td align="right">4.74%</td>
<td align="right">4908</td>
<td align="right">98.16%</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="left">Extensively drug-resistant</td>
<td align="right">106</td>
<td align="right">2.12%</td>
<td align="right">92</td>
<td align="right">1.84%</td>
<td align="right">5000</td>
<td align="right">100.00%</td>
</tr>

View File

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

View File

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

View File

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

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -191,7 +191,7 @@ column names:<br><em>mo</em>, <em>fullname</em>, <em>status</em>, <em>kingdom</e
<em>gbif_renamed_to</em>, <em>prevalence</em> and <em>snomed</em>.</p>
<p>This data set is in R available as <code>microorganisms</code>, after
you load the <code>AMR</code> package.</p>
<p>It was last updated on 29 October 2022 12:16:58 UTC. Find more info
<p>It was last updated on 29 October 2022 14:10:26 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>
@ -199,7 +199,7 @@ about the structure of this data set <a href="https://msberends.github.io/AMR/re
R Data Structure (RDS) file</a> (1.1 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.txt" class="external-link">tab-separated
text file</a> (0.4 kB)<br>
text file</a> (10.6 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.xlsx" class="external-link">Microsoft
Excel workbook</a> (4.8 MB)<br>
@ -223,6 +223,8 @@ DTA file</a> (43.8 MB)</li>
contain only the first 50 SNOMED codes per record, as their file size
would otherwise exceed 100 MB; the file size limit of GitHub.</strong>
Advice? Use R instead.</p>
<p>The tab-separated text file contains all SNOMED codes as comma
separated values.</p>
<div class="section level3">
<h3 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a>
</h3>
@ -488,7 +490,7 @@ column names:<br><em>ab</em>, <em>cid</em>, <em>name</em>, <em>group</em>, <em>a
<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 29 October 2022 12:16:58 UTC. Find more info
<p>It was last updated on 29 October 2022 14:10:26 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>
@ -682,7 +684,7 @@ column names:<br><em>atc</em>, <em>cid</em>, <em>name</em>, <em>atc_group</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 29 October 2022 12:16:58 UTC. Find more info
<p>It was last updated on 29 October 2022 14:10:26 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>
@ -839,7 +841,7 @@ column names:<br><em>guideline</em>, <em>method</em>, <em>site</em>, <em>mo</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 29 October 2022 12:16:58 UTC. Find more info
<p>It was last updated on 29 October 2022 14:10:26 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>
@ -1012,7 +1014,7 @@ Resistance<a class="anchor" aria-label="anchor" href="#intrinsic_resistant-intri
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 29 October 2022 12:16:58 UTC. Find more info
<p>It was last updated on 29 October 2022 14:10:26 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>
@ -1300,7 +1302,7 @@ column names:<br><em>ab</em>, <em>name</em>, <em>type</em>, <em>dose</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 29 October 2022 12:16:58 UTC. Find more info
<p>It was last updated on 29 October 2022 14:10:26 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>
@ -1450,7 +1452,7 @@ column names:<br><em>date</em>, <em>patient</em>, <em>age</em>, <em>gender</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 29 October 2022 12:16:58 UTC. Find more info
<p>It was last updated on 29 October 2022 14:10:26 UTC. Find more info
about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates.html">here</a>.</p>
<div class="section level3">
<h3 id="source-6">Source<a class="anchor" aria-label="anchor" href="#source-6"></a>
@ -1863,7 +1865,7 @@ column names:<br><em>patient_id</em>, <em>hospital</em>, <em>date</em>,
<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 29 October 2022 12:16:58 UTC. Find more info
<p>It was last updated on 29 October 2022 14:10:26 UTC. Find more info
about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates_unclean.html">here</a>.</p>
<div class="section level3">
<h3 id="source-7">Source<a class="anchor" aria-label="anchor" href="#source-7"></a>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<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,10 +127,10 @@
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="1.8.2.9034" id="amr-1829034">AMR 1.8.2.9034<a class="anchor" aria-label="anchor" href="#amr-1829034"></a></h2>
<h2 class="pkg-version" data-toc-text="1.8.2.9035" id="amr-1829035">AMR 1.8.2.9035<a class="anchor" aria-label="anchor" href="#amr-1829035"></a></h2>
<p>This version will eventually become v2.0! Were happy to reach a new major milestone soon!</p>
<div class="section level4">
<h4 id="breaking-1-8-2-9034">Breaking<a class="anchor" aria-label="anchor" href="#breaking-1-8-2-9034"></a></h4>
<h4 id="breaking-1-8-2-9035">Breaking<a class="anchor" aria-label="anchor" href="#breaking-1-8-2-9035"></a></h4>
<ul><li>Removed all species of the taxonomic kingdom Chromista from the package. This was done for multiple reasons:
<ul><li>CRAN allows packages to be around 5 MB maximum, some packages are exempted but this package is not one of them</li>
<li>Chromista are not relevant when it comes to antimicrobial resistance, thus lacking the primary scope of this package</li>
@ -143,7 +143,7 @@
<li>Removal of interpretation guidelines older than 10 years, the oldest now included guidelines of EUCAST and CLSI are from 2013</li>
</ul></div>
<div class="section level4">
<h4 id="new-1-8-2-9034">New<a class="anchor" aria-label="anchor" href="#new-1-8-2-9034"></a></h4>
<h4 id="new-1-8-2-9035">New<a class="anchor" aria-label="anchor" href="#new-1-8-2-9035"></a></h4>
<ul><li>EUCAST 2022 and CLSI 2022 guidelines have been added for <code><a href="../reference/as.rsi.html">as.rsi()</a></code>. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations.</li>
<li>All new algorithm for <code><a href="../reference/as.mo.html">as.mo()</a></code> (and thus all <code>mo_*()</code> functions) while still following our original set-up as described in our paper (DOI 10.18637/jss.v104.i03).
<ul><li>A new argument <code>keep_synonyms</code> allows to <em>not</em> correct for updated taxonomy, in favour of the now deleted argument <code>allow_uncertain</code>
@ -167,7 +167,7 @@
<li>Support for antimicrobial interpretation of anaerobic bacteria, by adding a placeholder code <code>B_ANAER</code> to the <code>microorganisms</code> data set and add the breakpoints of anaerobics to the <code>rsi_interpretation</code> data set, which is used by <code><a href="../reference/as.rsi.html">as.rsi()</a></code> when interpreting MIC and disk diffusion values</li>
</ul></div>
<div class="section level4">
<h4 id="changed-1-8-2-9034">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-2-9034"></a></h4>
<h4 id="changed-1-8-2-9035">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-2-9035"></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>Fix for using <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on drug-drug combinations with multiple breakpoints for different body sites</li>
@ -197,7 +197,7 @@
<li>Fix for <code><a href="../reference/mo_property.html">mo_shortname()</a></code> in case of higher taxonomic ranks (order, class, phylum)</li>
</ul></div>
<div class="section level4">
<h4 id="other-1-8-2-9034">Other<a class="anchor" aria-label="anchor" href="#other-1-8-2-9034"></a></h4>
<h4 id="other-1-8-2-9035">Other<a class="anchor" aria-label="anchor" href="#other-1-8-2-9035"></a></h4>
<ul><li>New website to make use of the new Bootstrap 5 and pkgdown 2.0. The website now contains results for all examples and will be automatically regenerated with every change to our repository, using GitHub Actions</li>
<li>Added Peter Dutey-Magni, Dmytro Mykhailenko, Anton Mymrikov, and Jonas Salm as contributors, to thank them for their valuable input</li>
<li>All R and Rmd files in this project are now styled using the <code>styler</code> package</li>

View File

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

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 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: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<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 1976-12-09 45 45.88767 23</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1945-05-08 77 77.47671 54</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1997-03-20 25 25.61096 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1981-06-08 41 41.39178 18</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1998-05-27 24 24.42466 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1993-10-10 29 29.05205 6</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1960-09-07 62 62.14247 39</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1948-03-19 74 74.61370 51</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1952-10-19 70 70.02740 47</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1959-07-17 63 63.28493 40</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1980-09-03 42 42.15342 19</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1980-05-29 42 42.41918 19</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1945-03-05 77 77.65205 54</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1934-07-09 88 88.30685 65</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1975-06-07 47 47.39452 24</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1959-02-26 63 63.67123 40</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1998-08-19 24 24.19452 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1993-03-30 29 29.58356 6</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1941-06-18 81 81.36438 58</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1984-07-05 38 38.31781 15</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -476,24 +476,37 @@ 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-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in if (nrow(records_same_mo) &gt; 1 &amp;&amp; length(unique(records_same_mo$site)) &gt; 1 &amp;&amp; uti[i] == FALSE &amp;&amp; all(c(TRUE, FALSE) %in% records_same_mo$uti, na.rm = TRUE) &amp;&amp; message_not_thrown_before("as.rsi", "siteUTI", records_same_mo$mo[1], records_same_mo$ab[1])) { warning_("in `as.rsi()`: breakpoints for UTI ", font_underline("and"), " non-UTI available for ", font_italic(suppressMessages(suppressWarnings(mo_shortname(records_same_mo$mo[1], language = NULL, keep_synonyms = FALSE)))), paste0(" / "), suppressMessages(suppressWarnings(ab_name(records_same_mo$ab[1], language = NULL, tolower = TRUE))), paste0(" - assuming non-UTI. Use argument `uti` to set which isolates are from urine. See ?as.rsi. '"), call = FALSE) get_record &lt;- get_record %pm&gt;% pm_filter(uti == FALSE) rise_warning &lt;- TRUE} else if (nrow(records_same_mo) &gt; 1 &amp;&amp; length(unique(records_same_mo$site)) &gt; 1 &amp;&amp; all(records_same_mo$uti == FALSE, na.rm = TRUE) &amp;&amp; message_not_thrown_before("as.rsi", "site", records_same_mo$mo[1], records_same_mo$ab[1])) { site &lt;- get_record[1L, "site", drop = FALSE] if (is.na(site)) { site &lt;- paste0("an unspecified body site") } else { site &lt;- paste0("body site '", get_record[1L, "site", drop = FALSE], "'") } warning_("in `as.rsi()`: breakpoints available for ", font_italic(suppressMessages(suppressWarnings(mo_shortname(records_same_mo$mo[1], language = NULL, keep_synonyms = FALSE)))), paste0(" / "), suppressMessages(suppressWarnings(ab_name(records_same_mo$ab[1], language = NULL, tolower = TRUE))), paste0(" - assuming ", site), call = FALSE) rise_warning &lt;- TRUE}:</span> missing value where TRUE/FALSE needed</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: breakpoints for UTI and non-UTI available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> Enterobacterales / gentamicin (GEN) - assuming non-UTI. Use argument `uti`</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> 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 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()`: breakpoints for UTI and non-UTI available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> Enterobacterales / tobramycin (TOB) - assuming non-UTI. Use argument `uti`</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> 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; Assigning class 'rsi' 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 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: 48 × 13</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-10-29 <span style="color: #949494;">12:20:46</span> 1 ampicillin AMP Strep … B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2022-10-29 <span style="color: #949494;">12:20:46</span> 1 AMP AMP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2022-10-29 <span style="color: #949494;">12:20:46</span> 1 CIP CIP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2022-10-29 <span style="color: #949494;">12:20:47</span> 1 GEN GEN Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2022-10-29 <span style="color: #949494;">12:20:47</span> 1 TOB TOB Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2022-10-29 <span style="color: #949494;">12:20:48</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2022-10-29 <span style="color: #949494;">12:20:48</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2022-10-29 <span style="color: #949494;">12:20:48</span> 2 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2022-10-29 <span style="color: #949494;">12:20:48</span> 3 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2022-10-29 <span style="color: #949494;">12:20:48</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 38 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: #BCBCBC;"> 1</span> 2022-10-29 <span style="color: #949494;">14:13:20</span> 1 ampicillin AMP Strep … B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2022-10-29 <span style="color: #949494;">14:13:20</span> 1 AMP AMP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2022-10-29 <span style="color: #949494;">14:13:21</span> 1 CIP CIP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2022-10-29 <span style="color: #949494;">14:13:21</span> 1 GEN GEN Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2022-10-29 <span style="color: #949494;">14:13:21</span> 1 TOB TOB Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2022-10-29 <span style="color: #949494;">14:13:22</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2022-10-29 <span style="color: #949494;">14:13:22</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2022-10-29 <span style="color: #949494;">14:13:22</span> 2 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2022-10-29 <span style="color: #949494;">14:13:22</span> 3 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2022-10-29 <span style="color: #949494;">14:13:22</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>
@ -569,9 +582,107 @@ 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-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in mutate(.tbl, !!!funs):</span> Problem while computing `GEN = (function (x, ...) ...`.</span>
<span class="r-err co"><span class="r-pr">#&gt;</span> <span style="font-weight: bold;">Caused by error in `if (...) NULL`:</span></span>
<span class="r-err co"><span class="r-pr">#&gt;</span> <span style="color: #BBBB00;">!</span> missing value where TRUE/FALSE needed</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: breakpoints for UTI and non-UTI available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> Enterobacterales / gentamicin (GEN) - assuming non-UTI. Use argument `uti`</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> 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 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()`: breakpoints for UTI and non-UTI available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> Enterobacterales / tobramycin (TOB) - assuming non-UTI. Use argument `uti`</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> 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>
<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 '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 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()`: breakpoints for UTI and non-UTI available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> Enterobacterales / gentamicin (GEN) - assuming non-UTI. Use argument `uti`</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> 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 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()`: breakpoints for UTI and non-UTI available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> Enterobacterales / tobramycin (TOB) - assuming non-UTI. Use argument `uti`</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> 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>
<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 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()`: breakpoints for UTI and non-UTI available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> Enterobacterales / gentamicin (GEN) - assuming non-UTI. Use argument `uti`</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> 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 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()`: breakpoints for UTI and non-UTI available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> Enterobacterales / tobramycin (TOB) - assuming non-UTI. Use argument `uti`</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> 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) 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-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: breakpoints for UTI and non-UTI available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> Enterobacterales / gentamicin (GEN) - assuming non-UTI. Use argument `uti`</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> 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 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()`: breakpoints for UTI and non-UTI available for</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> Enterobacterales / tobramycin (TOB) - assuming non-UTI. Use argument `uti`</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> 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> Using column 'mo' as input for `col_mo`.</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,</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> thus assuming `uti = TRUE`. 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> Assuming value "urine" in column 'specimen' reflects a urinary tract</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> infection.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Use `as.rsi(uti = FALSE)` to prevent this.</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> =&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,</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> thus assuming `uti = TRUE`. 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) 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-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"># 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.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

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

View File

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

View File

@ -12,7 +12,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

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

View File

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

View File

@ -12,7 +12,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<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,43 +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] 19 20 54 49 35 60 26 3 18 4 43 56 55 48 60 58 47 55 59 3 6 32 27 25 56</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 10 24 9 5 60 57 62 15 1 52 7 23 5 2 46 9 14 46 56 18 38 34 20 44 41</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 21 45 1 16 28 52 2 12 31 48 7 30 3 62 54 44 36 47 14 54 4 29 13 54 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 53 8 3 54 14 48 37 57 16 21 36 6 23 61 45 9 46 38 26 42 27 1 44 9 21</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 10 2 31 54 7 20 61 40 57 35 62 4 1 46 5 8 49 14 37 38 44 52 18 39 54</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 22 25 20 59 57 6 54 44 3 7 50 26 17 38 26 33 33 52 53 7 54 54 48 59 17</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 45 30 43 42 19 41 5 17 15 32 7 20 62 45 14 6 13 10 1 59 28 18 14 34 60</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 54 6 13 23 55 11 19 34 26 51 15 11 22 54 10 22 28 8 26 38 39 28 37 63 56</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 54 11 30 29 30 50 7 45 9 6 24 33 46 62 13 31 11 14 11 56 60 40 56 6 16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 8 61 60 64 40 9 62 60 49 58 55 2 33 3 57 11 22 20 4 56 9 44 13 15 54</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 59 62 41 48 56 20 15 57 24 21 45 4 9 42 45 29 35 60 64 11 11 19 8 37 45</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 63 41 48 49 31 7 58 6 3 43 12 54 59 4 63 1 38 35 36 62 20 5 43 24 60</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 10 47 12 59 57 50 44 59 16 61 51 38 4 18 8 10 64 12 42 37 16 47 1 50 37</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 12 34 8 54 61 22 52 32 28 26 34 53 46 27 48 37 31 40 37 17 61 55 25 25 62</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 27 51 25 18 16 39 9 8 21 33 45 57 26 59 6 10 23 22 64 58 45 16 34 3 62</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 54 20 55 47 9 29 31 23 59 40 58 63 61 18 49 29 34 57 42 53 4 63 28 23 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 FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] TRUE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] TRUE TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE TRUE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [157] TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] TRUE TRUE FALSE TRUE FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] FALSE TRUE TRUE FALSE TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] TRUE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] FALSE FALSE TRUE FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] TRUE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] TRUE TRUE TRUE FALSE TRUE TRUE 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 FALSE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] TRUE TRUE TRUE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] TRUE FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] TRUE FALSE TRUE FALSE FALSE FALSE FALSE TRUE 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 FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] FALSE TRUE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] TRUE TRUE TRUE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># filter on results from the third 60-day episode only, using base R</span></span></span>
<span class="r-in"><span><span class="va">df</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/which.html" class="external-link">which</a></span><span class="op">(</span><span class="fu">get_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, <span class="fl">60</span><span class="op">)</span> <span class="op">==</span> <span class="fl">3</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 5 × 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-11-18 956065 89 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;">2</span> 2002-11-28 705451 56 M Clinical B_STPHY_CONS R NA S NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2002-11-27 496896 47 F ICU B_STPHY_CONS R NA R R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> 2002-10-20 F35553 51 M ICU B_STPHY_AURS S NA S NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">5</span> 2002-10-11 871360 78 M Clinical B_STPHY_EPDR R NA S NA </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-10-11 974319 78 M Outpatie… B_STPHY_EPDR S NA S NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2002-08-19 A49852 70 M Clinical B_ESCHR_COLI R NA NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2002-10-11 871360 78 M Clinical B_STPHY_EPDR 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>
@ -249,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> E59875 2006-03-25 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> C34072 2006-07-05 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 0DBF93 2015-10-12 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2F9056 2014-05-06 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 953526 2010-04-23 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 976997 2017-03-02 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 080086 2007-10-26 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 956065 2002-11-18 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 612575 2006-01-31 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 285137 2002-12-13 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 324415 2015-10-03 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 895298 2004-06-10 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 380628 2009-01-18 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 501361 2008-11-01 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 380628 2009-01-18 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 454595 2014-12-20 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> D63414 2003-09-09 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 545388 2013-07-29 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 288260 2004-02-01 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 328792 2003-05-27 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 190 more rows</span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="va">df</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
@ -270,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 [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> ICU 2006-03-25 E59875 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> Clinical 2006-07-05 C34072 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical 2015-10-12 0DBF93 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> ICU 2014-05-06 2F9056 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> ICU 2010-04-23 953526 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Clinical 2017-03-02 976997 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Clinical 2007-10-26 080086 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> Clinical 2002-11-18 956065 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> Clinical 2006-01-31 612575 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> ICU 2002-12-13 285137 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [181]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward date patient new_index new_logical</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> ICU 2015-10-03 324415 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> ICU 2004-06-10 895298 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical 2009-01-18 380628 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical 2008-11-01 501361 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2009-01-18 380628 1 FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Outpatient 2014-12-20 454595 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Clinical 2003-09-09 D63414 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> Clinical 2013-07-29 545388 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> ICU 2004-02-01 288260 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Clinical 2003-05-27 328792 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>
@ -297,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 115 13 49 69</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 55 12 34 39</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 8 7 8 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 116 15 56 72</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 54 12 35 43</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 11 7 9 9</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>
@ -318,7 +316,7 @@
<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/identical.html" class="external-link">identical</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">y</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> Including isolates from ICU.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] FALSE</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"># but is_new_episode() has a lot more flexibility than first_isolate(),</span></span></span>
@ -329,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> E59875 B_STPHY_EPDR ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> C34072 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 0DBF93 B_STPHY_AURS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2F9056 B_HAFNI_ALVE ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 953526 B_STPHY_CONS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 976997 B_STRPT_PYGN Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 080086 B_STRPT_GRPB Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 956065 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 612575 B_ENTRBC_CLOC Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 285137 B_ESCHR_COLI ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, mo, ward [189]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient mo ward flag_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 324415 B_PROTS_MRBL ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 895298 B_STPHY_CONS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 380628 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 501361 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 380628 B_ESCHR_COLI Clinical FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 454595 B_STPHY_HMNS Outpatient TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> D63414 B_PROTS_MRBL Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 545388 B_KLBSL_PNMN Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 288260 B_STPHY_EPDR ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 328792 B_STRPT_MITS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 190 more rows</span></span>
<span class="r-in"><span><span class="co"># }</span></span></span>
</code></pre></div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -167,9 +167,9 @@
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">kurtosis</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fl">10000</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 3.043313</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2.912495</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.00211217</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.01024742</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>

View File

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

View File

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

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<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,11 +195,10 @@
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="random.html">random_mic</a></span><span class="op">(</span><span class="fl">10</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">x</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 128 0.002 0.125 0.01 128 0.25 0.005 0.25 &lt;=0.001</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 0.5 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 64 0.002 32 8 4 0.0625 16 16 &gt;=128 2 </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] 1.61986500 -1.04034961 -0.04633226 -0.65347059 1.61986500 0.12028746</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.82009031 0.12028746 -1.20696934 0.28690719</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.83591041 -2.21787096 0.63185954 0.22375779 0.01970691 -1.20459833</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.42780866 0.42780866 1.03996128 -0.18434396</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">y</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> id <span class="op">=</span> <span class="va">LETTERS</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">10</span><span class="op">]</span>,</span></span>
@ -209,38 +208,38 @@
<span class="r-in"><span> tobr <span class="op">=</span> <span class="fu"><a href="random.html">random_mic</a></span><span class="op">(</span><span class="fl">10</span>, ab <span class="op">=</span> <span class="st">"tobr"</span>, mo <span class="op">=</span> <span class="st">"Escherichia coli"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">y</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 8 0.125 0.5 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 32 0.25 2 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 16 0.5 0.5 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 32 1 &gt;=4 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 8 0.25 2 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 64 0.0625 1 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G &lt;=4 0.125 1 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H 16 0.125 &gt;=4 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I 16 0.5 0.5 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J 8 &gt;=4 0.25 &lt;=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 8 2 0.5 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 2 0.25 &gt;=8 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 16 &lt;=0.125 4 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 4 0.5 4 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 4 0.25 0.5 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 4 0.25 4 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G 8 4 4 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H 16 2 4 &lt;=0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I 16 &lt;=0.125 2 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J 8 0.5 0.5 4</span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">y</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent",</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.72781282 0.45495874 0.28152212 0.92036634 0.29609879 -0.06040618</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.75419100 0.28709631 -0.23602705 -0.46160524</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.08585104 0.02969570 0.45008891 -0.14447995 -0.77838010 -0.08925698</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.32583189 0.22919702 0.08907477 -0.19762231</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> 7 G &lt;=4 0.125 1 2 -0.75419100</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 8 0.125 0.5 2 -0.72781282</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J 8 &gt;=4 0.25 &lt;=1 -0.46160524</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I 16 0.5 0.5 2 -0.23602705</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 64 0.0625 1 2 -0.06040618</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 16 0.5 0.5 8 0.28152212</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H 16 0.125 &gt;=4 4 0.28709631</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 8 0.25 2 8 0.29609879</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 32 0.25 2 4 0.45495874</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 32 1 &gt;=4 4 0.92036634</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 4 0.25 0.5 2 -0.77838010</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J 8 0.5 0.5 4 -0.19762231</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 4 0.5 4 2 -0.14447995</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 4 0.25 4 4 -0.08925698</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 2 0.25 &gt;=8 8 0.02969570</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 8 2 0.5 4 0.08585104</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I 16 &lt;=0.125 2 4 0.08907477</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H 16 2 4 &lt;=0.5 0.22919702</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G 8 4 4 1 0.32583189</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 16 &lt;=0.125 4 8 0.45008891</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>
@ -252,17 +251,17 @@
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent" and</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> "tobr"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance check_id_C</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 C 16 0.5 0.5 8 0.28152212 0.000000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 H 16 0.125 &gt;=4 4 0.28709631 0.005574198</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 E 8 0.25 2 8 0.29609879 0.014576672</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 B 32 0.25 2 4 0.45495874 0.173436622</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 F 64 0.0625 1 2 -0.06040618 0.341928295</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 I 16 0.5 0.5 2 -0.23602705 0.517549170</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 D 32 1 &gt;=4 4 0.92036634 0.638844222</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 J 8 &gt;=4 0.25 &lt;=1 -0.46160524 0.743127361</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 A 8 0.125 0.5 2 -0.72781282 1.009334941</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 G &lt;=4 0.125 1 2 -0.75419100 1.035713113</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 16 &lt;=0.125 4 8 0.45008891 0.0000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 G 8 4 4 1 0.32583189 0.1242570</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 H 16 2 4 &lt;=0.5 0.22919702 0.2208919</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 I 16 &lt;=0.125 2 4 0.08907477 0.3610141</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 A 8 2 0.5 4 0.08585104 0.3642379</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 B 2 0.25 &gt;=8 8 0.02969570 0.4203932</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 F 4 0.25 4 4 -0.08925698 0.5393459</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 D 4 0.5 4 2 -0.14447995 0.5945689</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 J 8 0.5 0.5 4 -0.19762231 0.6477112</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 E 4 0.25 0.5 2 -0.77838010 1.2284690</span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="co"># support for groups</span></span></span>
<span class="r-in"><span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>

View File

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

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

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

Binary file not shown.

Before

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

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

View File

@ -12,7 +12,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9035</small>
<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.0595199</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.05491494</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>

View File

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