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

Built site for AMR: 1.8.2.9023@85e2fbe

This commit is contained in:
github-actions 2022-10-19 09:58:58 +00:00
parent 205bfb053c
commit e2e3fa9184
91 changed files with 598 additions and 596 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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -325,67 +325,67 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2017-10-19</td>
<td align="center">O1</td>
<td align="center">2010-03-04</td>
<td align="center">Q1</td>
<td align="center">Hospital A</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2016-12-24</td>
<td align="center">I6</td>
<td align="center">Hospital B</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2016-04-30</td>
<td align="center">K3</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2014-02-16</td>
<td align="center">W5</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2012-07-09</td>
<td align="center">J8</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2013-10-29</td>
<td align="center">R7</td>
<td align="center">Hospital D</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2015-02-04</td>
<td align="center">F5</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2010-05-11</td>
<td align="center">A2</td>
<td align="center">Hospital D</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2015-09-26</td>
<td align="center">L5</td>
<td align="center">Hospital B</td>
<td align="center">2011-07-03</td>
<td align="center">J2</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">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2012-09-20</td>
<td align="center">N4</td>
<td align="center">Hospital D</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
@ -422,16 +422,16 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</td>
<td align="right">10,418</td>
<td align="right">52.09%</td>
<td align="right">10,418</td>
<td align="right">52.09%</td>
<td align="right">10,463</td>
<td align="right">52.32%</td>
<td align="right">10,463</td>
<td align="right">52.32%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,582</td>
<td align="right">47.91%</td>
<td align="right">9,537</td>
<td align="right">47.69%</td>
<td align="right">20,000</td>
<td align="right">100.00%</td>
</tr>
@ -488,9 +488,9 @@ Longest: 1</p>
<span><span class="co"># Basing inclusion on all antimicrobial results, using a points threshold of</span></span>
<span><span class="co"># 2</span></span>
<span><span class="co"># Including isolates from ICU.</span></span>
<span><span class="co"># =&gt; Found 10,708 'phenotype-based' first isolates (53.5% of total where a</span></span>
<span><span class="co"># =&gt; Found 10,669 'phenotype-based' first isolates (53.3% of total where a</span></span>
<span><span class="co"># microbial ID was available)</span></span></code></pre></div>
<p>So only 53.5% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<p>So only 53.3% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter</a></span><span class="op">(</span><span class="va">first</span> <span class="op">==</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
@ -499,10 +499,10 @@ Longest: 1</p>
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="../reference/first_isolate.html">filter_first_isolate</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="co"># Including isolates from ICU.</span></span></code></pre></div>
<p>So we end up with 10,708 isolates for analysis. Now our data looks like:</p>
<p>So we end up with 10,669 isolates for analysis. Now our data looks like:</p>
<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">data_1st</span><span class="op">)</span></span></code></pre></div>
<table style="width:100%;" class="table">
<table class="table">
<colgroup>
<col width="2%">
<col width="9%">
@ -515,7 +515,7 @@ Longest: 1</p>
<col width="3%">
<col width="6%">
<col width="11%">
<col width="12%">
<col width="11%">
<col width="9%">
<col width="5%">
</colgroup>
@ -538,29 +538,13 @@ Longest: 1</p>
<tbody>
<tr class="odd">
<td align="left">1</td>
<td align="center">2017-10-19</td>
<td align="center">O1</td>
<td align="center">2010-03-04</td>
<td align="center">Q1</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="center">2013-10-29</td>
<td align="center">R7</td>
<td align="center">Hospital D</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
@ -568,26 +552,10 @@ Longest: 1</p>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="center">2015-02-04</td>
<td align="center">F5</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">5</td>
<td align="center">2015-09-26</td>
<td align="center">L5</td>
<td align="left">2</td>
<td align="center">2016-12-24</td>
<td align="center">I6</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
@ -602,9 +570,25 @@ Longest: 1</p>
</tr>
<tr class="odd">
<td align="left">6</td>
<td align="center">2012-09-20</td>
<td align="center">N4</td>
<td align="center">Hospital D</td>
<td align="center">2011-07-03</td>
<td align="center">J2</td>
<td align="center">Hospital C</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">7</td>
<td align="center">2011-05-07</td>
<td align="center">F3</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
@ -616,20 +600,36 @@ Longest: 1</p>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">8</td>
<td align="center">2012-10-23</td>
<td align="center">M3</td>
<td align="center">Hospital A</td>
<td align="center">B_STPHY_AURS</td>
<tr class="odd">
<td align="left">9</td>
<td align="center">2017-04-03</td>
<td align="center">O7</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">Streptococcus</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">10</td>
<td align="center">2012-08-29</td>
<td align="center">O9</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
</tbody>
@ -653,8 +653,8 @@ Longest: 1</p>
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">genus</span>, <span class="va">species</span><span class="op">)</span></span></code></pre></div>
<p><strong>Frequency table</strong></p>
<p>Class: character<br>
Length: 10,708<br>
Available: 10,708 (100.0%, NA: 0 = 0.0%)<br>
Length: 10,669<br>
Available: 10,669 (100.0%, NA: 0 = 0.0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -671,33 +671,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">4,622</td>
<td align="right">43.16%</td>
<td align="right">4,622</td>
<td align="right">43.16%</td>
<td align="right">4,646</td>
<td align="right">43.55%</td>
<td align="right">4,646</td>
<td align="right">43.55%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">2,777</td>
<td align="right">25.93%</td>
<td align="right">7,399</td>
<td align="right">69.10%</td>
<td align="right">2,725</td>
<td align="right">25.54%</td>
<td align="right">7,371</td>
<td align="right">69.09%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">2,130</td>
<td align="right">19.89%</td>
<td align="right">9,529</td>
<td align="right">88.99%</td>
<td align="right">2,140</td>
<td align="right">20.06%</td>
<td align="right">9,511</td>
<td align="right">89.15%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,179</td>
<td align="right">11.01%</td>
<td align="right">10,708</td>
<td align="right">1,158</td>
<td align="right">10.85%</td>
<td align="right">10,669</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -744,8 +744,8 @@ Longest: 24</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2015-09-26</td>
<td align="center">L5</td>
<td align="center">2016-12-24</td>
<td align="center">I6</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
@ -759,44 +759,14 @@ Longest: 24</p>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2011-05-20</td>
<td align="center">U6</td>
<td align="center">Hospital B</td>
<td align="center">2011-07-03</td>
<td align="center">J2</td>
<td align="center">Hospital C</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">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">2014-02-08</td>
<td align="center">Y8</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">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">2017-07-24</td>
<td align="center">L9</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>
@ -804,13 +774,13 @@ Longest: 24</p>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2016-02-06</td>
<td align="center">V4</td>
<td align="center">Hospital D</td>
<td align="center">2017-04-03</td>
<td align="center">O7</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
@ -819,12 +789,42 @@ Longest: 24</p>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2015-12-31</td>
<td align="center">R10</td>
<td align="center">Hospital D</td>
<td align="center">2014-08-04</td>
<td align="center">H1</td>
<td align="center">Hospital C</td>
<td align="center">B_ESCHR_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">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="center">2010-04-30</td>
<td align="center">J8</td>
<td align="center">Hospital D</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">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">2010-07-17</td>
<td align="center">Y3</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
@ -854,50 +854,50 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">AMX</td>
<td align="center">2187</td>
<td align="center">142</td>
<td align="center">2293</td>
<td align="center">4622</td>
<td align="center">2135</td>
<td align="center">140</td>
<td align="center">2371</td>
<td align="center">4646</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">AMC</td>
<td align="center">3411</td>
<td align="center">152</td>
<td align="center">1059</td>
<td align="center">4622</td>
<td align="center">3388</td>
<td align="center">166</td>
<td align="center">1092</td>
<td align="center">4646</td>
</tr>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">CIP</td>
<td align="center">3398</td>
<td align="center">3397</td>
<td align="center">0</td>
<td align="center">1224</td>
<td align="center">4622</td>
<td align="center">1249</td>
<td align="center">4646</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">4049</td>
<td align="center">4031</td>
<td align="center">0</td>
<td align="center">573</td>
<td align="center">4622</td>
<td align="center">615</td>
<td align="center">4646</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">1179</td>
<td align="center">1179</td>
<td align="center">1158</td>
<td align="center">1158</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">AMC</td>
<td align="center">921</td>
<td align="center">44</td>
<td align="center">214</td>
<td align="center">1179</td>
<td align="center">918</td>
<td align="center">42</td>
<td align="center">198</td>
<td align="center">1158</td>
</tr>
</tbody>
</table>
@ -920,34 +920,34 @@ Longest: 24</p>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center">GEN</td>
<td align="center">4049</td>
<td align="center">4031</td>
<td align="center">0</td>
<td align="center">573</td>
<td align="center">4622</td>
<td align="center">615</td>
<td align="center">4646</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center">GEN</td>
<td align="center">1062</td>
<td align="center">1057</td>
<td align="center">0</td>
<td align="center">117</td>
<td align="center">1179</td>
<td align="center">101</td>
<td align="center">1158</td>
</tr>
<tr class="odd">
<td align="center">S. aureus</td>
<td align="center">GEN</td>
<td align="center">2443</td>
<td align="center">2431</td>
<td align="center">0</td>
<td align="center">334</td>
<td align="center">2777</td>
<td align="center">294</td>
<td align="center">2725</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">2130</td>
<td align="center">2130</td>
<td align="center">2140</td>
<td align="center">2140</td>
</tr>
</tbody>
</table>
@ -961,7 +961,7 @@ Longest: 24</p>
<p>As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (<code><a href="../reference/proportion.html">proportion_R()</a></code>, equal to <code><a href="../reference/proportion.html">resistance()</a></code>) and susceptibility as the proportion of S and I (<code><a href="../reference/proportion.html">proportion_SI()</a></code>, equal to <code><a href="../reference/proportion.html">susceptibility()</a></code>). These functions can be used on their own:</p>
<div class="sourceCode" id="cb26"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMX</span><span class="op">)</span></span>
<span><span class="co"># [1] 0.5418379</span></span></code></pre></div>
<span><span class="co"># [1] 0.5476614</span></span></code></pre></div>
<p>Or can be used in conjunction with <code><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb27"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">data_1st</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
@ -975,19 +975,19 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5446373</td>
<td align="center">0.5541245</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5459846</td>
<td align="center">0.5501455</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5303218</td>
<td align="center">0.5269306</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5389393</td>
<td align="center">0.5483716</td>
</tr>
</tbody>
</table>
@ -1008,23 +1008,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5446373</td>
<td align="center">3226</td>
<td align="center">0.5541245</td>
<td align="center">3261</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5459846</td>
<td align="center">3773</td>
<td align="center">0.5501455</td>
<td align="center">3779</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5303218</td>
<td align="center">1616</td>
<td align="center">0.5269306</td>
<td align="center">1541</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5389393</td>
<td align="center">2093</td>
<td align="center">0.5483716</td>
<td align="center">2088</td>
</tr>
</tbody>
</table>
@ -1047,27 +1047,27 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.7708784</td>
<td align="center">0.8760277</td>
<td align="center">0.9757681</td>
<td align="center">0.7649591</td>
<td align="center">0.8676281</td>
<td align="center">0.9750323</td>
</tr>
<tr class="even">
<td align="center">Klebsiella</td>
<td align="center">0.8184902</td>
<td align="center">0.9007634</td>
<td align="center">0.9813401</td>
<td align="center">0.8290155</td>
<td align="center">0.9127807</td>
<td align="center">0.9818653</td>
</tr>
<tr class="odd">
<td align="center">Staphylococcus</td>
<td align="center">0.8030248</td>
<td align="center">0.8797263</td>
<td align="center">0.9773136</td>
<td align="center">0.7893578</td>
<td align="center">0.8921101</td>
<td align="center">0.9809174</td>
</tr>
<tr class="even">
<td align="center">Streptococcus</td>
<td align="center">0.5384977</td>
<td align="center">0.5341121</td>
<td align="center">0.0000000</td>
<td align="center">0.5384977</td>
<td align="center">0.5341121</td>
</tr>
</tbody>
</table>
@ -1092,23 +1092,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="left">Hospital A</td>
<td align="right">54.5%</td>
<td align="right">26.0%</td>
<td align="right">55.4%</td>
<td align="right">27.2%</td>
</tr>
<tr class="even">
<td align="left">Hospital B</td>
<td align="right">54.6%</td>
<td align="right">26.5%</td>
<td align="right">55.0%</td>
<td align="right">26.8%</td>
</tr>
<tr class="odd">
<td align="left">Hospital C</td>
<td align="right">53.0%</td>
<td align="right">26.8%</td>
<td align="right">52.7%</td>
<td align="right">27.3%</td>
</tr>
<tr class="even">
<td align="left">Hospital D</td>
<td align="right">53.9%</td>
<td align="right">25.4%</td>
<td align="right">54.8%</td>
<td align="right">25.9%</td>
</tr>
</tbody>
</table>
@ -1205,17 +1205,17 @@ Longest: 24</p>
<div class="sourceCode" id="cb36"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">mic_values</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/random.html">random_mic</a></span><span class="op">(</span>size <span class="op">=</span> <span class="fl">100</span><span class="op">)</span></span>
<span><span class="va">mic_values</span></span>
<span><span class="co"># Class &lt;mic&gt;</span></span>
<span><span class="co"># [1] 32 0.002 1 0.125 8 16 256 0.25 32 32 </span></span>
<span><span class="co"># [11] 1 0.001 2 2 64 64 1 0.025 128 64 </span></span>
<span><span class="co"># [21] 128 0.001 8 4 0.0625 0.025 32 32 0.005 256 </span></span>
<span><span class="co"># [31] 256 128 0.025 0.002 0.125 4 0.001 0.125 0.001 1 </span></span>
<span><span class="co"># [41] 4 64 0.005 0.0625 0.01 0.01 2 0.002 0.002 16 </span></span>
<span><span class="co"># [51] 256 0.0625 32 8 256 256 0.005 128 0.125 0.001 </span></span>
<span><span class="co"># [61] 0.0625 4 4 0.5 0.01 2 0.125 64 4 16 </span></span>
<span><span class="co"># [71] 16 1 0.025 0.005 0.0625 0.001 0.001 128 2 1 </span></span>
<span><span class="co"># [81] 32 32 0.25 0.5 0.0625 8 64 0.005 0.005 256 </span></span>
<span><span class="co"># [91] 128 0.001 256 256 0.005 0.01 128 8 0.01 2</span></span></code></pre></div>
<span><span class="co"># Class 'mic'</span></span>
<span><span class="co"># [1] 0.01 128 0.005 2 0.002 0.025 128 0.001 4 128 </span></span>
<span><span class="co"># [11] 32 128 0.002 0.025 2 128 8 16 0.002 0.005 </span></span>
<span><span class="co"># [21] 0.005 0.0625 0.0625 2 0.5 0.25 0.001 4 32 &gt;=256 </span></span>
<span><span class="co"># [31] 0.25 &gt;=256 0.125 4 0.001 32 16 0.25 0.025 0.002 </span></span>
<span><span class="co"># [41] 32 128 64 16 0.001 64 0.025 0.125 0.025 &gt;=256 </span></span>
<span><span class="co"># [51] &gt;=256 1 0.0625 32 0.025 16 8 0.025 0.025 &gt;=256 </span></span>
<span><span class="co"># [61] 0.0625 0.01 0.002 0.025 0.002 0.002 0.5 64 0.25 0.5 </span></span>
<span><span class="co"># [71] 64 0.0625 1 0.0625 2 0.0625 0.25 0.25 32 1 </span></span>
<span><span class="co"># [81] 4 0.005 128 0.5 0.001 16 0.25 16 0.5 &gt;=256 </span></span>
<span><span class="co"># [91] 0.002 32 0.005 16 16 128 0.025 0.0625 128 0.001</span></span></code></pre></div>
<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>
@ -1241,11 +1241,11 @@ Longest: 24</p>
<div class="sourceCode" id="cb42"><pre class="downlit sourceCode r">
<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 &lt;disk&gt;</span></span>
<span><span class="co"># [1] 20 18 21 23 29 24 24 23 24 19 22 27 19 23 22 21 29 18 17 25 29 25 31 18 28</span></span>
<span><span class="co"># [26] 19 25 20 17 24 17 20 30 30 29 28 25 22 23 21 27 30 18 24 31 24 29 24 25 28</span></span>
<span><span class="co"># [51] 23 24 23 30 20 26 17 18 29 24 18 30 26 23 30 27 31 24 28 29 17 26 31 21 29</span></span>
<span><span class="co"># [76] 18 20 20 31 31 28 19 24 24 31 19 21 22 26 29 29 22 28 22 19 23 26 22 22 27</span></span></code></pre></div>
<span><span class="co"># Class 'disk'</span></span>
<span><span class="co"># [1] 30 17 29 30 29 30 28 21 28 19 26 17 25 30 18 21 23 29 21 18 17 18 23 27 23</span></span>
<span><span class="co"># [26] 30 29 26 24 29 31 31 24 19 22 26 17 24 25 27 20 29 28 20 28 30 19 31 19 18</span></span>
<span><span class="co"># [51] 23 24 23 25 22 28 29 18 26 20 23 20 23 28 18 22 19 29 30 18 28 22 30 31 18</span></span>
<span><span class="co"># [76] 22 21 29 30 25 30 24 29 21 27 31 24 29 18 21 30 26 20 27 19 20 25 18 24 27</span></span></code></pre></div>
<div class="sourceCode" id="cb43"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># base R:</span></span>
<span><span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">disk_values</span>, mo <span class="op">=</span> <span class="st">"E. coli"</span>, ab <span class="op">=</span> <span class="st">"cipro"</span><span class="op">)</span></span></code></pre></div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -226,7 +226,7 @@
<span><span class="co"># 3. Otherwise: Negative</span></span>
<span><span class="co"># </span></span>
<span><span class="co"># Unmatched rows will return NA.</span></span>
<span><span class="co"># Results will be of class &lt;factor&gt;, with ordered levels: Negative &lt; Elderly Type A &lt; Elderly Type B</span></span></code></pre></div>
<span><span class="co"># Results will be of class 'factor', with ordered levels: Negative &lt; Elderly Type A &lt; Elderly Type B</span></span></code></pre></div>
<p>The outcome of the function can be used for the <code>guideline</code> argument in the <code><a href="../reference/mdro.html">mdro()</a></code> function:</p>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/mdro.html">mdro</a></span><span class="op">(</span><span class="va">example_isolates</span>, guideline <span class="op">=</span> <span class="va">custom</span><span class="op">)</span></span>
@ -314,19 +314,19 @@ Unique: 2</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span></span>
<span><span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span></span>
<span><span class="co"># 1 S I R R I R</span></span>
<span><span class="co"># 2 I S R S R I</span></span>
<span><span class="co"># 3 R I R I R S</span></span>
<span><span class="co"># 4 S R I I R R</span></span>
<span><span class="co"># 5 I I S S S R</span></span>
<span><span class="co"># 6 R R S I I R</span></span>
<span><span class="co"># 1 R S I S I S</span></span>
<span><span class="co"># 2 R R I R R I</span></span>
<span><span class="co"># 3 R I S I I I</span></span>
<span><span class="co"># 4 R R S I S S</span></span>
<span><span class="co"># 5 R R S R I R</span></span>
<span><span class="co"># 6 S S R I S S</span></span>
<span><span class="co"># kanamycin</span></span>
<span><span class="co"># 1 S</span></span>
<span><span class="co"># 1 R</span></span>
<span><span class="co"># 2 S</span></span>
<span><span class="co"># 3 R</span></span>
<span><span class="co"># 4 R</span></span>
<span><span class="co"># 4 I</span></span>
<span><span class="co"># 5 S</span></span>
<span><span class="co"># 6 R</span></span></code></pre></div>
<span><span class="co"># 6 I</span></span></code></pre></div>
<p>We can now add the interpretation of MDR-TB to our data set. You can use:</p>
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/mdro.html">mdro</a></span><span class="op">(</span><span class="va">my_TB_data</span>, guideline <span class="op">=</span> <span class="st">"TB"</span><span class="op">)</span></span></code></pre></div>
@ -357,40 +357,40 @@ Unique: 5</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Mono-resistant</td>
<td align="right">3172</td>
<td align="right">63.44%</td>
<td align="right">3172</td>
<td align="right">63.44%</td>
<td align="right">3161</td>
<td align="right">63.22%</td>
<td align="right">3161</td>
<td align="right">63.22%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Negative</td>
<td align="right">973</td>
<td align="right">19.46%</td>
<td align="right">4145</td>
<td align="right">82.90%</td>
<td align="right">1035</td>
<td align="right">20.70%</td>
<td align="right">4196</td>
<td align="right">83.92%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Multi-drug-resistant</td>
<td align="right">489</td>
<td align="right">9.78%</td>
<td align="right">4634</td>
<td align="right">92.68%</td>
<td align="right">452</td>
<td align="right">9.04%</td>
<td align="right">4648</td>
<td align="right">92.96%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Poly-resistant</td>
<td align="right">247</td>
<td align="right">4.94%</td>
<td align="right">4881</td>
<td align="right">97.62%</td>
<td align="right">241</td>
<td align="right">4.82%</td>
<td align="right">4889</td>
<td align="right">97.78%</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="left">Extensively drug-resistant</td>
<td align="right">119</td>
<td align="right">2.38%</td>
<td align="right">111</td>
<td align="right">2.22%</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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -218,10 +218,10 @@
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># not all values are valid MIC values:</span></span>
<span><span class="fu"><a href="../reference/as.mic.html">as.mic</a></span><span class="op">(</span><span class="fl">0.125</span><span class="op">)</span></span>
<span><span class="co"># Class &lt;mic&gt;</span></span>
<span><span class="co"># Class 'mic'</span></span>
<span><span class="co"># [1] 0.125</span></span>
<span><span class="fu"><a href="../reference/as.mic.html">as.mic</a></span><span class="op">(</span><span class="st">"testvalue"</span><span class="op">)</span></span>
<span><span class="co"># Class &lt;mic&gt;</span></span>
<span><span class="co"># Class 'mic'</span></span>
<span><span class="co"># [1] &lt;NA&gt;</span></span>
<span></span>
<span><span class="co"># the Gram stain is available for all bacteria:</span></span>

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

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<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.9022" id="amr-1829022">AMR 1.8.2.9022<a class="anchor" aria-label="anchor" href="#amr-1829022"></a></h2>
<h2 class="pkg-version" data-toc-text="1.8.2.9023" id="amr-1829023">AMR 1.8.2.9023<a class="anchor" aria-label="anchor" href="#amr-1829023"></a></h2>
<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-9022">Breaking<a class="anchor" aria-label="anchor" href="#breaking-1-8-2-9022"></a></h4>
<h4 id="breaking-1-8-2-9023">Breaking<a class="anchor" aria-label="anchor" href="#breaking-1-8-2-9023"></a></h4>
<ul><li>Removed all species of the taxonomic kingdom Chromista from the package. This was done for multiple reasons:<ul><li>CRAN allows packages to be around 5 MB maximum, some packages are exempted but this package is not one of them</li>
<li>Chromista are not relevant when it comes to antimicrobial resistance, thus lacking the primary scope of this package</li>
<li>Chromista are almost never clinically relevant, thus lacking the secondary scope of this package</li>
@ -140,7 +140,7 @@
<li>The <code><a href="../reference/mo_matching_score.html">mo_matching_score()</a></code> now count deletions and substitutions as 2 instead of 1, which impacts the outcome of <code><a href="../reference/as.mo.html">as.mo()</a></code> and any <code>mo_*()</code> function</li>
</ul></div>
<div class="section level4">
<h4 id="new-1-8-2-9022">New<a class="anchor" aria-label="anchor" href="#new-1-8-2-9022"></a></h4>
<h4 id="new-1-8-2-9023">New<a class="anchor" aria-label="anchor" href="#new-1-8-2-9023"></a></h4>
<ul><li>EUCAST 2022 and CLSI 2022 guidelines have been added for <code><a href="../reference/as.rsi.html">as.rsi()</a></code>. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations.</li>
<li>All new algorithm for <code><a href="../reference/as.mo.html">as.mo()</a></code> (and thus internally all <code>mo_*()</code> functions) while still following our original set-up as described in our paper (DOI 10.18637/jss.v104.i03).<ul><li>A new argument <code>keep_synonyms</code> allows to <em>not</em> correct for updated taxonomy, in favour of the now deleted argument <code>allow_uncertain</code>
</li>
@ -157,7 +157,7 @@
<li>Our data sets are now also continually exported to Apache Feather and Apache Parquet formats. You can find more info <a href="https://msberends.github.io/AMR/articles/datasets.html">in this article on our website</a>.</li>
</ul></div>
<div class="section level4">
<h4 id="changed-1-8-2-9022">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-2-9022"></a></h4>
<h4 id="changed-1-8-2-9023">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-2-9023"></a></h4>
<ul><li>Fix for using <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on certain EUCAST breakpoints for MIC values</li>
<li>Fix for using <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on <code>NA</code> values (e.g. <code>as.rsi(as.disk(NA), ...)</code>)</li>
<li>Removed <code><a href="https://rdrr.io/r/base/integer.html" class="external-link">as.integer()</a></code> for MIC values, since MIC are not integer values and running <code><a href="https://rdrr.io/r/base/table.html" class="external-link">table()</a></code> on MIC values consequently failed for not being able to retrieve the level position (as thats how normally <code><a href="https://rdrr.io/r/base/integer.html" class="external-link">as.integer()</a></code> on <code>factor</code>s work)</li>
@ -183,7 +183,7 @@
<li>Fix for using <code><a href="../reference/as.ab.html">as.ab()</a></code> on <code>NA</code> values</li>
</ul></div>
<div class="section level4">
<h4 id="other-1-8-2-9022">Other<a class="anchor" aria-label="anchor" href="#other-1-8-2-9022"></a></h4>
<h4 id="other-1-8-2-9023">Other<a class="anchor" aria-label="anchor" href="#other-1-8-2-9023"></a></h4>
<ul><li>New website to make use of the new Bootstrap 5 and pkgdown 2.0. The website now contains results for all examples and will be automatically regenerated with every change to our repository, using GitHub Actions</li>
<li>Added Peter Dutey-Magni, Dmytro Mykhailenko and Anton Mymrikov as contributors, to thank them for their valuable input</li>
<li>All R and Rmd files in this project are now styled using the <code>styler</code> package</li>

View File

@ -11,7 +11,7 @@ articles:
datasets: datasets.html
resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html
last_built: 2022-10-19T06:34Z
last_built: 2022-10-19T09:55Z
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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -146,7 +146,7 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
<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"><a href="as.ab.html">as.ab</a></span><span class="op">(</span><span class="st">"meropenem"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;ab&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] MEM</span>
<span class="r-in"><span><span class="fu"><a href="ab_property.html">ab_name</a></span><span class="op">(</span><span class="st">"J01DH02"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Meropenem"</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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -210,13 +210,13 @@
<span class="r-in"><span><span class="co"># straight from a true health care record:</span></span></span>
<span class="r-in"><span><span class="fu">ab_from_text</span><span class="op">(</span><span class="st">"28/03/2020 regular amoxicilliin 500mg po tds"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [[1]]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;ab&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] AMX</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">ab_from_text</span><span class="op">(</span><span class="st">"500 mg amoxi po and 400mg cipro iv"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [[1]]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;ab&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] AMX CIP</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-in"><span><span class="fu">ab_from_text</span><span class="op">(</span><span class="st">"500 mg amoxi po and 400mg cipro iv"</span>, type <span class="op">=</span> <span class="st">"dose"</span><span class="op">)</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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -168,7 +168,7 @@
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/warning.html" class="external-link">suppressWarnings</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> <span class="fu"><a href="as.ab.html">as.ab</a></span><span class="op">(</span><span class="st">"test"</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> Class &lt;ab&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] &lt;NA&gt;</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># now add a custom entry - it will be considered by as.ab() and</span></span></span>
@ -184,7 +184,7 @@
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># "test" is now a new antibiotic:</span></span></span>
<span class="r-in"><span><span class="fu"><a href="as.ab.html">as.ab</a></span><span class="op">(</span><span class="st">"test"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;ab&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TEST</span>
<span class="r-in"><span><span class="fu"><a href="ab_property.html">ab_name</a></span><span class="op">(</span><span class="st">"test"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Test Antibiotic"</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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<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 1978-07-20 44 44.24932 21</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1977-03-21 45 45.58082 22</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1934-08-02 88 88.21370 65</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1988-05-25 34 34.40274 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1932-01-18 90 90.75068 67</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1932-08-21 90 90.16164 67</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1983-03-28 39 39.56164 16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1958-09-07 64 64.11507 41</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1981-06-15 41 41.34521 18</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1956-12-02 65 65.87945 43</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1980-01-01 42 42.79726 20</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1948-08-23 74 74.15616 51</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1973-10-28 48 48.97534 26</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1941-08-03 81 81.21096 58</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1991-05-15 31 31.43014 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1963-06-17 59 59.33973 36</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1972-03-23 50 50.57534 27</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1970-08-17 52 52.17260 29</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1988-10-11 34 34.02192 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1941-10-13 81 81.01644 58</span>
</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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -206,7 +206,7 @@
<dt>only_rsi_columns</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether only columns of class <code>&lt;rsi&gt;</code> must be selected (defaults to <code>FALSE</code>), see <code><a href="as.rsi.html">as.rsi()</a></code></p></dd>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether only columns of class <code>rsi</code> must be selected (defaults to <code>FALSE</code>), see <code><a href="as.rsi.html">as.rsi()</a></code></p></dd>
<dt>only_treatable</dt>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -212,32 +212,32 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># these examples all return "ERY", the ID of erythromycin:</span></span></span>
<span class="r-in"><span><span class="fu">as.ab</span><span class="op">(</span><span class="st">"J01FA01"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;ab&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] ERY</span>
<span class="r-in"><span><span class="fu">as.ab</span><span class="op">(</span><span class="st">"J 01 FA 01"</span><span class="op">)</span></span></span>
<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error:</span> in like(): argument `x` must not be NULL</span>
<span class="r-in"><span><span class="fu">as.ab</span><span class="op">(</span><span class="st">"Erythromycin"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;ab&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] ERY</span>
<span class="r-in"><span><span class="fu">as.ab</span><span class="op">(</span><span class="st">"eryt"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;ab&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] ERY</span>
<span class="r-in"><span><span class="fu">as.ab</span><span class="op">(</span><span class="st">" eryt 123"</span><span class="op">)</span></span></span>
<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error:</span> in like(): argument `x` must not be NULL</span>
<span class="r-in"><span><span class="fu">as.ab</span><span class="op">(</span><span class="st">"ERYT"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;ab&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] ERY</span>
<span class="r-in"><span><span class="fu">as.ab</span><span class="op">(</span><span class="st">"ERY"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;ab&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] ERY</span>
<span class="r-in"><span><span class="fu">as.ab</span><span class="op">(</span><span class="st">"eritromicine"</span><span class="op">)</span> <span class="co"># spelled wrong, yet works</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;ab&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] ERY</span>
<span class="r-in"><span><span class="fu">as.ab</span><span class="op">(</span><span class="st">"Erythrocin"</span><span class="op">)</span> <span class="co"># trade name</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;ab&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] ERY</span>
<span class="r-in"><span><span class="fu">as.ab</span><span class="op">(</span><span class="st">"Romycin"</span><span class="op">)</span> <span class="co"># trade name</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;ab&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'ab'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] ERY</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># spelling from different languages and dyslexia are no problem</span></span></span>
@ -256,33 +256,34 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Erythromycin"</span>
<span class="r-in"><span><span class="fu"><a href="ab_property.html">ab_name</a></span><span class="op">(</span><span class="st">"eryt"</span><span class="op">)</span> <span class="co"># "Erythromycin"</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Erythromycin"</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="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"># you can quickly rename &lt;rsi&gt; columns using dplyr &gt;= 1.0.0:</span></span></span>
<span class="r-in"><span> <span class="co"># you can quickly rename 'rsi' columns using set_ab_names() with dplyr:</span></span></span>
<span class="r-in"><span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/rename.html" class="external-link">rename_with</a></span><span class="op">(</span><span class="va">as.ab</span>, <span class="fu">where</span><span class="op">(</span><span class="va">is.rsi</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-in"><span> <span class="fu"><a href="ab_property.html">set_ab_names</a></span><span class="op">(</span><span class="fu">where</span><span class="op">(</span><span class="va">is.rsi</span><span class="op">)</span>, property <span class="op">=</span> <span class="st">"atc"</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: 2,000 × 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-01-02 A77334 65 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-01-03 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2002-01-16 067927 45 F ICU B_STPHY_EPDR R NA R NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2002-01-17 858515 79 F ICU B_STPHY_EPDR R NA S NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 1,990 more rows, and 36 more variables: AMC &lt;rsi&gt;, AMP &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># TZP &lt;rsi&gt;, CZO &lt;rsi&gt;, FEP &lt;rsi&gt;, CXM &lt;rsi&gt;, FOX &lt;rsi&gt;, CTX &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># CAZ &lt;rsi&gt;, CRO &lt;rsi&gt;, GEN &lt;rsi&gt;, TOB &lt;rsi&gt;, AMK &lt;rsi&gt;, KAN &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># TMP &lt;rsi&gt;, SXT &lt;rsi&gt;, NIT &lt;rsi&gt;, FOS &lt;rsi&gt;, LNZ &lt;rsi&gt;, CIP &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># MFX &lt;rsi&gt;, VAN &lt;rsi&gt;, TEC &lt;rsi&gt;, TCY &lt;rsi&gt;, TGC &lt;rsi&gt;, DOX &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># ERY &lt;rsi&gt;, CLI &lt;rsi&gt;, AZM &lt;rsi&gt;, IPM &lt;rsi&gt;, MEM &lt;rsi&gt;, MTR &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># CHL &lt;rsi&gt;, COL &lt;rsi&gt;, MUP &lt;rsi&gt;, RIF &lt;rsi&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender ward mo J01CE01 J01CF04 J01CF05</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>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2002-01-02 A77334 65 F Clinical B_ESCHR_COLI R NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2002-01-03 A77334 65 F Clinical B_ESCHR_COLI R NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2002-01-16 067927 45 F ICU B_STPHY_EPDR R NA R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2002-01-17 858515 79 F ICU B_STPHY_EPDR R NA S </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 1,990 more rows, and 37 more variables: J01CA04 &lt;rsi&gt;, J01CR02 &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># J01CA01 &lt;rsi&gt;, J01CR05 &lt;rsi&gt;, J01DB04 &lt;rsi&gt;, J01DE01 &lt;rsi&gt;, J01DC02 &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># J01DC01 &lt;rsi&gt;, J01DD01 &lt;rsi&gt;, J01DD02 &lt;rsi&gt;, J01DD04 &lt;rsi&gt;, J01GB03 &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># J01GB01 &lt;rsi&gt;, J01GB06 &lt;rsi&gt;, J01GB04 &lt;rsi&gt;, J01EA01 &lt;rsi&gt;, J01EE01 &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># J01XE01 &lt;rsi&gt;, J01XX01 &lt;rsi&gt;, J01XX08 &lt;rsi&gt;, J01MA02 &lt;rsi&gt;, J01MA14 &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># J01XA01 &lt;rsi&gt;, J01XA02 &lt;rsi&gt;, J01AA07 &lt;rsi&gt;, J01AA12 &lt;rsi&gt;, J01AA02 &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># J01FA01 &lt;rsi&gt;, J01FF01 &lt;rsi&gt;, J01FA10 &lt;rsi&gt;, J01DH51 &lt;rsi&gt;, …</span></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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -165,7 +165,7 @@
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>Interpret disk values as RSI values with <code><a href="as.rsi.html">as.rsi()</a></code>. It supports guidelines from EUCAST and CLSI.</p>
<p><code>NA_disk_</code> is a missing value of the new <code>&lt;disk&gt;</code> class.</p>
<p><code>NA_disk_</code> is a missing value of the new <code>disk</code> class.</p>
</div>
<div class="section level2">
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
@ -210,7 +210,7 @@
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'ampicillin' (AMP, ampicillin)</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;rsi&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'rsi'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] R</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># interpret whole data set, pretend to be all from urinary tract infections:</span></span></span>

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -319,7 +319,7 @@
<span class="r-in"><span> <span class="st">"VRSA"</span>, <span class="co"># Vancomycin Resistant S. aureus</span></span></span>
<span class="r-in"><span> <span class="fl">115329001</span> <span class="co"># SNOMED CT code</span></span></span>
<span class="r-in"><span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;mo&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mo'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [6] B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] B_STPHY_AURS B_STPHY_AURS</span>
@ -331,25 +331,25 @@
<span class="r-in"><span> <span class="st">"Ureaplasmium urealytica"</span>,</span></span>
<span class="r-in"><span> <span class="st">"Ureaplazma urealitycium"</span></span></span>
<span class="r-in"><span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;mo&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mo'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] B_URPLS_URLY B_URPLS_URLY B_URPLS_URLY B_URPLS_URLY</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">as.mo</span><span class="op">(</span><span class="st">"Streptococcus group A"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;mo&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mo'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] B_STRPT_GRPA</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">as.mo</span><span class="op">(</span><span class="st">"S. epidermidis"</span><span class="op">)</span> <span class="co"># will remain species: B_STPHY_EPDR</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;mo&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mo'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] B_STPHY_EPDR</span>
<span class="r-in"><span><span class="fu">as.mo</span><span class="op">(</span><span class="st">"S. epidermidis"</span>, Becker <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span> <span class="co"># will not remain species: B_STPHY_CONS</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;mo&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mo'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] B_STPHY_CONS</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">as.mo</span><span class="op">(</span><span class="st">"S. pyogenes"</span><span class="op">)</span> <span class="co"># will remain species: B_STRPT_PYGN</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;mo&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mo'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] B_STRPT_PYGN</span>
<span class="r-in"><span><span class="fu">as.mo</span><span class="op">(</span><span class="st">"S. pyogenes"</span>, Lancefield <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span> <span class="co"># will not remain species: B_STRPT_GRPA</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;mo&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mo'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] B_STRPT_GRPA</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># All mo_* functions use as.mo() internally too (see ?mo_property):</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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -239,7 +239,7 @@
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>Ordered <a href="https://rdrr.io/r/base/factor.html" class="external-link">factor</a> with new class <code>&lt;rsi&gt;</code></p>
<p>Ordered <a href="https://rdrr.io/r/base/factor.html" class="external-link">factor</a> with new class <code>rsi</code></p>
</div>
@ -290,11 +290,11 @@
<h3 id="other">Other<a class="anchor" aria-label="anchor" href="#other"></a></h3>
<p>The function <code>is.rsi()</code> detects if the input contains class <code>&lt;rsi&gt;</code>. If the input is a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a>, it iterates over all columns and returns a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> vector.</p>
<p>The function <code>is.rsi()</code> detects if the input contains class <code>rsi</code>. If the input is a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a>, it iterates over all columns and returns a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> vector.</p>
<p>The function <code>is.rsi.eligible()</code> returns <code>TRUE</code> when a columns contains at most 5% invalid antimicrobial interpretations (not S and/or I and/or R), and <code>FALSE</code> otherwise. The threshold of 5% can be set with the <code>threshold</code> argument. If the input is a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a>, it iterates over all columns and returns a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> vector.</p>
</div>
<p><code>NA_rsi_</code> is a missing value of the new <code>&lt;rsi&gt;</code> class, analogous to e.g. base <span style="R">R</span>'s <code><a href="https://rdrr.io/r/base/NA.html" class="external-link">NA_character_</a></code>.</p>
<p><code>NA_rsi_</code> is a missing value of the new <code>rsi</code> class, analogous to e.g. base <span style="R">R</span>'s <code><a href="https://rdrr.io/r/base/NA.html" class="external-link">NA_character_</a></code>.</p>
</div>
<div class="section level2">
<h2 id="interpretation-of-r-and-s-i">Interpretation of R and S/I<a class="anchor" aria-label="anchor" href="#interpretation-of-r-and-s-i"></a></h2>
@ -474,7 +474,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<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-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Assigning class &lt;rsi&gt; to already clean column 'ERY' (erythromycin)...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&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>
@ -484,16 +484,16 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 50 × 13</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> datetime index ab_input ab_consid…¹ mo_in…² mo_conside…³ guide…⁴</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dttm&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;ab&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2022-10-19 <span style="color: #949494;">06:34:24</span> 1 ampicillin AMP Strep … B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2022-10-19 <span style="color: #949494;">06:34:24</span> 1 AMP AMP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2022-10-19 <span style="color: #949494;">06:34:24</span> 1 CIP CIP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2022-10-19 <span style="color: #949494;">06:34:24</span> 1 GEN GEN Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2022-10-19 <span style="color: #949494;">06:34:24</span> 1 TOB TOB Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2022-10-19 <span style="color: #949494;">06:34:25</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2022-10-19 <span style="color: #949494;">06:34:25</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2022-10-19 <span style="color: #949494;">06:34:25</span> 2 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2022-10-19 <span style="color: #949494;">06:34:25</span> 3 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2022-10-19 <span style="color: #949494;">06:34:25</span> 4 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2022-10-19 <span style="color: #949494;">09:56:17</span> 1 ampicillin AMP Strep … B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2022-10-19 <span style="color: #949494;">09:56:17</span> 1 AMP AMP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2022-10-19 <span style="color: #949494;">09:56:17</span> 1 CIP CIP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2022-10-19 <span style="color: #949494;">09:56:18</span> 1 GEN GEN Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2022-10-19 <span style="color: #949494;">09:56:18</span> 1 TOB TOB Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2022-10-19 <span style="color: #949494;">09:56:18</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2022-10-19 <span style="color: #949494;">09:56:19</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2022-10-19 <span style="color: #949494;">09:56:19</span> 2 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2022-10-19 <span style="color: #949494;">09:56:19</span> 3 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2022-10-19 <span style="color: #949494;">09:56:19</span> 4 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #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>
@ -509,7 +509,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of '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-out co"><span class="r-pr">#&gt;</span> Class &lt;rsi&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'rsi'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] R</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">as.rsi</span><span class="op">(</span></span></span>
@ -521,7 +521,7 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'ampicillin' (AMP, ampicillin)</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;rsi&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'rsi'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] R</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># \donttest{</span></span></span>
@ -645,10 +645,10 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-in"><span><span class="fu">as.rsi</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"S"</span>, <span class="st">"I"</span>, <span class="st">"R"</span>, <span class="st">"A"</span>, <span class="st">"B"</span>, <span class="st">"C"</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: 3 results in column '24' truncated (50%) that were invalid</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> antimicrobial interpretations: "A", "B" and "C"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;rsi&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'rsi'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] S I R &lt;NA&gt; &lt;NA&gt; &lt;NA&gt;</span>
<span class="r-in"><span><span class="fu">as.rsi</span><span class="op">(</span><span class="st">"&lt;= 0.002; S"</span><span class="op">)</span> <span class="co"># will return "S"</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;rsi&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'rsi'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] S</span>
<span class="r-in"><span><span class="va">rsi_data</span> <span class="op">&lt;-</span> <span class="fu">as.rsi</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"S"</span>, <span class="fl">474</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"I"</span>, <span class="fl">36</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"R"</span>, <span class="fl">370</span><span class="op">)</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">is.rsi</span><span class="op">(</span><span class="va">rsi_data</span><span class="op">)</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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -201,7 +201,7 @@ Leclercq et al. <strong>EUCAST expert rules in antimicrobial susceptibility test
<dt>only_rsi_columns</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether only antibiotic columns must be detected that were transformed to class <code>&lt;rsi&gt;</code> (see <code><a href="as.rsi.html">as.rsi()</a></code>) on beforehand (defaults to <code>FALSE</code>)</p></dd>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether only antibiotic columns must be detected that were transformed to class <code>rsi</code> (see <code><a href="as.rsi.html">as.rsi()</a></code>) on beforehand (defaults to <code>FALSE</code>)</p></dd>
<dt>custom_rules</dt>
@ -299,7 +299,7 @@ Leclercq et al. <strong>EUCAST expert rules in antimicrobial susceptibility test
<span class="r-in"><span><span class="co"># apply EUCAST rules: some results wil be changed</span></span></span>
<span class="r-in"><span><span class="va">b</span> <span class="op">&lt;-</span> <span class="fu">eucast_rules</span><span class="op">(</span><span class="va">a</span><span class="op">)</span></span></span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `eucast_rules()`: not all columns with antimicrobial results are of</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> class &lt;rsi&gt; . Transform them on beforehand, with e.g.:</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> class 'rsi'. Transform them on beforehand, with e.g.:</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> - a %&gt;% as.rsi(CXM:AMX)</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> - a %&gt;% mutate_if(is.rsi.eligible, as.rsi)</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> - a %&gt;% mutate(across(where(is.rsi.eligible), as.rsi))</span>
@ -317,7 +317,7 @@ Leclercq et al. <strong>EUCAST expert rules in antimicrobial susceptibility test
<span class="r-in"><span><span class="co"># containing all details about the transformations:</span></span></span>
<span class="r-in"><span><span class="va">c</span> <span class="op">&lt;-</span> <span class="fu">eucast_rules</span><span class="op">(</span><span class="va">a</span>, verbose <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `eucast_rules()`: not all columns with antimicrobial results are of</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> class &lt;rsi&gt; . Transform them on beforehand, with e.g.:</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> class 'rsi'. Transform them on beforehand, with e.g.:</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> - a %&gt;% as.rsi(CXM:AMX)</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> - a %&gt;% mutate_if(is.rsi.eligible, as.rsi)</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> - a %&gt;% mutate(across(where(is.rsi.eligible), as.rsi))</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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -250,7 +250,7 @@
<dt>include_untested_rsi</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether also rows without antibiotic results are still eligible for becoming a first isolate. Use <code>include_untested_rsi = FALSE</code> to always return <code>FALSE</code> for such rows. This checks the data set for columns of class <code>&lt;rsi&gt;</code> and consequently requires transforming columns with antibiotic results using <code><a href="as.rsi.html">as.rsi()</a></code> first.</p></dd>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether also rows without antibiotic results are still eligible for becoming a first isolate. Use <code>include_untested_rsi = FALSE</code> to always return <code>FALSE</code> for such rows. This checks the data set for columns of class <code>rsi</code> and consequently requires transforming columns with antibiotic results using <code><a href="as.rsi.html">as.rsi()</a></code> first.</p></dd>
<dt>...</dt>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<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,40 +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] 12 46 5 2 47 40 31 10 7 60 59 61 35 33 40 30 52 35 30 36 8 34 15 30 58</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 24 14 22 1 17 6 16 64 28 11 40 47 1 12 59 35 23 54 38 4 66 67 20 25 64</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 41 19 50 30 20 26 54 55 15 1 31 33 53 55 48 54 63 64 41 16 3 21 3 48 45</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 37 10 30 55 24 32 45 45 34 15 27 9 53 9 65 53 60 44 20 54 7 40 39 50 56</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 41 59 25 62 6 56 1 43 24 35 62 19 16 53 48 11 49 2 49 15 66 24 18 26 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 11 9 65 42 63 19 67 58 63 12 58 50 64 5 43 11 53 28 65 39 52 66 23 6 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 23 19 23 15 51 62 61 6 15 67 37 58 31 28 14 42 1 49 57 39 12 57 44 51 13</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 7 29 38 18 6 12 55 28 13 32 29 42 48 1 27 43 39 17 2 8 62 14 18 14 30</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 54 9 4 2 23 7 29 14 21 37 18 58 61 29 16 13 27 63 35 56 9 8 52 60 12</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 14 19 62 16 61 48 34 46 59 48 31 2 5 30 25 9 3 56 53 4 31 32 6 23 49</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 55 57 32 3 64 63 14 4 30 65 61 62 14 58 48 17 11 13 1 52 21 51 61 56 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 21 60 17 49 37 43 42 48 63 21 43 63 1 62 11 58 64 58 49 11 10 21 56 48 63</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 53 20 4 23 6 55 30 42 6 6 39 37 28 8 33 42 39 47 55 7 43 6 43 1 60</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 43 24 56 19 48 32 16 4 38 28 29 14 44 53 39 23 20 51 13 53 3 45 60 20 24</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 35 36 36 29 41 33 10 46 51 1 40 41 17 22 8 26 52 21 27 31 1 52 64 38 64</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 63 53 16 34 8 50 57 12 10 59 64 6 10 15 43 65 25 9 48 9 32 17 15 4 43</span>
<span class="r-in"><span><span class="fu">is_new_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, episode_days <span class="op">=</span> <span class="fl">60</span><span class="op">)</span> <span class="co"># TRUE/FALSE</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] FALSE TRUE TRUE FALSE TRUE FALSE FALSE FALSE TRUE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] TRUE FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [157] FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] TRUE TRUE FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] FALSE FALSE FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] TRUE TRUE FALSE FALSE FALSE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TRUE FALSE TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] FALSE TRUE TRUE TRUE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] FALSE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] TRUE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] FALSE FALSE TRUE TRUE FALSE TRUE TRUE FALSE TRUE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [157] FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] TRUE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-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: 2 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender ward mo PEN OXA FLC AMX </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2002-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;">2</span> 2002-09-23 F35553 51 M ICU B_STPHY_AURS S NA S NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 3 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender ward mo PEN OXA FLC AMX </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2002-07-15 C42193 84 M ICU B_STPHY_HMNS R NA R R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2002-07-28 F54261 69 M Clinical B_STPHY_CONS R NA S NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2002-07-23 F35553 51 M ICU B_STPHY_AURS R NA S R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … 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>
@ -246,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> 6D7113 2005-02-25 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> E4F322 2012-12-21 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 3704D2 2003-03-03 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> F35553 2002-07-23 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 685398 2013-04-16 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 690B42 2011-07-12 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 819096 2009-05-19 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 871360 2004-07-02 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 1B0933 2003-09-28 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 474360 2016-04-29 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> E99D61 2015-04-07 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 394107 2004-01-16 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> F35553 2002-09-23 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> F41248 2002-04-04 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 5B78D5 2007-02-21 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 032343 2003-06-09 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> D43890 2008-11-28 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> F41D7B 2005-01-12 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 94BB11 2006-08-14 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> D82303 2010-12-11 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #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>
@ -267,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 [180]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward date patient new_index new_logical</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> Clinical 2005-02-25 6D7113 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> ICU 2012-12-21 E4F322 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical 2003-03-03 3704D2 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> ICU 2002-07-23 F35553 2 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2013-04-16 685398 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Clinical 2011-07-12 690B42 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Clinical 2009-05-19 819096 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> Clinical 2004-07-02 871360 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> Clinical 2003-09-28 1B0933 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> ICU 2016-04-29 474360 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [182]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward date patient new_index new_logical</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> ICU 2015-04-07 E99D61 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> ICU 2004-01-16 394107 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> ICU 2002-09-23 F35553 2 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical 2002-04-04 F41248 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2007-02-21 5B78D5 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Clinical 2003-06-09 032343 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Outpatient 2008-11-28 D43890 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> ICU 2005-01-12 F41D7B 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> Clinical 2006-08-14 94BB11 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> ICU 2010-12-11 D82303 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … 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>
@ -294,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 112 14 57 76</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 57 12 38 45</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 11 5 8 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 105 14 52 67</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 64 12 38 46</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 13 7 11 12</span>
<span class="r-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>
@ -326,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 [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> 6D7113 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> E4F322 F_CANDD_GLBR ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 3704D2 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> F35553 B_STPHY_AURS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 685398 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 690B42 B_KLBSL_PNMN Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 819096 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 871360 B_STPHY_HMNS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 1B0933 B_STPHY_AURS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 474360 B_MCRCCC ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, mo, ward [188]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient mo ward flag_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> E99D61 B_STPHY_EPDR ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 394107 B_STPHY_CONS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> F35553 B_STPHY_AURS ICU FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> F41248 B_STPHY_AURS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 5B78D5 B_STPHY_AURS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 032343 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> D43890 UNKNOWN Outpatient TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> F41D7B B_STRPT_PNMN ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 94BB11 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> D82303 B_ESCHR_COLI ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … 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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -156,7 +156,7 @@
<dt>only_rsi_columns</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether only antibiotic columns must be detected that were transformed to class <code>&lt;rsi&gt;</code> (see <code><a href="as.rsi.html">as.rsi()</a></code>) on beforehand (defaults to <code>FALSE</code>)</p></dd>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether only antibiotic columns must be detected that were transformed to class <code>rsi</code> (see <code><a href="as.rsi.html">as.rsi()</a></code>) on beforehand (defaults to <code>FALSE</code>)</p></dd>
</dl></div>
<div class="section level2">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -187,7 +187,7 @@
<dt>only_rsi_columns</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether only columns must be included that were transformed to class <code>&lt;rsi&gt;</code> (see <code><a href="as.rsi.html">as.rsi()</a></code>) on beforehand (defaults to <code>FALSE</code>)</p></dd>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether only columns must be included that were transformed to class <code>rsi</code> (see <code><a href="as.rsi.html">as.rsi()</a></code>) on beforehand (defaults to <code>FALSE</code>)</p></dd>
<dt>...</dt>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -167,9 +167,9 @@
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">kurtosis</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fl">10000</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2.930595</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 3.078481</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.03110201</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.07857002</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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -193,7 +193,7 @@
<dt>only_rsi_columns</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether only antibiotic columns must be detected that were transformed to class <code>&lt;rsi&gt;</code> (see <code><a href="as.rsi.html">as.rsi()</a></code>) on beforehand (defaults to <code>FALSE</code>)</p></dd>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether only antibiotic columns must be detected that were transformed to class <code>rsi</code> (see <code><a href="as.rsi.html">as.rsi()</a></code>) on beforehand (defaults to <code>FALSE</code>)</p></dd>
<dt>...</dt>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -194,11 +194,11 @@
<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="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="random.html">random_mic</a></span><span class="op">(</span><span class="fl">10</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">x</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;mic&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] &gt;=8 0.01 0.002 0.25 1 0.5 0.001 &gt;=8 2 4 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 1 &gt;=128 &gt;=128 0.001 4 0.125 0.25 0.01 0.001 2 </span>
<span class="r-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.017806264 -0.962121752 -1.438824265 -0.008716725 0.401892471</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [6] 0.196587873 -1.644128863 1.017806264 0.607197068 0.812501666</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.23800503 1.38104904 1.38104904 -1.38932783 0.56458903 -0.25187098</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.08857897 -0.84688355 -1.38932783 0.40129703</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">y</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> id <span class="op">=</span> <span class="va">LETTERS</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">10</span><span class="op">]</span>,</span></span>
@ -208,38 +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 &lt;=2 0.5 &lt;=1 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B &gt;=64 0.25 &gt;=8 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C &gt;=64 0.25 4 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 16 0.25 &lt;=1 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 32 &gt;=1 &gt;=8 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 16 &gt;=1 &lt;=1 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G &lt;=2 0.5 &lt;=1 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H &lt;=2 &lt;=0.125 2 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I &gt;=64 0.25 &lt;=1 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J &gt;=64 0.25 &lt;=1 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 16 &lt;=0.025 &gt;=4 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 4 0.5 1 &lt;=0.25</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 4 0.0625 1 &lt;=0.25</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D &gt;=32 1 &gt;=4 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 4 0.125 2 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 8 0.0625 &gt;=4 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G 4 0.0625 2 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H &gt;=32 0.0625 1 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I 8 0.25 &lt;=0.25 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J &gt;=32 0.0625 &lt;=0.25 2</span>
<span class="r-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.7016722 0.7163537 0.3902942 -0.6197198 1.1177827 0.0265375</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.1746259 -1.0218701 0.1334600 0.1334600</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.14091001 -0.32396107 -0.78118181 0.85710543 0.08049237 0.41685866</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.07191455 0.18697943 -0.07834229 -0.14512615</span>
<span class="r-in"><span><span class="va">y</span><span class="op">$</span><span class="va">amr_distance</span> <span class="op">&lt;-</span> <span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">y</span>, <span class="fu">where</span><span class="op">(</span><span class="va">is.mic</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent" and</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> "tobr"</span>
<span class="r-in"><span><span class="va">y</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/order.html" class="external-link">order</a></span><span class="op">(</span><span class="va">y</span><span class="op">$</span><span class="va">amr_distance</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H &lt;=2 &lt;=0.125 2 0.5 -1.0218701</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A &lt;=2 0.5 &lt;=1 0.5 -0.7016722</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 16 0.25 &lt;=1 0.5 -0.6197198</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G &lt;=2 0.5 &lt;=1 8 -0.1746259</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 16 &gt;=1 &lt;=1 1 0.0265375</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I &gt;=64 0.25 &lt;=1 8 0.1334600</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J &gt;=64 0.25 &lt;=1 8 0.1334600</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C &gt;=64 0.25 4 4 0.3902942</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B &gt;=64 0.25 &gt;=8 8 0.7163537</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 32 &gt;=1 &gt;=8 8 1.1177827</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 4 0.0625 1 &lt;=0.25 -0.78118181</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 4 0.5 1 &lt;=0.25 -0.32396107</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J &gt;=32 0.0625 &lt;=0.25 2 -0.14512615</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 16 &lt;=0.025 &gt;=4 0.5 -0.14091001</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I 8 0.25 &lt;=0.25 4 -0.07834229</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G 4 0.0625 2 4 -0.07191455</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 4 0.125 2 4 0.08049237</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H &gt;=32 0.0625 1 2 0.18697943</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 8 0.0625 &gt;=4 8 0.41685866</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D &gt;=32 1 &gt;=4 0.5 0.85710543</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="va">y</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
@ -251,17 +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 &gt;=64 0.25 4 4 0.3902942 0.0000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 I &gt;=64 0.25 &lt;=1 8 0.1334600 0.2568343</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 J &gt;=64 0.25 &lt;=1 8 0.1334600 0.2568343</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 B &gt;=64 0.25 &gt;=8 8 0.7163537 0.3260595</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 F 16 &gt;=1 &lt;=1 1 0.0265375 0.3637567</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 G &lt;=2 0.5 &lt;=1 8 -0.1746259 0.5649201</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 E 32 &gt;=1 &gt;=8 8 1.1177827 0.7274885</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 D 16 0.25 &lt;=1 0.5 -0.6197198 1.0100140</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 A &lt;=2 0.5 &lt;=1 0.5 -0.7016722 1.0919664</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 H &lt;=2 &lt;=0.125 2 0.5 -1.0218701 1.4121643</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance check_id_C</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 C 4 0.0625 1 &lt;=0.25 -0.78118181 0.0000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 4 0.5 1 &lt;=0.25 -0.32396107 0.4572207</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 J &gt;=32 0.0625 &lt;=0.25 2 -0.14512615 0.6360557</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 A 16 &lt;=0.025 &gt;=4 0.5 -0.14091001 0.6402718</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 I 8 0.25 &lt;=0.25 4 -0.07834229 0.7028395</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 G 4 0.0625 2 4 -0.07191455 0.7092673</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 E 4 0.125 2 4 0.08049237 0.8616742</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H &gt;=32 0.0625 1 2 0.18697943 0.9681612</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 F 8 0.0625 &gt;=4 8 0.41685866 1.1980405</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 D &gt;=32 1 &gt;=4 0.5 0.85710543 1.6382872</span>
<span class="r-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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -184,7 +184,7 @@
<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"><a href="as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"E. coli"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class &lt;mo&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mo'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] B_ESCHR_COLI</span>
<span class="r-in"><span><span class="fu"><a href="as.mo.html">mo_uncertainties</a></span><span class="op">(</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Matching scores are based on the resemblance between the input and the full</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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -182,7 +182,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
<p>It has now created a file <code>"~/mo_source.rds"</code> with the contents of our Excel file. Only the first column with foreign values and the 'mo' column will be kept when creating the RDS file.</p>
<p>And now we can use it in our functions:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">as.mo</span>(<span class="st">"lab_mo_ecoli"</span>)</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Class &lt;mo&gt;</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Class 'mo'</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] B_ESCHR_COLI</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="fu">mo_genus</span>(<span class="st">"lab_mo_kpneumoniae"</span>)</span>
@ -192,7 +192,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a><span class="fu">as.mo</span>(<span class="fu">c</span>(<span class="st">"Escherichia coli"</span>, <span class="st">"E. coli"</span>, <span class="st">"lab_mo_ecoli"</span>))</span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span><span class="al">NOTE</span><span class="co">: Translation to one microorganism was guessed with uncertainty.</span></span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Use mo_uncertainties() to review it.</span></span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Class &lt;mo&gt;</span></span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Class 'mo'</span></span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] B_ESCHR_COLI B_ESCHR_COLI B_ESCHR_COLI</span></span></code></pre><p></p></div>
<p>If we edit the Excel file by, let's say, adding row 4 like this:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="sc">|</span> A <span class="sc">|</span> B <span class="sc">|</span></span>
@ -207,7 +207,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; </span><span class="al">NOTE</span><span class="co">: Updated mo_source file '/Users/me/mo_source.rds' (0.3 kB) from</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; '/Users/me/Documents/ourcodes.xlsx' (9 kB), columns</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; "Organisation XYZ" and "mo"</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Class &lt;mo&gt;</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Class 'mo'</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] B_ESCHR_COLI</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="fu">mo_genus</span>(<span class="st">"lab_Staph_aureus"</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.9022</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9023</small>
<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: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

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

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

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