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

Built site for AMR: 2.1.1.9013@f2d245b

This commit is contained in:
github-actions 2024-03-03 22:05:59 +00:00
parent ab367558fe
commit 0b8e89c845
105 changed files with 341 additions and 327 deletions

View File

@ -37,7 +37,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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -39,7 +39,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -205,7 +205,7 @@
website update since they are based on randomly created values and the
page was written in <a href="https://rmarkdown.rstudio.com/" class="external-link">R
Markdown</a>. However, the methodology remains unchanged. This page was
generated on 25 February 2024.</p>
generated on 03 March 2024.</p>
<div class="section level2">
<h2 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a>
</h2>
@ -261,21 +261,21 @@ make the structure of your data generally look like this:</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2024-02-25</td>
<td align="center">2024-03-03</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
</tr>
<tr class="even">
<td align="center">2024-02-25</td>
<td align="center">2024-03-03</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">R</td>
</tr>
<tr class="odd">
<td align="center">2024-02-25</td>
<td align="center">2024-03-03</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

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

View File

@ -39,7 +39,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -402,19 +402,19 @@ names or codes, this would have worked exactly the same way:</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span></span>
<span><span class="co">#&gt; rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span></span>
<span><span class="co">#&gt; 1 S R I I S I</span></span>
<span><span class="co">#&gt; 2 I I S S S S</span></span>
<span><span class="co">#&gt; 3 S I S R I R</span></span>
<span><span class="co">#&gt; 4 S R I S I R</span></span>
<span><span class="co">#&gt; 5 S R R I R S</span></span>
<span><span class="co">#&gt; 6 S R R S S S</span></span>
<span><span class="co">#&gt; 1 I S S S S R</span></span>
<span><span class="co">#&gt; 2 I S R R S S</span></span>
<span><span class="co">#&gt; 3 R I R R S I</span></span>
<span><span class="co">#&gt; 4 R R S S R I</span></span>
<span><span class="co">#&gt; 5 R R I S R I</span></span>
<span><span class="co">#&gt; 6 R R R S R S</span></span>
<span><span class="co">#&gt; kanamycin</span></span>
<span><span class="co">#&gt; 1 R</span></span>
<span><span class="co">#&gt; 2 I</span></span>
<span><span class="co">#&gt; 3 I</span></span>
<span><span class="co">#&gt; 1 S</span></span>
<span><span class="co">#&gt; 2 S</span></span>
<span><span class="co">#&gt; 3 R</span></span>
<span><span class="co">#&gt; 4 I</span></span>
<span><span class="co">#&gt; 5 S</span></span>
<span><span class="co">#&gt; 6 R</span></span></code></pre></div>
<span><span class="co">#&gt; 5 I</span></span>
<span><span class="co">#&gt; 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">
@ -455,40 +455,40 @@ Unique: 5</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Mono-resistant</td>
<td align="right">3255</td>
<td align="right">65.10%</td>
<td align="right">3255</td>
<td align="right">65.10%</td>
<td align="right">3232</td>
<td align="right">64.64%</td>
<td align="right">3232</td>
<td align="right">64.64%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Negative</td>
<td align="right">961</td>
<td align="right">19.22%</td>
<td align="right">4216</td>
<td align="right">84.32%</td>
<td align="right">991</td>
<td align="right">19.82%</td>
<td align="right">4223</td>
<td align="right">84.46%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Multi-drug-resistant</td>
<td align="right">454</td>
<td align="right">9.08%</td>
<td align="right">4670</td>
<td align="right">93.40%</td>
<td align="right">441</td>
<td align="right">8.82%</td>
<td align="right">4664</td>
<td align="right">93.28%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Poly-resistant</td>
<td align="right">245</td>
<td align="right">4.90%</td>
<td align="right">4915</td>
<td align="right">98.30%</td>
<td align="right">246</td>
<td align="right">4.92%</td>
<td align="right">4910</td>
<td align="right">98.20%</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="left">Extensively drug-resistant</td>
<td align="right">85</td>
<td align="right">1.70%</td>
<td align="right">90</td>
<td align="right">1.80%</td>
<td align="right">5000</td>
<td align="right">100.00%</td>
</tr>

View File

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

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

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

View File

@ -39,7 +39,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<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,7 +194,7 @@
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Data sets for download / own use</h1>
<h4 data-toc-skip class="date">25 February 2024</h4>
<h4 data-toc-skip class="date">03 March 2024</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
<div class="d-none name"><code>datasets.Rmd</code></div>

View File

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

View File

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

View File

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

View File

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

View File

@ -29,18 +29,30 @@
# ==================================================================== #
*/
:root {
--bs-primary: #128F76 !important;
--bs-primary-color: #128F76 !important;
--bs-primary-rgb: 18, 143, 118 !important;
--bs-secondary: #a7dbc3 !important;
--bs-secondary-color: #a7dbc3 !important;
--bs-secondary-rgb: 167, 219, 195 !important;
:root, .navbar * {
--bs-primary: #a7dbc3 !important;
--bs-primary-color: #a7dbc3 !important;
--bs-primary-rgb: 167, 219, 195 !important;
--bs-secondary: #ffffff !important;
--bs-secondary-color: #ffffff !important;
--bs-secondary-rgb: 255, 255, 255 !important;
--bs-navbar-brand-color: var(--bs-body-color) !important;
--bs-navbar-brand-color-hover: var(--bs-body-color) !important;
--bs-nav-link-color: var(--bs-body-color) !important;
--bs-bg-opacity: 1 !important;
}
.nav-text.text-muted {
color: var(--bs-success) !important;
}
.template-home img.logo {
width: 200px;
}
@media (max-width: 575.98px) {
.template-home img.logo {
width: 140px;
}
}
/* fix some footer issues with the logos */
@media (min-width: 576px) {
footer .pkgdown-footer-right {

View File

@ -43,7 +43,7 @@
<a class="navbar-brand me-2" href="index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -781,7 +781,7 @@
<p>Manually, using:</p>
<div class="sourceCode" id="cb12"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"remotes"</span><span class="op">)</span> <span class="co"># if you haven't already</span></span>
<span><span class="fu">remotes</span><span class="fu">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html" class="external-link">install_github</a></span><span class="op">(</span><span class="st">"msberends/AMR"</span><span class="op">)</span></span></code></pre></div>
<span><span class="fu">remotes</span><span class="fu">::</span><span class="fu">install_github</span><span class="op">(</span><span class="st">"msberends/AMR"</span><span class="op">)</span></span></code></pre></div>
</li>
<li>
<p>Automatically, using the <a href="https://ropensci.org/r-universe/" class="external-link">rOpenSci R-universe platform</a>, by adding <a href="https://msberends.r-universe.dev" class="external-link">our R-universe address</a> to your list of repositories (repos):</p>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -159,18 +159,18 @@
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="2.1.1.9012" id="amr-2119012">AMR 2.1.1.9012<a class="anchor" aria-label="anchor" href="#amr-2119012"></a></h2>
<h2 class="pkg-version" data-toc-text="2.1.1.9013" id="amr-2119013">AMR 2.1.1.9013<a class="anchor" aria-label="anchor" href="#amr-2119013"></a></h2>
<p><em>(this beta version will eventually become v3.0. Were happy to reach a new major milestone soon, which will be all about the new One Health support!)</em></p>
<div class="section level5">
<h5 id="a-new-milestone-one-health-support--human--veterinary--environmental-2-1-1-9012">A New Milestone: One Health Support (= Human + Veterinary + Environmental)<a class="anchor" aria-label="anchor" href="#a-new-milestone-one-health-support--human--veterinary--environmental-2-1-1-9012"></a></h5>
<h5 id="a-new-milestone-one-health-support--human--veterinary--environmental-2-1-1-9013">A New Milestone: One Health Support (= Human + Veterinary + Environmental)<a class="anchor" aria-label="anchor" href="#a-new-milestone-one-health-support--human--veterinary--environmental-2-1-1-9013"></a></h5>
<p>This package now supports not only tools for AMR data analysis in clinical settings, but also for veterinary and environmental microbiology. This was made possible through a collaboration with the <a href="https://www.upei.ca/avc" class="external-link">University of Prince Edward Island</a>, Canada. To celebrate this great improvement of the package, we also updated the package logo to reflect this change.</p>
</div>
<div class="section level3">
<h3 id="breaking-2-1-1-9012">Breaking<a class="anchor" aria-label="anchor" href="#breaking-2-1-1-9012"></a></h3>
<h3 id="breaking-2-1-1-9013">Breaking<a class="anchor" aria-label="anchor" href="#breaking-2-1-1-9013"></a></h3>
<ul><li>Removed all functions and references that used the deprecated <code>rsi</code> class, which were all replaced with their <code>sir</code> equivalents over a year ago</li>
</ul></div>
<div class="section level3">
<h3 id="new-2-1-1-9012">New<a class="anchor" aria-label="anchor" href="#new-2-1-1-9012"></a></h3>
<h3 id="new-2-1-1-9013">New<a class="anchor" aria-label="anchor" href="#new-2-1-1-9013"></a></h3>
<ul><li>The function group <code>scale_*_mic()</code>, namely: <code><a href="../reference/plot.html">scale_x_mic()</a></code>, <code><a href="../reference/plot.html">scale_y_mic()</a></code>, <code><a href="../reference/plot.html">scale_colour_mic()</a></code> and <code><a href="../reference/plot.html">scale_fill_mic()</a></code>. They are advanced ggplot2 extensions to allow easy plotting of MIC values. They allow for manual range definition and plotting missing intermediate log2 levels.</li>
<li>Function <code><a href="../reference/as.mic.html">limit_mic_range()</a></code>, which allows to limit MIC values to a manually set range. This is the powerhouse behind the <code>scale_*_mic()</code> functions, but it can be used by users directly to e.g. compare equality in MIC distributions by rescaling them to the same range first.</li>
<li>One Health implementation
@ -184,7 +184,7 @@
</ul></li>
</ul></div>
<div class="section level3">
<h3 id="changed-2-1-1-9012">Changed<a class="anchor" aria-label="anchor" href="#changed-2-1-1-9012"></a></h3>
<h3 id="changed-2-1-1-9013">Changed<a class="anchor" aria-label="anchor" href="#changed-2-1-1-9013"></a></h3>
<ul><li>For MICs:
<ul><li>Added as valid levels: 4096, 6 powers of 0.0625, and 5 powers of 192 (192, 384, 576, 768, 960)</li>
<li>Added new argument <code>keep_operators</code> to <code><a href="../reference/as.mic.html">as.mic()</a></code>. This can be <code>"all"</code> (default), <code>"none"</code>, or <code>"edges"</code>. This argument is also available in the new <code><a href="../reference/as.mic.html">limit_mic_range()</a></code> and <code>scale_*_mic()</code> functions.</li>
@ -195,7 +195,7 @@
<li>Updated all antibiotic DDDs from WHOCC</li>
</ul></div>
<div class="section level3">
<h3 id="other-2-1-1-9012">Other<a class="anchor" aria-label="anchor" href="#other-2-1-1-9012"></a></h3>
<h3 id="other-2-1-1-9013">Other<a class="anchor" aria-label="anchor" href="#other-2-1-1-9013"></a></h3>
<ul><li>Added Jordan Stull, Matthew Saab, and Javier Sanchez as contributors, to thank them for their valuable input</li>
</ul></div>
</div>
@ -337,7 +337,7 @@
<h4 id="antibiotic-agents-and-selectors-2-0-0">Antibiotic agents and selectors<a class="anchor" aria-label="anchor" href="#antibiotic-agents-and-selectors-2-0-0"></a></h4>
<p>The new function <code><a href="../reference/add_custom_antimicrobials.html">add_custom_antimicrobials()</a></code> allows users to add custom antimicrobial codes and names to the <code>AMR</code> package.</p>
<p>The <code>antibiotics</code> data set was greatly updated:</p>
<ul><li>The following 20 antibiotics have been added (also includes the <a href="https://www.whocc.no/atc_ddd_index/?code=J01RA&amp;showdescription=no" class="external-link">new J01RA ATC group</a>): azithromycin/fluconazole/secnidazole (AFC), cefepime/amikacin (CFA), cefixime/ornidazole (CEO), ceftriaxone/beta-lactamase inhibitor (CEB), ciprofloxacin/metronidazole (CIM), ciprofloxacin/ornidazole (CIO), ciprofloxacin/tinidazole (CIT), furazidin (FUR), isoniazid/sulfamethoxazole/trimethoprim/pyridoxine (IST), lascufloxacin (LSC), levofloxacin/ornidazole (LEO), nemonoxacin (NEM), norfloxacin/metronidazole (NME), norfloxacin/tinidazole (NTI), ofloxacin/ornidazole (OOR), oteseconazole (OTE), rifampicin/ethambutol/isoniazid (REI), sarecycline (SRC), tetracycline/oleandomycin (TOL), and thioacetazone (TAT)</li>
<ul><li>The following 20 antibiotics have been added (also includes the <a href="https://atcddd.fhi.no/atc_ddd_index/?code=J01RA&amp;showdescription=no" class="external-link">new J01RA ATC group</a>): azithromycin/fluconazole/secnidazole (AFC), cefepime/amikacin (CFA), cefixime/ornidazole (CEO), ceftriaxone/beta-lactamase inhibitor (CEB), ciprofloxacin/metronidazole (CIM), ciprofloxacin/ornidazole (CIO), ciprofloxacin/tinidazole (CIT), furazidin (FUR), isoniazid/sulfamethoxazole/trimethoprim/pyridoxine (IST), lascufloxacin (LSC), levofloxacin/ornidazole (LEO), nemonoxacin (NEM), norfloxacin/metronidazole (NME), norfloxacin/tinidazole (NTI), ofloxacin/ornidazole (OOR), oteseconazole (OTE), rifampicin/ethambutol/isoniazid (REI), sarecycline (SRC), tetracycline/oleandomycin (TOL), and thioacetazone (TAT)</li>
<li>Added some missing ATC codes</li>
<li>Updated DDDs and PubChem Compound IDs</li>
<li>Updated some antibiotic name spelling, now used by WHOCC (such as cephalexin -&gt; cefalexin, and phenethicillin -&gt; pheneticillin)</li>
@ -348,7 +348,7 @@
<div class="section level4">
<h4 id="antiviral-agents-2-0-0">Antiviral agents<a class="anchor" aria-label="anchor" href="#antiviral-agents-2-0-0"></a></h4>
<p>We now added extensive support for antiviral agents! For the first time, the <code>AMR</code> package has extensive support for antiviral drugs and to work with their names, codes and other data in any way.</p>
<ul><li>The <code>antivirals</code> data set has been extended with 18 new drugs (also from the <a href="https://www.whocc.no/atc_ddd_index/?code=J05AJ&amp;showdescription=no" class="external-link">new J05AJ ATC group</a>) and now also contains antiviral identifiers and LOINC codes</li>
<ul><li>The <code>antivirals</code> data set has been extended with 18 new drugs (also from the <a href="https://atcddd.fhi.no/atc_ddd_index/?code=J05AJ&amp;showdescription=no" class="external-link">new J05AJ ATC group</a>) and now also contains antiviral identifiers and LOINC codes</li>
<li>A new data type <code>av</code> (<em>antivirals</em>) has been added, which is functionally similar to <code>ab</code> for antibiotics</li>
<li>Functions <code><a href="../reference/as.av.html">as.av()</a></code>, <code><a href="../reference/av_property.html">av_name()</a></code>, <code><a href="../reference/av_property.html">av_atc()</a></code>, <code><a href="../reference/av_property.html">av_synonyms()</a></code>, <code><a href="../reference/av_from_text.html">av_from_text()</a></code> have all been added as siblings to their <code>ab_*()</code> equivalents</li>
</ul></div>

View File

@ -1,4 +1,4 @@
pandoc: 2.19.2
pandoc: 3.1.11
pkgdown: 2.0.7
pkgdown_sha: ~
articles:
@ -11,7 +11,7 @@ articles:
other_pkg: other_pkg.html
resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html
last_built: 2024-02-25T16:00Z
last_built: 2024-03-03T22:03Z
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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -24,7 +24,7 @@ The AMR package is available in English, Chinese, Czech, Danish, Dutch, Finnish,
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<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: 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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -222,16 +222,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 1965-12-05 58 58.22404 34</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1980-03-01 43 43.98634 19</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1949-11-01 74 74.31694 50</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1947-02-14 77 77.03005 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1940-02-19 84 84.01639 59</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1988-01-10 36 36.12568 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1997-08-27 26 26.49727 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1978-01-26 46 46.08197 21</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1972-06-17 51 51.69126 27</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1986-08-10 37 37.54372 13</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1965-12-05 58 58.24317 34</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1980-03-01 44 44.00546 19</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1949-11-01 74 74.33607 50</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1947-02-14 77 77.04918 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1940-02-19 84 84.03552 59</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1988-01-10 36 36.14481 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1997-08-27 26 26.51639 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1978-01-26 46 46.10109 21</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1972-06-17 51 51.71038 27</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1986-08-10 37 37.56284 13</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<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: 39 KiB

After

Width:  |  Height:  |  Size: 39 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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -315,22 +315,22 @@
<span> <span class="va">.</span><span class="op">$</span><span class="va">condition</span> <span class="op">==</span> <span class="st">"Heart Disease"</span>,</span>
<span> <span class="st">"Study Group"</span>, <span class="st">"Control Group"</span><span class="op">)</span><span class="op">)</span></span></code></pre><p></p></div></li>
</ol><p>Note that for combination antibiograms, it is important to realise that susceptibility can be calculated in two ways, which can be set with the <code>only_all_tested</code> argument (default is <code>FALSE</code>). See this example for two antibiotics, Drug A and Drug B, about how <code>antibiogram()</code> works to calculate the %SI:</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></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="sc">-----------------------</span> <span class="sc">-----------------------</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> Drug A Drug B include as include as include as include as</span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> numerator denominator numerator denominator</span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">----------</span> <span class="sc">-----------</span> <span class="sc">----------</span> <span class="sc">-----------</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> S or I S or I X X X X</span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a> R S or I X X X X</span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> S or I X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a> S or I R X X X X</span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a> R R <span class="sc">-</span> X <span class="sc">-</span> X</span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> R <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a> S or I <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a> R <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="sc">-----------------------</span> <span class="sc">-----------------------</span></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> Drug A Drug B include as include as include as include as</span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a> numerator denominator numerator denominator</span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">----------</span> <span class="sc">-----------</span> <span class="sc">----------</span> <span class="sc">-----------</span></span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> S or I S or I X X X X</span>
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> R S or I X X X X</span>
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> S or I X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> S or I R X X X X</span>
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> R R <span class="sc">-</span> X <span class="sc">-</span> X</span>
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> R <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a> S or I <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-14"><a href="#cb1-14" tabindex="-1"></a> R <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-15"><a href="#cb1-15" tabindex="-1"></a> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-16"><a href="#cb1-16" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span></code></pre><p></p></div>
</div>
</div>

View File

@ -12,7 +12,7 @@ In short, if you have a column name that resembles an antimicrobial drug, it wil
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<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: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -213,33 +213,33 @@
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>To interpret MIC values as SIR values, use <code><a href="as.sir.html">as.sir()</a></code> on MIC values. It supports guidelines from EUCAST (2011-2023) and CLSI (2011-2023).</p>
<p>This class for MIC values is a quite a special data type: formally it is an ordered <a href="https://rdrr.io/r/base/factor.html" class="external-link">factor</a> with valid MIC values as <a href="https://rdrr.io/r/base/factor.html" class="external-link">factor</a> levels (to make sure only valid MIC values are retained), but for any mathematical operation it acts as decimal numbers:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>x <span class="ot">&lt;-</span> <span class="fu">random_mic</span>(<span class="dv">10</span>)</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a>x</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Class 'mic'</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] 16 1 8 8 64 &gt;=128 0.0625 32 32 16</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="fu">is.factor</span>(x)</span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] TRUE</span></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a>x[<span class="dv">1</span>] <span class="sc">*</span> <span class="dv">2</span></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] 32</span></span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a><span class="fu">median</span>(x)</span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] 26</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a>x <span class="ot">&lt;-</span> <span class="fu">random_mic</span>(<span class="dv">10</span>)</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a>x</span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a><span class="co">#&gt; Class 'mic'</span></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a><span class="co">#&gt; [1] 16 1 8 8 64 &gt;=128 0.0625 32 32 16</span></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a></span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="fu">is.factor</span>(x)</span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a><span class="co">#&gt; [1] TRUE</span></span>
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a></span>
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a>x[<span class="dv">1</span>] <span class="sc">*</span> <span class="dv">2</span></span>
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a><span class="co">#&gt; [1] 32</span></span>
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a></span>
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a><span class="fu">median</span>(x)</span>
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a><span class="co">#&gt; [1] 26</span></span></code></pre><p></p></div>
<p>This makes it possible to maintain operators that often come with MIC values, such "&gt;=" and "&lt;=", even when filtering using <a href="https://rdrr.io/r/base/numeric.html" class="external-link">numeric</a> values in data analysis, e.g.:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>x[x <span class="sc">&gt;</span> <span class="dv">4</span>]</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Class 'mic'</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] 16 8 8 64 &gt;=128 32 32 16</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>df <span class="ot">&lt;-</span> <span class="fu">data.frame</span>(x, <span class="at">hospital =</span> <span class="st">"A"</span>)</span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="fu">subset</span>(df, x <span class="sc">&gt;</span> <span class="dv">4</span>) <span class="co"># or with dplyr: df %&gt;% filter(x &gt; 4)</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; x hospital</span></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 1 16 A</span></span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 5 64 A</span></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 6 &gt;=128 A</span></span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 8 32 A</span></span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 9 32 A</span></span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 10 16 A</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a>x[x <span class="sc">&gt;</span> <span class="dv">4</span>]</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a><span class="co">#&gt; Class 'mic'</span></span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a><span class="co">#&gt; [1] 16 8 8 64 &gt;=128 32 32 16</span></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a>df <span class="ot">&lt;-</span> <span class="fu">data.frame</span>(x, <span class="at">hospital =</span> <span class="st">"A"</span>)</span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="fu">subset</span>(df, x <span class="sc">&gt;</span> <span class="dv">4</span>) <span class="co"># or with dplyr: df %&gt;% filter(x &gt; 4)</span></span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a><span class="co">#&gt; x hospital</span></span>
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a><span class="co">#&gt; 1 16 A</span></span>
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a><span class="co">#&gt; 5 64 A</span></span>
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a><span class="co">#&gt; 6 &gt;=128 A</span></span>
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a><span class="co">#&gt; 8 32 A</span></span>
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a><span class="co">#&gt; 9 32 A</span></span>
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a><span class="co">#&gt; 10 16 A</span></span></code></pre><p></p></div>
<p>All so-called <a href="https://rdrr.io/r/base/groupGeneric.html" class="external-link">group generic functions</a> are implemented for the MIC class (such as <code>!</code>, <code>!=</code>, <code>&lt;</code>, <code>&gt;=</code>, <code><a href="https://rdrr.io/r/base/Log.html" class="external-link">exp()</a></code>, <code><a href="https://rdrr.io/r/base/Log.html" class="external-link">log2()</a></code>). Some functions of the <code>stats</code> package are also implemented (such as <code><a href="https://rdrr.io/r/stats/quantile.html" class="external-link">quantile()</a></code>, <code><a href="https://rdrr.io/r/stats/median.html" class="external-link">median()</a></code>, <code><a href="https://rdrr.io/r/stats/fivenum.html" class="external-link">fivenum()</a></code>). Since <code><a href="https://rdrr.io/r/stats/sd.html" class="external-link">sd()</a></code> and <code><a href="https://rdrr.io/r/stats/cor.html" class="external-link">var()</a></code> are non-generic functions, these could not be extended. Use <code><a href="https://rdrr.io/r/stats/mad.html" class="external-link">mad()</a></code> as an alternative, or use e.g. <code>sd(as.numeric(x))</code> where <code>x</code> is your vector of MIC values.</p>
<p>Using <code><a href="https://rdrr.io/r/base/double.html" class="external-link">as.double()</a></code> or <code><a href="https://rdrr.io/r/base/numeric.html" class="external-link">as.numeric()</a></code> on MIC values will remove the operators and return a numeric vector. Do <strong>not</strong> use <code><a href="https://rdrr.io/r/base/integer.html" class="external-link">as.integer()</a></code> on MIC values as by the <span style="R">R</span> convention on <a href="https://rdrr.io/r/base/factor.html" class="external-link">factor</a>s, it will return the index of the factor levels (which is often useless for regular users).</p>
<p>Use <code><a href="https://rdatatable.gitlab.io/data.table/reference/fdroplevels.html" class="external-link">droplevels()</a></code> to drop unused levels. At default, it will return a plain factor. Use <code>droplevels(..., as.mic = TRUE)</code> to maintain the <code>mic</code> class.</p>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -253,18 +253,18 @@
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>A microorganism (MO) code from this package (class: <code>mo</code>) is human readable and typically looks like these examples:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> Code Full name</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="sc">---------------</span> <span class="sc">--------------------------------------</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> B_KLBSL Klebsiella</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> B_KLBSL_PNMN Klebsiella pneumoniae</span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> B_KLBSL_PNMN_RHNS Klebsiella pneumoniae rhinoscleromatis</span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> <span class="sc">|</span> <span class="er">|</span> <span class="er">|</span> <span class="er">|</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> <span class="er">|</span> <span class="er">|</span> <span class="er">|</span> <span class="er">|</span></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a> <span class="er">|</span> <span class="er">|</span> <span class="er">|</span> \<span class="sc">--</span><span class="ot">-&gt;</span> subspecies, a <span class="dv">3-5</span> letter acronym</span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> <span class="sc">|</span> <span class="er">|</span> \<span class="sc">---</span><span class="ot">-&gt;</span> species, a <span class="dv">3-6</span> letter acronym</span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a> <span class="sc">|</span> \<span class="sc">---</span><span class="ot">-&gt;</span> genus, a <span class="dv">4-8</span> letter acronym</span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a> \<span class="sc">---</span><span class="ot">-&gt;</span> taxonomic kingdom<span class="sc">:</span> <span class="fu">A</span> (Archaea), <span class="fu">AN</span> (Animalia), <span class="fu">B</span> (Bacteria),</span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">F</span> (Fungi), <span class="fu">PL</span> (Plantae), <span class="fu">P</span> (Protozoa)</span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> Code Full name</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="sc">---------------</span> <span class="sc">--------------------------------------</span></span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> B_KLBSL Klebsiella</span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> B_KLBSL_PNMN Klebsiella pneumoniae</span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a> B_KLBSL_PNMN_RHNS Klebsiella pneumoniae rhinoscleromatis</span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a> <span class="sc">|</span> <span class="er">|</span> <span class="er">|</span> <span class="er">|</span></span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> <span class="er">|</span> <span class="er">|</span> <span class="er">|</span> <span class="er">|</span></span>
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> <span class="er">|</span> <span class="er">|</span> <span class="er">|</span> \<span class="sc">--</span><span class="ot">-&gt;</span> subspecies, a <span class="dv">3-5</span> letter acronym</span>
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> <span class="sc">|</span> <span class="er">|</span> \<span class="sc">---</span><span class="ot">-&gt;</span> species, a <span class="dv">3-6</span> letter acronym</span>
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> <span class="sc">|</span> \<span class="sc">---</span><span class="ot">-&gt;</span> genus, a <span class="dv">4-8</span> letter acronym</span>
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> \<span class="sc">---</span><span class="ot">-&gt;</span> taxonomic kingdom<span class="sc">:</span> <span class="fu">A</span> (Archaea), <span class="fu">AN</span> (Animalia), <span class="fu">B</span> (Bacteria),</span>
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="fu">F</span> (Fungi), <span class="fu">PL</span> (Plantae), <span class="fu">P</span> (Protozoa)</span></code></pre><p></p></div>
<p>Values that cannot be coerced will be considered 'unknown' and will be returned as the MO code <code>UNKNOWN</code> with a warning.</p>
<p>Use the <code><a href="mo_property.html">mo_*</a></code> functions to get properties based on the returned code, see <em>Examples</em>.</p>
<p>The <code>as.mo()</code> function uses a novel <a href="mo_matching_score.html">matching score algorithm</a> (see <em>Matching Score for Microorganisms</em> below) to match input against the <a href="microorganisms.html">available microbial taxonomy</a> in this package. This will lead to the effect that e.g. <code>"E. coli"</code> (a microorganism highly prevalent in humans) will return the microbial ID of <em>Escherichia coli</em> and not <em>Entamoeba coli</em> (a microorganism less prevalent in humans), although the latter would alphabetically come first.</p>

View File

@ -24,7 +24,7 @@ All breakpoints used for interpretation are publicly available in the clinical_b
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -332,19 +332,19 @@ All breakpoints used for interpretation are publicly available in the clinical_b
<p>The <code>as.sir()</code> function can work in four ways:</p><ol><li><p>For <strong>cleaning raw / untransformed data</strong>. The data will be cleaned to only contain values S, I and R and will try its best to determine this with some intelligence. For example, mixed values with SIR interpretations and MIC values such as <code>"&lt;0.25; S"</code> will be coerced to <code>"S"</code>. Combined interpretations for multiple test methods (as seen in laboratory records) such as <code>"S; S"</code> will be coerced to <code>"S"</code>, but a value like <code>"S; I"</code> will return <code>NA</code> with a warning that the input is unclear.</p></li>
<li><p>For <strong>interpreting minimum inhibitory concentration (MIC) values</strong> according to EUCAST or CLSI. You must clean your MIC values first using <code><a href="as.mic.html">as.mic()</a></code>, that also gives your columns the new data class <code><a href="as.mic.html">mic</a></code>. Also, be sure to have a column with microorganism names or codes. It will be found automatically, but can be set manually using the <code>mo</code> argument.</p><ul><li><p>Using <code>dplyr</code>, SIR interpretation can be done very easily with either:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>your_data <span class="sc">%&gt;%</span> <span class="fu">mutate_if</span>(is.mic, as.sir)</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a>your_data <span class="sc">%&gt;%</span> <span class="fu">mutate</span>(<span class="fu">across</span>(<span class="fu">where</span>(is.mic), as.sir))</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="co"># for veterinary breakpoints, also set `host`:</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a>your_data <span class="sc">%&gt;%</span> <span class="fu">mutate_if</span>(is.mic, as.sir, <span class="at">host =</span> <span class="st">"column_with_animal_hosts"</span>, <span class="at">guideline =</span> <span class="st">"CLSI"</span>)</span></code></pre><p></p></div></li>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a>your_data <span class="sc">%&gt;%</span> <span class="fu">mutate_if</span>(is.mic, as.sir)</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a>your_data <span class="sc">%&gt;%</span> <span class="fu">mutate</span>(<span class="fu">across</span>(<span class="fu">where</span>(is.mic), as.sir))</span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a><span class="co"># for veterinary breakpoints, also set `host`:</span></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a>your_data <span class="sc">%&gt;%</span> <span class="fu">mutate_if</span>(is.mic, as.sir, <span class="at">host =</span> <span class="st">"column_with_animal_hosts"</span>, <span class="at">guideline =</span> <span class="st">"CLSI"</span>)</span></code></pre><p></p></div></li>
<li><p>Operators like "&lt;=" will be stripped before interpretation. When using <code>conserve_capped_values = TRUE</code>, an MIC value of e.g. "&gt;2" will always return "R", even if the breakpoint according to the chosen guideline is "&gt;=4". This is to prevent that capped values from raw laboratory data would not be treated conservatively. The default behaviour (<code>conserve_capped_values = FALSE</code>) considers "&gt;2" to be lower than "&gt;=4" and might in this case return "S" or "I".</p></li>
</ul></li>
<li><p>For <strong>interpreting disk diffusion diameters</strong> according to EUCAST or CLSI. You must clean your disk zones first using <code><a href="as.disk.html">as.disk()</a></code>, that also gives your columns the new data class <code><a href="as.disk.html">disk</a></code>. Also, be sure to have a column with microorganism names or codes. It will be found automatically, but can be set manually using the <code>mo</code> argument.</p><ul><li><p>Using <code>dplyr</code>, SIR interpretation can be done very easily with either:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>your_data <span class="sc">%&gt;%</span> <span class="fu">mutate_if</span>(is.disk, as.sir)</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a>your_data <span class="sc">%&gt;%</span> <span class="fu">mutate</span>(<span class="fu">across</span>(<span class="fu">where</span>(is.disk), as.sir))</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="co"># for veterinary breakpoints, also set `host`:</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a>your_data <span class="sc">%&gt;%</span> <span class="fu">mutate_if</span>(is.disk, as.sir, <span class="at">host =</span> <span class="st">"column_with_animal_hosts"</span>, <span class="at">guideline =</span> <span class="st">"CLSI"</span>)</span></code></pre><p></p></div></li>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a>your_data <span class="sc">%&gt;%</span> <span class="fu">mutate_if</span>(is.disk, as.sir)</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a>your_data <span class="sc">%&gt;%</span> <span class="fu">mutate</span>(<span class="fu">across</span>(<span class="fu">where</span>(is.disk), as.sir))</span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a><span class="co"># for veterinary breakpoints, also set `host`:</span></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a>your_data <span class="sc">%&gt;%</span> <span class="fu">mutate_if</span>(is.disk, as.sir, <span class="at">host =</span> <span class="st">"column_with_animal_hosts"</span>, <span class="at">guideline =</span> <span class="st">"CLSI"</span>)</span></code></pre><p></p></div></li>
</ul></li>
<li><p>For <strong>interpreting a complete data set</strong>, with automatic determination of MIC values, disk diffusion diameters, microorganism names or codes, and antimicrobial test results. This is done very simply by running <code>as.sir(your_data)</code>.</p></li>
</ol><p><strong>For points 2, 3 and 4: Use <code>sir_interpretation_history()</code></strong> to retrieve a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> (or <a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a> if the <code>tibble</code> package is installed) with all results of the last <code>as.sir()</code> call.</p>
@ -357,14 +357,14 @@ All breakpoints used for interpretation are publicly available in the clinical_b
<p>For interpreting MIC values as well as disk diffusion diameters, currently implemented guidelines are for <strong>clinical microbiology</strong>: EUCAST 2011-2023 and CLSI 2011-2023, and for <strong>veterinary microbiology</strong>: EUCAST 2021-2023 and CLSI 2019-2023.</p>
<p>Thus, the <code>guideline</code> argument must be set to e.g., <code>"EUCAST 2023"</code> or <code>"CLSI 2023"</code>. By simply using <code>"EUCAST"</code> (the default) or <code>"CLSI"</code> as input, the latest included version of that guideline will automatically be selected. You can set your own data set using the <code>reference_data</code> argument. The <code>guideline</code> argument will then be ignored.</p>
<p>You can set the default guideline with the <a href="AMR-options.html">package option</a> <code><a href="AMR-options.html">AMR_guideline</a></code> (e.g. in your <code>.Rprofile</code> file), such as:</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">options</span>(<span class="at">AMR_guideline =</span> <span class="st">"CLSI"</span>)</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">options</span>(<span class="at">AMR_guideline =</span> <span class="st">"CLSI 2018"</span>)</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">options</span>(<span class="at">AMR_guideline =</span> <span class="st">"EUCAST 2020"</span>)</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> <span class="co"># or to reset:</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">options</span>(<span class="at">AMR_guideline =</span> <span class="cn">NULL</span>)</span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="fu">options</span>(<span class="at">AMR_guideline =</span> <span class="st">"CLSI"</span>)</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="fu">options</span>(<span class="at">AMR_guideline =</span> <span class="st">"CLSI 2018"</span>)</span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="fu">options</span>(<span class="at">AMR_guideline =</span> <span class="st">"EUCAST 2020"</span>)</span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> <span class="co"># or to reset:</span></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a> <span class="fu">options</span>(<span class="at">AMR_guideline =</span> <span class="cn">NULL</span>)</span></code></pre><p></p></div>
<p>For veterinary guidelines, these might be the best options:</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">options</span>(<span class="at">AMR_guideline =</span> <span class="st">"CLSI"</span>)</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">options</span>(<span class="at">AMR_breakpoint_type =</span> <span class="st">"animal"</span>)</span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="fu">options</span>(<span class="at">AMR_guideline =</span> <span class="st">"CLSI"</span>)</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="fu">options</span>(<span class="at">AMR_breakpoint_type =</span> <span class="st">"animal"</span>)</span></code></pre><p></p></div>
</div>
<div class="section">
@ -592,19 +592,19 @@ A microorganism is categorised as "Resistant" when there is a high likelihood of
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 13 × 14</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> datetime index ab_user mo_user ab mo input</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;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;ab&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2024-02-25 <span style="color: #949494;">16:00:49</span> 1 TOB Escherich… TOB B_[ORD]_ENTRBCTR 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2024-02-25 <span style="color: #949494;">16:00:49</span> 1 GEN Escherich… GEN B_[ORD]_ENTRBCTR 18 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2024-02-25 <span style="color: #949494;">16:00:48</span> 1 CIP Escherich… CIP B_[ORD]_ENTRBCTR 0.256</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2024-02-25 <span style="color: #949494;">16:00:48</span> 1 AMP Escherich… AMP B_[ORD]_ENTRBCTR 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2024-02-25 <span style="color: #949494;">16:00:44</span> 1 AMX B_STRPT_P… AMX B_STRPT_PNMN 0.01 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2024-02-25 <span style="color: #949494;">16:00:44</span> 2 AMX B_STRPT_P… AMX B_STRPT_PNMN 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2024-02-25 <span style="color: #949494;">16:00:44</span> 3 AMX B_STRPT_P… AMX B_STRPT_PNMN 4 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2024-02-25 <span style="color: #949494;">16:00:44</span> 4 AMX B_STRPT_P… AMX B_STRPT_PNMN 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2024-02-25 <span style="color: #949494;">16:00:44</span> 1 AMX B_STRPT_P… AMX B_STRPT_PNMN 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2024-02-25 <span style="color: #949494;">16:00:44</span> 1 TOB Escherich… TOB B_[ORD]_ENTRBCTR 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">11</span> 2024-02-25 <span style="color: #949494;">16:00:44</span> 1 GEN Escherich… GEN B_[ORD]_ENTRBCTR 18 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">12</span> 2024-02-25 <span style="color: #949494;">16:00:44</span> 1 AMP Escherich… AMP B_[ORD]_ENTRBCTR 20 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">13</span> 2024-02-25 <span style="color: #949494;">16:00:43</span> 1 ampicillin Strep pneu AMP B_STRPT_PNMN 18 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2024-03-03 <span style="color: #949494;">22:03:54</span> 1 TOB Escherich… TOB B_[ORD]_ENTRBCTR 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2024-03-03 <span style="color: #949494;">22:03:54</span> 1 GEN Escherich… GEN B_[ORD]_ENTRBCTR 18 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2024-03-03 <span style="color: #949494;">22:03:54</span> 1 CIP Escherich… CIP B_[ORD]_ENTRBCTR 0.256</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2024-03-03 <span style="color: #949494;">22:03:54</span> 1 AMP Escherich… AMP B_[ORD]_ENTRBCTR 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2024-03-03 <span style="color: #949494;">22:03:49</span> 1 AMX B_STRPT_P… AMX B_STRPT_PNMN 0.01 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2024-03-03 <span style="color: #949494;">22:03:49</span> 2 AMX B_STRPT_P… AMX B_STRPT_PNMN 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2024-03-03 <span style="color: #949494;">22:03:49</span> 3 AMX B_STRPT_P… AMX B_STRPT_PNMN 4 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2024-03-03 <span style="color: #949494;">22:03:49</span> 4 AMX B_STRPT_P… AMX B_STRPT_PNMN 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2024-03-03 <span style="color: #949494;">22:03:49</span> 1 AMX B_STRPT_P… AMX B_STRPT_PNMN 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2024-03-03 <span style="color: #949494;">22:03:49</span> 1 TOB Escherich… TOB B_[ORD]_ENTRBCTR 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">11</span> 2024-03-03 <span style="color: #949494;">22:03:49</span> 1 GEN Escherich… GEN B_[ORD]_ENTRBCTR 18 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">12</span> 2024-03-03 <span style="color: #949494;">22:03:49</span> 1 AMP Escherich… AMP B_[ORD]_ENTRBCTR 20 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">13</span> 2024-03-03 <span style="color: #949494;">22:03:48</span> 1 ampicillin Strep pneu AMP B_STRPT_PNMN 18 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 7 more variables: outcome &lt;sir&gt;, method &lt;chr&gt;, breakpoint_S_R &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># guideline &lt;chr&gt;, host &lt;chr&gt;, ref_table &lt;chr&gt;, uti &lt;lgl&gt;</span></span>
<span class="r-in"><span></span></span>

View File

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

View File

@ -16,7 +16,7 @@ Use as.sir() to transform MICs or disks measurements to SIR values."><meta prope
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -253,28 +253,28 @@ A microorganism is categorised as "Resistant" when there is a high likelihood of
<p>When using more than one variable for <code>...</code> (= combination therapy), use <code>only_all_tested</code> to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Drug A and Drug B, about how <code><a href="proportion.html">susceptibility()</a></code> works to calculate the %SI:</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></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="sc">-----------------------</span> <span class="sc">-----------------------</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> Drug A Drug B include as include as include as include as</span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> numerator denominator numerator denominator</span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">----------</span> <span class="sc">-----------</span> <span class="sc">----------</span> <span class="sc">-----------</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> S or I S or I X X X X</span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a> R S or I X X X X</span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> S or I X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a> S or I R X X X X</span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a> R R <span class="sc">-</span> X <span class="sc">-</span> X</span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> R <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a> S or I <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a> R <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="sc">-----------------------</span> <span class="sc">-----------------------</span></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> Drug A Drug B include as include as include as include as</span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a> numerator denominator numerator denominator</span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">----------</span> <span class="sc">-----------</span> <span class="sc">----------</span> <span class="sc">-----------</span></span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> S or I S or I X X X X</span>
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> R S or I X X X X</span>
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> S or I X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> S or I R X X X X</span>
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> R R <span class="sc">-</span> X <span class="sc">-</span> X</span>
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> R <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a> S or I <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-14"><a href="#cb1-14" tabindex="-1"></a> R <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-15"><a href="#cb1-15" tabindex="-1"></a> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-16"><a href="#cb1-16" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span></code></pre><p></p></div>
<p>Please note that, in combination therapies, for <code>only_all_tested = TRUE</code> applies that:</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">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="ot">=</span> <span class="fu">count_all</span>()</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="ot">=</span> <span class="dv">1</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="fu">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="ot">=</span> <span class="fu">count_all</span>()</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="ot">=</span> <span class="dv">1</span></span></code></pre><p></p></div>
<p>and that, in combination therapies, for <code>only_all_tested = FALSE</code> applies that:</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">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="sc">&gt;=</span> <span class="fu">count_all</span>()</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="sc">&gt;=</span> <span class="dv">1</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="fu">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="sc">&gt;=</span> <span class="fu">count_all</span>()</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="sc">&gt;=</span> <span class="dv">1</span></span></code></pre><p></p></div>
<p>Using <code>only_all_tested</code> has no impact when only using one antibiotic as input.</p>
</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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -271,7 +271,7 @@
<p>The <em>G</em>-test uses the log of the ratio of two likelihoods as the test statistic, which is why it is also called a likelihood ratio test or log-likelihood ratio test. The formula to calculate a <em>G</em>-statistic is:</p>
<p>\(G = 2 * sum(x * log(x / E))\)</p>
<p>where <code>E</code> are the expected values. Since this is chi-square distributed, the p value can be calculated in <span style="R">R</span> with:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>p <span class="ot">&lt;-</span> stats<span class="sc">::</span><span class="fu">pchisq</span>(G, df, <span class="at">lower.tail =</span> <span class="cn">FALSE</span>)</span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a>p <span class="ot">&lt;-</span> stats<span class="sc">::</span><span class="fu">pchisq</span>(G, df, <span class="at">lower.tail =</span> <span class="cn">FALSE</span>)</span></code></pre><p></p></div>
<p>where <code>df</code> are the degrees of freedom.</p>
<p>If there are more than two categories and you want to find out which ones are significantly different from their null expectation, you can use the same method of testing each category vs. the sum of all categories, with the Bonferroni correction. You use <em>G</em>-tests for each category, of course.</p>
</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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<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: 88 KiB

After

Width:  |  Height:  |  Size: 87 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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<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: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -413,8 +413,10 @@
<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="va">age_group</span>, <span class="va">CIP</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span> <span class="fu">ggplot_sir</span><span class="op">(</span>x <span class="op">=</span> <span class="st">"age_group"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>Removed 6 rows containing missing values (`position_stack()`).</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>Removed 6 rows containing missing values (`position_stack()`).</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>Removed 6 rows containing missing values or values outside the scale range</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (`geom_col()`).</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>Removed 6 rows containing missing values or values outside the scale range</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> (`geom_text()`).</span>
<span class="r-plt img"><img src="ggplot_sir-8.png" alt="" width="700" height="433"></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://ggplot2.tidyverse.org" class="external-link">"ggplot2"</a></span><span class="op">)</span> <span class="op">&amp;&amp;</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"># a shorter version which also adjusts data label colours:</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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -284,30 +284,30 @@ Ordered <a href="https://rdrr.io/r/base/factor.html" class="external-link">facto
<p>Custom guidelines can be set with the <code>custom_mdro_guideline()</code> function. This is of great importance if you have custom rules to determine MDROs in your hospital, e.g., rules that are dependent on ward, state of contact isolation or other variables in your data.</p>
<p>If you are familiar with the <code><a href="https://dplyr.tidyverse.org/reference/case_when.html" class="external-link">case_when()</a></code> function of the <code>dplyr</code> package, you will recognise the input method to set your own rules. Rules must be set using what <span style="R">R</span> considers to be the 'formula notation'. The rule is written <em>before</em> the tilde (<code>~</code>) and the consequence of the rule is written <em>after</em> the tilde:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>custom <span class="ot">&lt;-</span> <span class="fu">custom_mdro_guideline</span>(CIP <span class="sc">==</span> <span class="st">"R"</span> <span class="sc">&amp;</span> age <span class="sc">&gt;</span> <span class="dv">60</span> <span class="sc">~</span> <span class="st">"Elderly Type A"</span>,</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> ERY <span class="sc">==</span> <span class="st">"R"</span> <span class="sc">&amp;</span> age <span class="sc">&gt;</span> <span class="dv">60</span> <span class="sc">~</span> <span class="st">"Elderly Type B"</span>)</span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a>custom <span class="ot">&lt;-</span> <span class="fu">custom_mdro_guideline</span>(CIP <span class="sc">==</span> <span class="st">"R"</span> <span class="sc">&amp;</span> age <span class="sc">&gt;</span> <span class="dv">60</span> <span class="sc">~</span> <span class="st">"Elderly Type A"</span>,</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> ERY <span class="sc">==</span> <span class="st">"R"</span> <span class="sc">&amp;</span> age <span class="sc">&gt;</span> <span class="dv">60</span> <span class="sc">~</span> <span class="st">"Elderly Type B"</span>)</span></code></pre><p></p></div>
<p>If a row/an isolate matches the first rule, the value after the first <code>~</code> (in this case <em>'Elderly Type A'</em>) will be set as MDRO value. Otherwise, the second rule will be tried and so on. The number of rules is unlimited.</p>
<p>You can print the rules set in the console for an overview. Colours will help reading it if your console supports colours.</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>custom</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; A set of custom MDRO rules:</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 1. CIP is "R" and age is higher than 60 -&gt; Elderly Type A</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 2. ERY is "R" and age is higher than 60 -&gt; Elderly Type B</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 3. Otherwise -&gt; Negative</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt;</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Unmatched rows will return NA.</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a>custom</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a><span class="co">#&gt; A set of custom MDRO rules:</span></span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a><span class="co">#&gt; 1. CIP is "R" and age is higher than 60 -&gt; Elderly Type A</span></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a><span class="co">#&gt; 2. ERY is "R" and age is higher than 60 -&gt; Elderly Type B</span></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a><span class="co">#&gt; 3. Otherwise -&gt; Negative</span></span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="co">#&gt;</span></span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a><span class="co">#&gt; Unmatched rows will return NA.</span></span></code></pre><p></p></div>
<p>The outcome of the function can be used for the <code>guideline</code> argument in the <code>mdro()</code> function:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>x <span class="ot">&lt;-</span> <span class="fu">mdro</span>(example_isolates,</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="at">guideline =</span> custom)</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="fu">table</span>(x)</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Negative Elderly Type A Elderly Type B</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 1070 198 732</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a>x <span class="ot">&lt;-</span> <span class="fu">mdro</span>(example_isolates,</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="at">guideline =</span> custom)</span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a><span class="fu">table</span>(x)</span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a><span class="co">#&gt; Negative Elderly Type A Elderly Type B</span></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a><span class="co">#&gt; 1070 198 732</span></span></code></pre><p></p></div>
<p>Rules can also be combined with other custom rules by using <code><a href="https://rdrr.io/r/base/c.html" class="external-link">c()</a></code>:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>x <span class="ot">&lt;-</span> <span class="fu">mdro</span>(example_isolates,</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="at">guideline =</span> <span class="fu">c</span>(custom,</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">custom_mdro_guideline</span>(ERY <span class="sc">==</span> <span class="st">"R"</span> <span class="sc">&amp;</span> age <span class="sc">&gt;</span> <span class="dv">50</span> <span class="sc">~</span> <span class="st">"Elderly Type C"</span>)))</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="fu">table</span>(x)</span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Negative Elderly Type A Elderly Type B Elderly Type C</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 961 198 732 109</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a>x <span class="ot">&lt;-</span> <span class="fu">mdro</span>(example_isolates,</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="at">guideline =</span> <span class="fu">c</span>(custom,</span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="fu">custom_mdro_guideline</span>(ERY <span class="sc">==</span> <span class="st">"R"</span> <span class="sc">&amp;</span> age <span class="sc">&gt;</span> <span class="dv">50</span> <span class="sc">~</span> <span class="st">"Elderly Type C"</span>)))</span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a><span class="fu">table</span>(x)</span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a><span class="co">#&gt; Negative Elderly Type A Elderly Type B Elderly Type C</span></span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="co">#&gt; 961 198 732 109</span></span></code></pre><p></p></div>
<p>The rules set (the <code>custom</code> object in this case) could be exported to a shared file location using <code><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">saveRDS()</a></code> if you collaborate with multiple users. The custom rules set could then be imported using <code><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">readRDS()</a></code>.</p>
</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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -200,53 +200,53 @@ This is the fastest way to have your organisation (or analysis) specific codes p
<p>Imagine this data on a sheet of an Excel file. The first column contains the organisation specific codes, the second column contains valid taxonomic names:</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>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="sc">--</span><span class="er">|</span><span class="sc">--------------------</span><span class="er">|</span><span class="sc">-----------------------</span><span class="er">|</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="dv">1</span> <span class="sc">|</span> Organisation XYZ <span class="sc">|</span> mo <span class="sc">|</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="dv">2</span> <span class="sc">|</span> lab_mo_ecoli <span class="sc">|</span> Escherichia coli <span class="sc">|</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="dv">3</span> <span class="sc">|</span> lab_mo_kpneumoniae <span class="sc">|</span> Klebsiella pneumoniae <span class="sc">|</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="dv">4</span> <span class="sc">|</span> <span class="er">|</span> <span class="er">|</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="sc">|</span> A <span class="sc">|</span> B <span class="sc">|</span></span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a><span class="sc">--</span><span class="er">|</span><span class="sc">--------------------</span><span class="er">|</span><span class="sc">-----------------------</span><span class="er">|</span></span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a><span class="dv">1</span> <span class="sc">|</span> Organisation XYZ <span class="sc">|</span> mo <span class="sc">|</span></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a><span class="dv">2</span> <span class="sc">|</span> lab_mo_ecoli <span class="sc">|</span> Escherichia coli <span class="sc">|</span></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a><span class="dv">3</span> <span class="sc">|</span> lab_mo_kpneumoniae <span class="sc">|</span> Klebsiella pneumoniae <span class="sc">|</span></span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="dv">4</span> <span class="sc">|</span> <span class="er">|</span> <span class="er">|</span></span></code></pre><p></p></div>
<p>We save it as <code>"home/me/ourcodes.xlsx"</code>. Now we have to set it as a source:</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">set_mo_source</span>(<span class="st">"home/me/ourcodes.xlsx"</span>)</span>
<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">: Created 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></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="fu">set_mo_source</span>(<span class="st">"home/me/ourcodes.xlsx"</span>)</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a><span class="co">#&gt; </span><span class="al">NOTE</span><span class="co">: Created mo_source file '/Users/me/mo_source.rds' (0.3 kB) from</span></span>
<span id="cb1-3"><a href="#cb1-3" 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" tabindex="-1"></a><span class="co">#&gt; "Organisation XYZ" and "mo"</span></span></code></pre><p></p></div>
<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 '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>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] "Klebsiella"</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="co"># other input values still work too</span></span>
<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 '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></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" 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" tabindex="-1"></a><span class="co">#&gt; Class 'mo'</span></span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a><span class="co">#&gt; [1] B_ESCHR_COLI</span></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a><span class="fu">mo_genus</span>(<span class="st">"lab_mo_kpneumoniae"</span>)</span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="co">#&gt; [1] "Klebsiella"</span></span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a></span>
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a><span class="co"># other input values still work too</span></span>
<span id="cb1-9"><a href="#cb1-9" 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" 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" tabindex="-1"></a><span class="co">#&gt; Use mo_uncertainties() to review it.</span></span>
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a><span class="co">#&gt; Class 'mo'</span></span>
<span id="cb1-13"><a href="#cb1-13" 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>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="sc">--</span><span class="er">|</span><span class="sc">--------------------</span><span class="er">|</span><span class="sc">-----------------------</span><span class="er">|</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="dv">1</span> <span class="sc">|</span> Organisation XYZ <span class="sc">|</span> mo <span class="sc">|</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="dv">2</span> <span class="sc">|</span> lab_mo_ecoli <span class="sc">|</span> Escherichia coli <span class="sc">|</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="dv">3</span> <span class="sc">|</span> lab_mo_kpneumoniae <span class="sc">|</span> Klebsiella pneumoniae <span class="sc">|</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="dv">4</span> <span class="sc">|</span> lab_Staph_aureus <span class="sc">|</span> Staphylococcus aureus <span class="sc">|</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="dv">5</span> <span class="sc">|</span> <span class="er">|</span> <span class="er">|</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="sc">|</span> A <span class="sc">|</span> B <span class="sc">|</span></span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a><span class="sc">--</span><span class="er">|</span><span class="sc">--------------------</span><span class="er">|</span><span class="sc">-----------------------</span><span class="er">|</span></span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a><span class="dv">1</span> <span class="sc">|</span> Organisation XYZ <span class="sc">|</span> mo <span class="sc">|</span></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a><span class="dv">2</span> <span class="sc">|</span> lab_mo_ecoli <span class="sc">|</span> Escherichia coli <span class="sc">|</span></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a><span class="dv">3</span> <span class="sc">|</span> lab_mo_kpneumoniae <span class="sc">|</span> Klebsiella pneumoniae <span class="sc">|</span></span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="dv">4</span> <span class="sc">|</span> lab_Staph_aureus <span class="sc">|</span> Staphylococcus aureus <span class="sc">|</span></span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a><span class="dv">5</span> <span class="sc">|</span> <span class="er">|</span> <span class="er">|</span></span></code></pre><p></p></div>
<p>...any new usage of an MO function in this package will update your data file:</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; </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 '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>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] "Staphylococcus"</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" 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" 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" 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" tabindex="-1"></a><span class="co">#&gt; "Organisation XYZ" and "mo"</span></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a><span class="co">#&gt; Class 'mo'</span></span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="co">#&gt; [1] B_ESCHR_COLI</span></span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a></span>
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a><span class="fu">mo_genus</span>(<span class="st">"lab_Staph_aureus"</span>)</span>
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a><span class="co">#&gt; [1] "Staphylococcus"</span></span></code></pre><p></p></div>
<p>To delete the reference data file, just use <code>""</code>, <code>NULL</code> or <code>FALSE</code> as input for <code>set_mo_source()</code>:</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">set_mo_source</span>(<span class="cn">NULL</span>)</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Removed mo_source file '/Users/me/mo_source.rds'</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="fu">set_mo_source</span>(<span class="cn">NULL</span>)</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a><span class="co">#&gt; Removed mo_source file '/Users/me/mo_source.rds'</span></span></code></pre><p></p></div>
<p>If the original file (in the previous case an Excel file) is moved or deleted, the <code>mo_source.rds</code> file will be removed upon the next use of <code><a href="as.mo.html">as.mo()</a></code> or any <code><a href="mo_property.html">mo_*</a></code> function.</p>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 86 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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -12,7 +12,7 @@ Especially the scale_*_mic() functions are relevant wrappers to plot MIC values
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -287,28 +287,28 @@ resistance() should be used to calculate resistance, susceptibility() should be
<p>When using more than one variable for <code>...</code> (= combination therapy), use <code>only_all_tested</code> to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Drug A and Drug B, about how <code>susceptibility()</code> works to calculate the %SI:</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></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="sc">-----------------------</span> <span class="sc">-----------------------</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> Drug A Drug B include as include as include as include as</span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> numerator denominator numerator denominator</span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">----------</span> <span class="sc">-----------</span> <span class="sc">----------</span> <span class="sc">-----------</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> S or I S or I X X X X</span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a> R S or I X X X X</span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> S or I X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a> S or I R X X X X</span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a> R R <span class="sc">-</span> X <span class="sc">-</span> X</span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> R <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a> S or I <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a> R <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="sc">-----------------------</span> <span class="sc">-----------------------</span></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> Drug A Drug B include as include as include as include as</span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a> numerator denominator numerator denominator</span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">----------</span> <span class="sc">-----------</span> <span class="sc">----------</span> <span class="sc">-----------</span></span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> S or I S or I X X X X</span>
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> R S or I X X X X</span>
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> S or I X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> S or I R X X X X</span>
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> R R <span class="sc">-</span> X <span class="sc">-</span> X</span>
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> R <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a> S or I <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> X X <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-14"><a href="#cb1-14" tabindex="-1"></a> R <span class="sc">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-15"><a href="#cb1-15" tabindex="-1"></a> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="er">&lt;</span><span class="cn">NA</span><span class="sc">&gt;</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
<span id="cb1-16"><a href="#cb1-16" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span></code></pre><p></p></div>
<p>Please note that, in combination therapies, for <code>only_all_tested = TRUE</code> applies that:</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">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="ot">=</span> <span class="fu">count_all</span>()</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="ot">=</span> <span class="dv">1</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="fu">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="ot">=</span> <span class="fu">count_all</span>()</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="ot">=</span> <span class="dv">1</span></span></code></pre><p></p></div>
<p>and that, in combination therapies, for <code>only_all_tested = FALSE</code> applies that:</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">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="sc">&gt;=</span> <span class="fu">count_all</span>()</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="sc">&gt;=</span> <span class="dv">1</span></span></code></pre><p></p></div>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="fu">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="sc">&gt;=</span> <span class="fu">count_all</span>()</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="sc">&gt;=</span> <span class="dv">1</span></span></code></pre><p></p></div>
<p>Using <code>only_all_tested</code> has no impact when only using one antibiotic as input.</p>
</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="">2.1.1.9012</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
<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: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Some files were not shown because too many files have changed in this diff Show More