1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 20:41:58 +02:00

(v0.8.0.9036) complete documentation rewrite

This commit is contained in:
2019-11-28 22:32:17 +01:00
parent 7c28b392b1
commit c5f00f4a9f
138 changed files with 2797 additions and 2484 deletions

View File

@ -84,7 +84,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="https://msberends.gitlab.io/AMR/index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9035</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>

View File

@ -84,7 +84,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9035</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>

View File

@ -84,7 +84,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9035</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>

View File

@ -84,7 +84,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9035</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>

View File

@ -45,7 +45,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9035</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>

View File

@ -84,7 +84,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9035</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -231,13 +231,13 @@
</div>
<div id="amr-0-8-0-9035" class="section level1">
<div id="amr-0-8-0-9036" class="section level1">
<h1 class="page-header">
<a href="#amr-0-8-0-9035" class="anchor"></a>AMR 0.8.0.9035<small> Unreleased </small>
<a href="#amr-0-8-0-9036" class="anchor"></a>AMR 0.8.0.9036<small> Unreleased </small>
</h1>
<div id="last-updated-24-nov-2019" class="section level2">
<div id="last-updated-28-nov-2019" class="section level2">
<h2 class="hasAnchor">
<a href="#last-updated-24-nov-2019" class="anchor"></a><small>Last updated: 24-Nov-2019</small>
<a href="#last-updated-28-nov-2019" class="anchor"></a><small>Last updated: 28-Nov-2019</small>
</h2>
<div id="breaking" class="section level3">
<h3 class="hasAnchor">
@ -320,12 +320,15 @@
<li>More robust way of determining valid MIC values</li>
<li>Small changed to the <code>example_isolates</code> data set to better reflect reality</li>
<li>Added more microorganisms codes from laboratory systems (esp. species of <em>Pseudescherichia</em> and <em>Rodentibacter</em>)</li>
<li>Added Gram-stain to <code><a href="../reference/mo_property.html">mo_info()</a></code>
</li>
</ul>
</div>
<div id="other" class="section level3">
<h3 class="hasAnchor">
<a href="#other" class="anchor"></a>Other</h3>
<ul>
<li>Rewrote the complete documentation to markdown format, to be able to use the very latest version of the great <a href="https://roxygen2.r-lib.org/index.html">Roxygen2</a>, released in November 2019. This tremously improved the documentation quality, since the rewrite forced us to go over all texts again and make changes where needed.</li>
<li>Change dependency on <code>clean</code> to <code>cleaner</code>, as this package was renamed accordingly upon CRAN request</li>
<li>Added Dr. Sofia Ny as contributor</li>
</ul>
@ -492,7 +495,7 @@ Since this is a major change, usage of the old <code>also_single_tested</code> w
<a href="#new-2" class="anchor"></a>New</h4>
<ul>
<li>
<p>Function <code><a href="../reference/proportion.html">rsi_df()</a></code> to transform a <code>data.frame</code> to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions <code><a href="../reference/count.html">count_df()</a></code> and <code>portion_df()</code> to immediately show resistance percentages and number of available isolates:</p>
<p>Function <code><a href="../reference/proportion.html">rsi_df()</a></code> to transform a <code>data.frame</code> to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions <code><a href="../reference/count.html">count_df()</a></code> and <code><a href="../reference/AMR-deprecated.html">portion_df()</a></code> to immediately show resistance percentages and number of available isolates:</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" data-line-number="1">septic_patients <span class="op">%&gt;%</span></a>
<a class="sourceLine" id="cb11-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(AMX, CIP) <span class="op">%&gt;%</span></a>
<a class="sourceLine" id="cb11-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="../reference/proportion.html">rsi_df</a></span>()</a>
@ -533,7 +536,7 @@ Since this is a major change, usage of the old <code>also_single_tested</code> w
<h4 class="hasAnchor">
<a href="#changed-1" class="anchor"></a>Changed</h4>
<ul>
<li>Column names of output <code><a href="../reference/count.html">count_df()</a></code> and <code>portion_df()</code> are now lowercase</li>
<li>Column names of output <code><a href="../reference/count.html">count_df()</a></code> and <code><a href="../reference/AMR-deprecated.html">portion_df()</a></code> are now lowercase</li>
<li>Fixed bug in translation of microorganism names</li>
<li>Fixed bug in determining taxonomic kingdoms</li>
<li>Algorithm improvements for <code><a href="../reference/as.ab.html">as.ab()</a></code> and <code><a href="../reference/as.mo.html">as.mo()</a></code> to understand even more severely misspelled input</li>
@ -611,7 +614,7 @@ Please <a href="https://gitlab.com/msberends/AMR/issues/new?issue%5Btitle%5D=Tra
<li>Improved intelligence of looking up antibiotic columns in a data set using <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code>
</li>
<li>Added ~5,000 more old taxonomic names to the <code>microorganisms.old</code> data set, which leads to better results finding when using the <code><a href="../reference/as.mo.html">as.mo()</a></code> function</li>
<li>This package now honours the new EUCAST insight (2019) that S and I are but classified as susceptible, where I is defined as increased exposure and not intermediate anymore. For functions like <code>portion_df()</code> and <code><a href="../reference/count.html">count_df()</a></code> this means that their new parameter <code>combine_SI</code> is TRUE at default. Our plotting function <code><a href="../reference/ggplot_rsi.html">ggplot_rsi()</a></code> also reflects this change since it uses <code><a href="../reference/count.html">count_df()</a></code> internally.</li>
<li>This package now honours the new EUCAST insight (2019) that S and I are but classified as susceptible, where I is defined as increased exposure and not intermediate anymore. For functions like <code><a href="../reference/AMR-deprecated.html">portion_df()</a></code> and <code><a href="../reference/count.html">count_df()</a></code> this means that their new parameter <code>combine_SI</code> is TRUE at default. Our plotting function <code><a href="../reference/ggplot_rsi.html">ggplot_rsi()</a></code> also reflects this change since it uses <code><a href="../reference/count.html">count_df()</a></code> internally.</li>
<li>The <code><a href="../reference/age.html">age()</a></code> function gained a new parameter <code>exact</code> to determine ages with decimals</li>
<li>Removed deprecated functions <code>guess_mo()</code>, <code>guess_atc()</code>, <code>EUCAST_rules()</code>, <code>interpretive_reading()</code>, <code>rsi()</code>
</li>
@ -1392,7 +1395,7 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<div id="tocnav">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#amr-0-8-0-9035">0.8.0.9035</a></li>
<li><a href="#amr-0-8-0-9036">0.8.0.9036</a></li>
<li><a href="#amr-0-8-0">0.8.0</a></li>
<li><a href="#amr-0-7-1">0.7.1</a></li>
<li><a href="#amr-0-7-0">0.7.0</a></li>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -247,7 +247,9 @@
<span class='fu'>portion_SI</span>(<span class='no'>...</span>)
<span class='fu'>portion_S</span>(<span class='no'>...</span>)</pre>
<span class='fu'>portion_S</span>(<span class='no'>...</span>)
<span class='fu'>portion_df</span>(<span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -244,7 +244,7 @@
<p><code>AMR</code> is a free and open-source R package to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods. It supports any table format, including WHONET/EARS-Net data.</p>
<p>We created this package for both academic research and routine analysis at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology &amp; Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is actively maintained and free software; you can freely use and distribute it for both personal and commercial (but not patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation.</p>
<p>This package can be used for:</p><ul>
<li><p>Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the Catalogue of Life</p></li>
<li><p>Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the <a href='http://www.catalogueoflife.org'>Catalogue of Life</a></p></li>
<li><p>Interpreting raw MIC and disk diffusion values, based on the latest CLSI or EUCAST guidelines</p></li>
<li><p>Determining first isolates to be used for AMR analysis</p></li>
<li><p>Calculating antimicrobial resistance</p></li>
@ -268,11 +268,11 @@
<p>For suggestions, comments or questions, please contact us at:</p>
<p>Matthijs S. Berends <br />
m.s.berends [at] umcg [dot] nl <br />
m.s.berends at umcg <a href='https://rdrr.io/r/grDevices/plotmath.html'>dot</a> nl <br />
Department of Medical Microbiology, University of Groningen <br />
University Medical Center Groningen <br />
Post Office Box 30001 <br />
9700 RB Groningen
9700 RB Groningen <br />
The Netherlands</p>
<p>If you have found a bug, please file a new issue at: <br />
<a href='https://gitlab.com/msberends/AMR/issues'>https://gitlab.com/msberends/AMR/issues</a></p>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9033</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -247,7 +247,7 @@
This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href='https://www.whocc.no'>https://www.whocc.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href='http://ec.europa.eu/health/documents/community-register/html/atc.htm'>http://ec.europa.eu/health/documents/community-register/html/atc.htm</a>).</p>
<p>These have become the gold standard for international drug utilisation monitoring and research.</p>
<p>The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.</p>
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See <a href='https://www.whocc.no/copyright_disclaimer/'>https://www.whocc.no/copyright_disclaimer/</a>.</strong></p>
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package.</strong> See <a href='https://www.whocc.no/copyright_disclaimer/.'>https://www.whocc.no/copyright_disclaimer/.</a></p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The data itself was based on our <code><a href='example_isolates.html'>example_isolates</a></code> data set.</p>
<p>This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The data itself was based on our <a href='example_isolates.html'>example_isolates</a> data set.</p>
</div>
<pre class="usage"><span class='no'>WHONET</span></pre>
@ -242,35 +242,34 @@
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
<p>A <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 500 observations and 53 variables:</p><dl class='dl-horizontal'>
<dt><code>Identification number</code></dt><dd><p>ID of the sample</p></dd>
<dt><code>Specimen number</code></dt><dd><p>ID of the specimen</p></dd>
<dt><code>Organism</code></dt><dd><p>Name of the microorganism. Before analysis, you should transform this to a valid microbial class, using <code><a href='as.mo.html'>as.mo</a></code>.</p></dd>
<dt><code>Country</code></dt><dd><p>Country of origin</p></dd>
<dt><code>Laboratory</code></dt><dd><p>Name of laboratory</p></dd>
<dt><code>Last name</code></dt><dd><p>Last name of patient</p></dd>
<dt><code>First name</code></dt><dd><p>Initial of patient</p></dd>
<dt><code>Sex</code></dt><dd><p>Gender of patient</p></dd>
<dt><code>Age</code></dt><dd><p>Age of patient</p></dd>
<dt><code>Age category</code></dt><dd><p>Age group, can also be looked up using <code><a href='age_groups.html'>age_groups</a></code></p></dd>
<dt><code>Date of admission</code></dt><dd><p>Date of hospital admission</p></dd>
<dt><code>Specimen date</code></dt><dd><p>Date when specimen was received at laboratory</p></dd>
<dt><code>Specimen type</code></dt><dd><p>Specimen type or group</p></dd>
<dt><code>Specimen type (Numeric)</code></dt><dd><p>Translation of <code>"Specimen type"</code></p></dd>
<dt><code>Reason</code></dt><dd><p>Reason of request with Differential Diagnosis</p></dd>
<dt><code>Isolate number</code></dt><dd><p>ID of isolate</p></dd>
<dt><code>Organism type</code></dt><dd><p>Type of microorganism, can also be looked up using <code><a href='mo_property.html'>mo_type</a></code></p></dd>
<dt><code>Serotype</code></dt><dd><p>Serotype of microorganism</p></dd>
<dt><code>Beta-lactamase</code></dt><dd><p>Microorganism produces beta-lactamase?</p></dd>
<dt><code>ESBL</code></dt><dd><p>Microorganism produces extended spectrum beta-lactamase?</p></dd>
<dt><code>Carbapenemase</code></dt><dd><p>Microorganism produces carbapenemase?</p></dd>
<dt><code>MRSA screening test</code></dt><dd><p>Microorganism is possible MRSA?</p></dd>
<dt><code>Inducible clindamycin resistance</code></dt><dd><p>Clindamycin can be induced?</p></dd>
<dt><code>Comment</code></dt><dd><p>Other comments</p></dd>
<dt><code>Date of data entry</code></dt><dd><p>Date this data was entered in WHONET</p></dd>
<dt><code>AMP_ND10:CIP_EE</code></dt><dd><p>27 different antibiotics. You can lookup the abbreviatons in the <code><a href='antibiotics.html'>antibiotics</a></code> data set, or use e.g. <code><a href='ab_property.html'>ab_name</a>("AMP")</code> to get the official name immediately. Before analysis, you should transform this to a valid antibiotic class, using <code><a href='as.rsi.html'>as.rsi</a></code>.</p></dd>
</dl>
<p>A <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 500 observations and 53 variables:</p><ul>
<li><p><code>Identification number</code><br /> ID of the sample</p></li>
<li><p><code>Specimen number</code><br /> ID of the specimen</p></li>
<li><p><code>Organism</code><br /> Name of the microorganism. Before analysis, you should transform this to a valid microbial class, using <code><a href='as.mo.html'>as.mo()</a></code>.</p></li>
<li><p><code>Country</code><br /> Country of origin</p></li>
<li><p><code>Laboratory</code><br /> Name of laboratory</p></li>
<li><p><code>Last name</code><br /> Last name of patient</p></li>
<li><p><code>First name</code><br /> Initial of patient</p></li>
<li><p><code>Sex</code><br /> Gender of patient</p></li>
<li><p><code>Age</code><br /> Age of patient</p></li>
<li><p><code>Age category</code><br /> Age group, can also be looked up using <code><a href='age_groups.html'>age_groups()</a></code></p></li>
<li><p><code>Date of admission</code><br /> Date of hospital admission</p></li>
<li><p><code>Specimen date</code><br /> Date when specimen was received at laboratory</p></li>
<li><p><code>Specimen type</code><br /> Specimen type or group</p></li>
<li><p><code>Specimen type (Numeric)</code><br /> Translation of <code>"Specimen type"</code></p></li>
<li><p><code>Reason</code><br /> Reason of request with Differential Diagnosis</p></li>
<li><p><code>Isolate number</code><br /> ID of isolate</p></li>
<li><p><code>Organism type</code><br /> Type of microorganism, can also be looked up using <code><a href='mo_property.html'>mo_type()</a></code></p></li>
<li><p><code>Serotype</code><br /> Serotype of microorganism</p></li>
<li><p><code>Beta-lactamase</code><br /> Microorganism produces beta-lactamase?</p></li>
<li><p><code>ESBL</code><br /> Microorganism produces extended spectrum beta-lactamase?</p></li>
<li><p><code>Carbapenemase</code><br /> Microorganism produces carbapenemase?</p></li>
<li><p><code>MRSA screening test</code><br /> Microorganism is possible MRSA?</p></li>
<li><p><code>Inducible clindamycin resistance</code><br /> Clindamycin can be induced?</p></li>
<li><p><code>Comment</code><br /> Other comments</p></li>
<li><p><code>Date of data entry</code><br /> Date this data was entered in WHONET</p></li>
<li><p><code>AMP_ND10:CIP_EE</code><br /> 27 different antibiotics. You can lookup the abbreviatons in the <a href='antibiotics.html'>antibiotics</a> data set, or use e.g. <code><a href='ab_property.html'>ab_name("AMP")</a></code> to get the official name immediately. Before analysis, you should transform this to a valid antibiotic class, using <code><a href='as.rsi.html'>as.rsi()</a></code>.</p></li>
</ul>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Property of an antibiotic — ab_property" />
<meta property="og:description" content="Use these functions to return a specific property of an antibiotic from the antibiotics data set. All input values will be evaluated internally with as.ab." />
<meta property="og:description" content="Use these functions to return a specific property of an antibiotic from the antibiotics data set. All input values will be evaluated internally with as.ab()." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>Use these functions to return a specific property of an antibiotic from the <code><a href='antibiotics.html'>antibiotics</a></code> data set. All input values will be evaluated internally with <code><a href='as.ab.html'>as.ab</a></code>.</p>
<p>Use these functions to return a specific property of an antibiotic from the <a href='antibiotics.html'>antibiotics</a> data set. All input values will be evaluated internally with <code><a href='as.ab.html'>as.ab()</a></code>.</p>
</div>
<pre class="usage"><span class='fu'>ab_name</span>(<span class='no'>x</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>tolower</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)
@ -264,11 +264,11 @@
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>any (vector of) text that can be coerced to a valid microorganism code with <code><a href='as.ab.html'>as.ab</a></code></p></td>
<td><p>any (vector of) text that can be coerced to a valid microorganism code with <code><a href='as.ab.html'>as.ab()</a></code></p></td>
</tr>
<tr>
<th>language</th>
<td><p>language of the returned text, defaults to system language (see <code><a href='translate.html'>get_locale</a></code>) and can also be set with <code><a href='https://rdrr.io/r/base/options.html'>getOption</a>("AMR_locale")</code>. Use <code>language = NULL</code> or <code>language = ""</code> to prevent translation.</p></td>
<td><p>language of the returned text, defaults to system language (see <code><a href='translate.html'>get_locale()</a></code>) and can also be set with <code><a href='https://rdrr.io/r/base/options.html'>getOption("AMR_locale")</a></code>. Use <code>language = NULL</code> or <code>language = ""</code> to prevent translation.</p></td>
</tr>
<tr>
<th>tolower</th>
@ -276,7 +276,7 @@
</tr>
<tr>
<th>...</th>
<td><p>other parameters passed on to <code><a href='as.ab.html'>as.ab</a></code></p></td>
<td><p>other parameters passed on to <code><a href='as.ab.html'>as.ab()</a></code></p></td>
</tr>
<tr>
<th>administration</th>
@ -288,7 +288,7 @@
</tr>
<tr>
<th>property</th>
<td><p>one of the column names of one of the <code><a href='antibiotics.html'>antibiotics</a></code> data set</p></td>
<td><p>one of the column names of one of the <a href='antibiotics.html'>antibiotics</a> data set</p></td>
</tr>
</table>
@ -296,10 +296,10 @@
<ul>
<li><p>An <code>integer</code> in case of <code>ab_cid</code></p></li>
<li><p>A named <code>list</code> in case of <code>ab_info</code> and multiple <code>ab_synonyms</code>/<code>ab_tradenames</code></p></li>
<li><p>A <code>double</code> in case of <code>ab_ddd</code></p></li>
<li><p>A <code>character</code> in all other cases</p></li>
<li><p>An <code><a href='https://rdrr.io/r/base/integer.html'>integer</a></code> in case of <code>ab_cid()</code></p></li>
<li><p>A named <code><a href='https://rdrr.io/r/base/list.html'>list</a></code> in case of <code>ab_info()</code> and multiple <code>ab_synonyms()</code>/<code>ab_tradenames()</code></p></li>
<li><p>A <code><a href='https://rdrr.io/r/base/double.html'>double</a></code> in case of <code>ab_ddd()</code></p></li>
<li><p>A <code><a href='https://rdrr.io/r/base/character.html'>character</a></code> in all other cases</p></li>
</ul>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
@ -319,7 +319,7 @@
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='antibiotics.html'>antibiotics</a></code></p></div>
<div class='dont-index'><p><a href='antibiotics.html'>antibiotics</a></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># all properties:</span>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -244,15 +244,15 @@
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>date(s), will be coerced with <code><a href='https://rdrr.io/r/base/as.POSIXlt.html'>as.POSIXlt</a></code></p></td>
<td><p>date(s), will be coerced with <code><a href='https://rdrr.io/r/base/as.POSIXlt.html'>as.POSIXlt()</a></code></p></td>
</tr>
<tr>
<th>reference</th>
<td><p>reference date(s) (defaults to today), will be coerced with <code><a href='https://rdrr.io/r/base/as.POSIXlt.html'>as.POSIXlt</a></code> and cannot be lower than <code>x</code></p></td>
<td><p>reference date(s) (defaults to today), will be coerced with <code><a href='https://rdrr.io/r/base/as.POSIXlt.html'>as.POSIXlt()</a></code> and cannot be lower than <code>x</code></p></td>
</tr>
<tr>
<th>exact</th>
<td><p>a logical to indicate whether age calculation should be exact, i.e. with decimals. It divides the number of days of <a href='https://en.wikipedia.org/wiki/Year-to-date'>year-to-date</a> (YTD) of <code>x</code> by the number of days in a year of <code>reference</code> (either 365 or 366).</p></td>
<td><p>a logical to indicate whether age calculation should be exact, i.e. with decimals. It divides the number of days of <a href='https://en.wikipedia.org/wiki/Year-to-date'>year-to-date</a> (YTD) of <code>x</code> by the number of days in the year of <code>reference</code> (either 365 or 366).</p></td>
</tr>
<tr>
<th>na.rm</th>
@ -270,7 +270,7 @@
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>To split ages into groups, use the <code><a href='age_groups.html'>age_groups</a></code> function.</p></div>
<div class='dont-index'><p>To split ages into groups, use the <code><a href='age_groups.html'>age_groups()</a></code> function.</p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># 10 random birth dates</span>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -244,7 +244,7 @@
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>age, e.g. calculated with <code><a href='age.html'>age</a></code></p></td>
<td><p>age, e.g. calculated with <code><a href='age.html'>age()</a></code></p></td>
</tr>
<tr>
<th>split_at</th>
@ -263,7 +263,7 @@
<p>To split ages, the input can be:</p><ul>
<li><p>A numeric vector. A vector of e.g. <code><a href='https://rdrr.io/r/base/c.html'>c(10, 20)</a></code> will split on 0-9, 10-19 and 20+. A value of only <code>50</code> will split on 0-49 and 50+.
The default is to split on young children (0-11), youth (12-24), young adults (25-54), middle-aged adults (55-74) and elderly (75+).</p></li>
The default is to split on young children (0-11), youth (12-24), young adults (25-54), middle-aged adults (55-74) and elderly (75+).</p></li>
<li><p>A character:</p><ul>
<li><p><code>"children"</code> or <code>"kids"</code>, equivalent of: <code><a href='https://rdrr.io/r/base/c.html'>c(0, 1, 2, 4, 6, 13, 18)</a></code>. This will split on 0, 1, 2-3, 4-5, 6-12, 13-17 and 18+.</p></li>
<li><p><code>"elderly"</code> or <code>"seniors"</code>, equivalent of: <code><a href='https://rdrr.io/r/base/c.html'>c(65, 75, 85)</a></code>. This will split on 0-64, 65-74, 75-84, 85+.</p></li>
@ -279,7 +279,7 @@
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>To determine ages, based on one or more reference dates, use the <code><a href='age.html'>age</a></code> function.</p></div>
<div class='dont-index'><p>To determine ages, based on one or more reference dates, use the <code><a href='age.html'>age()</a></code> function.</p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='no'>ages</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>3</span>, <span class='fl'>8</span>, <span class='fl'>16</span>, <span class='fl'>54</span>, <span class='fl'>31</span>, <span class='fl'>76</span>, <span class='fl'>101</span>, <span class='fl'>43</span>, <span class='fl'>21</span>)

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Data sets with ~550 antimicrobials — antibiotics" />
<meta property="og:description" content="Two data sets containing all antibiotics/antimycotics and antivirals. Use as.ab or one of the ab_property functions to retrieve values from the antibiotics data set. Three identifiers are included in this data set: an antibiotic ID (ab, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (atc) as defined by the WHO, and a Compound ID (cid) as found in PubChem. Other properties in this data set are derived from one or more of these codes." />
<meta property="og:description" content="Two data sets containing all antibiotics/antimycotics and antivirals. Use as.ab() or one of the ab_property() functions to retrieve values from the antibiotics data set. Three identifiers are included in this data set: an antibiotic ID (ab, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (atc) as defined by the WHO, and a Compound ID (cid) as found in PubChem. Other properties in this data set are derived from one or more of these codes." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9035</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>Two data sets containing all antibiotics/antimycotics and antivirals. Use <code><a href='as.ab.html'>as.ab</a></code> or one of the <code><a href='ab_property.html'>ab_property</a></code> functions to retrieve values from the <code>antibiotics</code> data set. Three identifiers are included in this data set: an antibiotic ID (<code>ab</code>, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (<code>atc</code>) as defined by the WHO, and a Compound ID (<code>cid</code>) as found in PubChem. Other properties in this data set are derived from one or more of these codes.</p>
<p>Two data sets containing all antibiotics/antimycotics and antivirals. Use <code><a href='as.ab.html'>as.ab()</a></code> or one of the <code><a href='ab_property.html'>ab_property()</a></code> functions to retrieve values from the antibiotics data set. Three identifiers are included in this data set: an antibiotic ID (<code>ab</code>, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (<code>atc</code>) as defined by the WHO, and a Compound ID (<code>cid</code>) as found in PubChem. Other properties in this data set are derived from one or more of these codes.</p>
</div>
<pre class="usage"><span class='no'>antibiotics</span>
@ -244,35 +244,39 @@
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
<p><strong>For the <code>antibiotics</code> data set: a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 452 observations and 13 variables:</strong></p><dl class='dl-horizontal'>
<dt><code>ab</code></dt><dd><p>Antibiotic ID as used in this package (like <code>AMC</code>), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available</p></dd>
<dt><code>atc</code></dt><dd><p>ATC code (Anatomical Therapeutic Chemical) as defined by the WHOCC, like <code>J01CR02</code></p></dd>
<dt><code>cid</code></dt><dd><p>Compound ID as found in PubChem</p></dd>
<dt><code>name</code></dt><dd><p>Official name as used by WHONET/EARS-Net or the WHO</p></dd>
<dt><code>group</code></dt><dd><p>A short and concise group name, based on WHONET and WHOCC definitions</p></dd>
<dt><code>atc_group1</code></dt><dd><p>Official pharmacological subgroup (3rd level ATC code) as defined by the WHOCC, like <code>"Macrolides, lincosamides and streptogramins"</code></p></dd>
<dt><code>atc_group2</code></dt><dd><p>Official chemical subgroup (4th level ATC code) as defined by the WHOCC, like <code>"Macrolides"</code></p></dd>
<dt><code>abbr</code></dt><dd><p>List of abbreviations as used in many countries, also for antibiotic susceptibility testing (AST)</p></dd>
<dt><code>synonyms</code></dt><dd><p>Synonyms (often trade names) of a drug, as found in PubChem based on their compound ID</p></dd>
<dt><code>oral_ddd</code></dt><dd><p>Defined Daily Dose (DDD), oral treatment</p></dd>
<dt><code>oral_units</code></dt><dd><p>Units of <code>oral_ddd</code></p></dd>
<dt><code>iv_ddd</code></dt><dd><p>Defined Daily Dose (DDD), parenteral treatment</p></dd>
<dt><code>iv_units</code></dt><dd><p>Units of <code>iv_ddd</code></p></dd>
<h3>For the antibiotics data set: a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 452 observations and 13 variables:</h3>
</dl>
<ul>
<li><p><code>ab</code><br /> Antibiotic ID as used in this package (like <code>AMC</code>), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available</p></li>
<li><p><code>atc</code><br /> ATC code (Anatomical Therapeutic Chemical) as defined by the WHOCC, like <code>J01CR02</code></p></li>
<li><p><code>cid</code><br /> Compound ID as found in PubChem</p></li>
<li><p><code>name</code><br /> Official name as used by WHONET/EARS-Net or the WHO</p></li>
<li><p><code>group</code><br /> A short and concise group name, based on WHONET and WHOCC definitions</p></li>
<li><p><code>atc_group1</code><br /> Official pharmacological subgroup (3rd level ATC code) as defined by the WHOCC, like <code>"Macrolides, lincosamides and streptogramins"</code></p></li>
<li><p><code>atc_group2</code><br /> Official chemical subgroup (4th level ATC code) as defined by the WHOCC, like <code>"Macrolides"</code></p></li>
<li><p><code>abbr</code><br /> List of abbreviations as used in many countries, also for antibiotic susceptibility testing (AST)</p></li>
<li><p><code>synonyms</code><br /> Synonyms (often trade names) of a drug, as found in PubChem based on their compound ID</p></li>
<li><p><code>oral_ddd</code><br /> Defined Daily Dose (DDD), oral treatment</p></li>
<li><p><code>oral_units</code><br /> Units of <code>oral_ddd</code></p></li>
<li><p><code>iv_ddd</code><br /> Defined Daily Dose (DDD), parenteral treatment</p></li>
<li><p><code>iv_units</code><br /> Units of <code>iv_ddd</code></p></li>
</ul>
<p><strong>For the <code>antivirals</code> data set: a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 102 observations and 9 variables:</strong></p><dl class='dl-horizontal'>
<dt><code>atc</code></dt><dd><p>ATC code (Anatomical Therapeutic Chemical) as defined by the WHOCC</p></dd>
<dt><code>cid</code></dt><dd><p>Compound ID as found in PubChem</p></dd>
<dt><code>name</code></dt><dd><p>Official name as used by WHONET/EARS-Net or the WHO</p></dd>
<dt><code>atc_group</code></dt><dd><p>Official pharmacological subgroup (3rd level ATC code) as defined by the WHOCC</p></dd>
<dt><code>synonyms</code></dt><dd><p>Synonyms (often trade names) of a drug, as found in PubChem based on their compound ID</p></dd>
<dt><code>oral_ddd</code></dt><dd><p>Defined Daily Dose (DDD), oral treatment</p></dd>
<dt><code>oral_units</code></dt><dd><p>Units of <code>oral_ddd</code></p></dd>
<dt><code>iv_ddd</code></dt><dd><p>Defined Daily Dose (DDD), parenteral treatment</p></dd>
<dt><code>iv_units</code></dt><dd><p>Units of <code>iv_ddd</code></p></dd>
</dl>
<h3>For the antivirals data set: a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 102 observations and 9 variables:</h3>
<ul>
<li><p><code>atc</code><br /> ATC code (Anatomical Therapeutic Chemical) as defined by the WHOCC</p></li>
<li><p><code>cid</code><br /> Compound ID as found in PubChem</p></li>
<li><p><code>name</code><br /> Official name as used by WHONET/EARS-Net or the WHO</p></li>
<li><p><code>atc_group</code><br /> Official pharmacological subgroup (3rd level ATC code) as defined by the WHOCC</p></li>
<li><p><code>synonyms</code><br /> Synonyms (often trade names) of a drug, as found in PubChem based on their compound ID</p></li>
<li><p><code>oral_ddd</code><br /> Defined Daily Dose (DDD), oral treatment</p></li>
<li><p><code>oral_units</code><br /> Units of <code>oral_ddd</code></p></li>
<li><p><code>iv_ddd</code><br /> Defined Daily Dose (DDD), parenteral treatment</p></li>
<li><p><code>iv_units</code><br /> Units of <code>iv_ddd</code></p></li>
</ul>
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
<p>World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology (WHOCC): <a href='https://www.whocc.no/atc_ddd_index/'>https://www.whocc.no/atc_ddd_index/</a></p>
@ -290,7 +294,7 @@
This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href='https://www.whocc.no'>https://www.whocc.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href='http://ec.europa.eu/health/documents/community-register/html/atc.htm'>http://ec.europa.eu/health/documents/community-register/html/atc.htm</a>).</p>
<p>These have become the gold standard for international drug utilisation monitoring and research.</p>
<p>The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.</p>
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See <a href='https://www.whocc.no/copyright_disclaimer/'>https://www.whocc.no/copyright_disclaimer/</a>.</strong></p>
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package.</strong> See <a href='https://www.whocc.no/copyright_disclaimer/.'>https://www.whocc.no/copyright_disclaimer/.</a></p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -298,7 +302,7 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='microorganisms.html'>microorganisms</a></code></p></div>
<div class='dont-index'><p><a href='microorganisms.html'>microorganisms</a></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9033</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>Use this function to determine the antibiotic code of one or more antibiotics. The data set <code><a href='antibiotics.html'>antibiotics</a></code> will be searched for abbreviations, official names and synonyms (brand names).</p>
<p>Use this function to determine the antibiotic code of one or more antibiotics. The data set <a href='antibiotics.html'>antibiotics</a> will be searched for abbreviations, official names and synonyms (brand names).</p>
</div>
<pre class="usage"><span class='fu'>as.ab</span>(<span class='no'>x</span>, <span class='no'>...</span>)
@ -256,11 +256,11 @@
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Character (vector) with class <code>"ab"</code>. Unknown values will return <code>NA</code>.</p>
<p>Character (vector) with class <code>ab</code>. Unknown values will return <code>NA</code>.</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>All entries in the <code><a href='antibiotics.html'>antibiotics</a></code> data set have three different identifiers: a human readable EARS-Net code (column <code>ab</code>, used by ECDC and WHONET), an ATC code (column <code>atc</code>, used by WHO), and a CID code (column <code>cid</code>, Compound ID, used by PubChem). The data set contains more than 5,000 official brand names from many different countries, as found in PubChem.</p>
<p>Use the <code><a href='ab_property.html'>ab_property</a></code> functions to get properties based on the returned antibiotic ID, see Examples.</p>
<p>All entries in the <a href='antibiotics.html'>antibiotics</a> data set have three different identifiers: a human readable EARS-Net code (column <code>ab</code>, used by ECDC and WHONET), an ATC code (column <code>atc</code>, used by WHO), and a CID code (column <code>cid</code>, Compound ID, used by PubChem). The data set contains more than 5,000 official brand names from many different countries, as found in PubChem.</p>
<p>Use the <code><a href='ab_property.html'>ab_property()</a></code> functions to get properties based on the returned antibiotic ID, see Examples.</p>
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
@ -276,7 +276,7 @@
This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href='https://www.whocc.no'>https://www.whocc.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href='http://ec.europa.eu/health/documents/community-register/html/atc.htm'>http://ec.europa.eu/health/documents/community-register/html/atc.htm</a>).</p>
<p>These have become the gold standard for international drug utilisation monitoring and research.</p>
<p>The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.</p>
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See <a href='https://www.whocc.no/copyright_disclaimer/'>https://www.whocc.no/copyright_disclaimer/</a>.</strong></p>
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package.</strong> See <a href='https://www.whocc.no/copyright_disclaimer/.'>https://www.whocc.no/copyright_disclaimer/.</a></p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -284,7 +284,7 @@ This package contains <strong>all ~550 antibiotic, antimycotic and antiviral dru
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='antibiotics.html'>antibiotics</a></code> for the dataframe that is being used to determine ATCs.</p></div>
<div class='dont-index'><p><a href='antibiotics.html'>antibiotics</a> for the dataframe that is being used to determine ATCs.</p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># These examples all return "ERY", the ID of Erythromycin:</span>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -259,7 +259,7 @@
<p>Ordered integer factor with new class <code>disk</code></p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>Interpret disk values as RSI values with <code><a href='as.rsi.html'>as.rsi</a></code>. It supports guidelines from EUCAST and CLSI.</p>
<p>Interpret disk values as RSI values with <code><a href='as.rsi.html'>as.rsi()</a></code>. It supports guidelines from EUCAST and CLSI.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -267,7 +267,7 @@
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='as.rsi.html'>as.rsi</a></code></p></div>
<div class='dont-index'><p><code><a href='as.rsi.html'>as.rsi()</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># interpret disk values</span>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>This transforms a vector to a new class <code>mic</code>, which is an ordered factor with valid MIC values as levels. Invalid MIC values will be translated as <code>NA</code> with a warning.</p>
<p>This transforms a vector to a new class <code>mic</code>, which is an ordered <code><a href='https://rdrr.io/r/base/factor.html'>factor</a></code> with valid MIC values as levels. Invalid MIC values will be translated as <code>NA</code> with a warning.</p>
</div>
<pre class="usage"><span class='fu'>as.mic</span>(<span class='no'>x</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
@ -256,10 +256,10 @@
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Ordered factor with new class <code>mic</code></p>
<p>Ordered <code><a href='https://rdrr.io/r/base/factor.html'>factor</a></code> with new class <code>mic</code></p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>Interpret MIC values as RSI values with <code><a href='as.rsi.html'>as.rsi</a></code>. It supports guidelines from EUCAST and CLSI.</p>
<p>To interpret MIC values as RSI values, use <code><a href='as.rsi.html'>as.rsi()</a></code> on MIC values. It supports guidelines from EUCAST and CLSI.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -267,7 +267,7 @@
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='as.rsi.html'>as.rsi</a></code></p></div>
<div class='dont-index'><p><code><a href='as.rsi.html'>as.rsi()</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='no'>mic_data</span> <span class='kw'>&lt;-</span> <span class='fu'>as.mic</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"&gt;=32"</span>, <span class='st'>"1.0"</span>, <span class='st'>"1"</span>, <span class='st'>"1.00"</span>, <span class='fl'>8</span>, <span class='st'>"&lt;=0.128"</span>, <span class='st'>"8"</span>, <span class='st'>"16"</span>, <span class='st'>"16"</span>))

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,11 +234,17 @@
</div>
<div class="ref-description">
<p>Use this function to determine a valid microorganism ID (<code>mo</code>). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see Source). The input can be almost anything: a full name (like <code>"Staphylococcus aureus"</code>), an abbreviated name (like <code>"S. aureus"</code>), an abbreviation known in the field (like <code>"MRSA"</code>), or just a genus. Please see Examples.</p>
<p>Use this function to determine a valid microorganism ID (<code>mo</code>). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see Source). The input can be almost anything: a full name (like <code>"Staphylococcus aureus"</code>), an abbreviated name (like <code>"S. aureus"</code>), an abbreviation known in the field (like <code>"MRSA"</code>), or just a genus. Please see <em>Examples</em>.</p>
</div>
<pre class="usage"><span class='fu'>as.mo</span>(<span class='no'>x</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>allow_uncertain</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>reference_df</span> <span class='kw'>=</span> <span class='fu'><a href='mo_source.html'>get_mo_source</a></span>(), <span class='no'>...</span>)
<pre class="usage"><span class='fu'>as.mo</span>(
<span class='no'>x</span>,
<span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>allow_uncertain</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>reference_df</span> <span class='kw'>=</span> <span class='fu'><a href='mo_source.html'>get_mo_source</a></span>(),
<span class='no'>...</span>
)
<span class='fu'>is.mo</span>(<span class='no'>x</span>)
@ -255,25 +261,25 @@
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>a character vector or a <code>data.frame</code> with one or two columns</p></td>
<td><p>a character vector or a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with one or two columns</p></td>
</tr>
<tr>
<th>Becker</th>
<td><p>a logical to indicate whether <em>Staphylococci</em> should be categorised into coagulase-negative <em>Staphylococci</em> ("CoNS") and coagulase-positive <em>Staphylococci</em> ("CoPS") instead of their own species, according to Karsten Becker <em>et al.</em> [1,2]. Note that this does not include species that were newly named after these publications, like <em>S. caeli</em>.</p>
<td><p>a logical to indicate whether <em>Staphylococci</em> should be categorised into coagulase-negative <em>Staphylococci</em> ("CoNS") and coagulase-positive <em>Staphylococci</em> ("CoPS") instead of their own species, according to Karsten Becker <em>et al.</em> (1,2). Note that this does not include species that were newly named after these publications, like <em>S. caeli</em>.</p>
<p>This excludes <em>Staphylococcus aureus</em> at default, use <code>Becker = "all"</code> to also categorise <em>S. aureus</em> as "CoPS".</p></td>
</tr>
<tr>
<th>Lancefield</th>
<td><p>a logical to indicate whether beta-haemolytic <em>Streptococci</em> should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield [3]. These <em>Streptococci</em> will be categorised in their first group, e.g. <em>Streptococcus dysgalactiae</em> will be group C, although officially it was also categorised into groups G and L.</p>
<td><p>a logical to indicate whether beta-haemolytic <em>Streptococci</em> should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield (3). These <em>Streptococci</em> will be categorised in their first group, e.g. <em>Streptococcus dysgalactiae</em> will be group C, although officially it was also categorised into groups G and L.</p>
<p>This excludes <em>Enterococci</em> at default (who are in group D), use <code>Lancefield = "all"</code> to also categorise all <em>Enterococci</em> as group D.</p></td>
</tr>
<tr>
<th>allow_uncertain</th>
<td><p>a number between 0 (or "none") and 3 (or "all"), or TRUE (= 2) or FALSE (= 0) to indicate whether the input should be checked for less probable results, see Details</p></td>
<td><p>a number between <code>0</code> (or <code>"none"</code>) and <code>3</code> (or <code>"all"</code>), or <code>TRUE</code> (= <code>2</code>) or <code>FALSE</code> (= <code>0</code>) to indicate whether the input should be checked for less probable results, please see <em>Details</em></p></td>
</tr>
<tr>
<th>reference_df</th>
<td><p>a <code>data.frame</code> to use for extra reference when translating <code>x</code> to a valid <code>mo</code>. See <code><a href='mo_source.html'>set_mo_source</a></code> and <code><a href='mo_source.html'>get_mo_source</a></code> to automate the usage of your own codes (e.g. used in your analysis or organisation).</p></td>
<td><p>a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> to use for extra reference when translating <code>x</code> to a valid <code>mo</code>. See <code><a href='mo_source.html'>set_mo_source()</a></code> and <code><a href='mo_source.html'>get_mo_source()</a></code> to automate the usage of your own codes (e.g. used in your analysis or organisation).</p></td>
</tr>
<tr>
<th>...</th>
@ -283,12 +289,14 @@
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Character (vector) with class <code>"mo"</code></p>
<p>A <code><a href='https://rdrr.io/r/base/character.html'>character</a></code> vector with class <code>mo</code></p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p><strong>General info</strong> <br />
A microorganism ID from this package (class: <code>mo</code>) typically looks like these examples:<br /></p><pre>
Code Full name
<h3>General info</h3>
<p>A microorganism ID from this package (class: <code>mo</code>) typically looks like these examples:</p><pre> Code Full name
--------------- --------------------------------------
B_KLBSL Klebsiella
B_KLBSL_PNMN Klebsiella pneumoniae
@ -303,26 +311,27 @@ A microorganism ID from this package (class: <code>mo</code>) typically looks li
</pre>
<p>Values that cannot be coered will be considered 'unknown' and will get the MO code <code>UNKNOWN</code>.</p>
<p>Use the <code><a href='mo_property.html'>mo_property</a>_*</code> functions to get properties based on the returned code, see Examples.</p>
<p>The algorithm uses data from the Catalogue of Life (see below) and from one other source (see <code><a href='microorganisms.html'>microorganisms</a></code>).</p>
<p>The <code>as.mo()</code> function uses several coercion rules for fast and logical results. It assesses the input matching criteria in the following order:</p><ul>
<p>Use the <code><a href='mo_property.html'>mo_property_*</a></code> functions to get properties based on the returned code, see Examples.</p>
<p>The algorithm uses data from the Catalogue of Life (see below) and from one other source (see <a href='microorganisms.html'>microorganisms</a>).</p>
<p>The <code>as.mo()</code> function uses several coercion rules for fast and logical results. It assesses the input matching criteria in the following order:</p><ol>
<li><p>Human pathogenic prevalence: the function starts with more prevalent microorganisms, followed by less prevalent ones;</p></li>
<li><p>Taxonomic kingdom: the function starts with determining Bacteria, then Fungi, then Protozoa, then others;</p></li>
<li><p>Breakdown of input values to identify possible matches.</p></li>
</ul>
</ol>
<p>This will lead to the effect that e.g. <code>"E. coli"</code> (a highly prevalent microorganism found in humans) will return the microbial ID of <em>Escherichia coli</em> and not <em>Entamoeba coli</em> (a less prevalent microorganism in humans), although the latter would alphabetically come first.</p>
<p><strong>Coping with uncertain results</strong> <br />
In addition, the <code>as.mo()</code> function can differentiate four levels of uncertainty to guess valid results:</p>
<ul>
<h3>Coping with uncertain results</h3>
<p>In addition, the <code>as.mo()</code> function can differentiate four levels of uncertainty to guess valid results:</p><ul>
<li><p>Uncertainty level 0: no additional rules are applied;</p></li>
<li><p>Uncertainty level 1: allow previously accepted (but now invalid) taxonomic names and minor spelling errors;</p></li>
<li><p>Uncertainty level 2: allow all of level 1, strip values between brackets, inverse the words of the input, strip off text elements from the end keeping at least two elements;</p></li>
<li><p>Uncertainty level 3: allow all of level 1 and 2, strip off text elements from the end, allow any part of a taxonomic name.</p></li>
</ul>
<p>This leads to e.g.:</p>
<ul>
<p>This leads to e.g.:</p><ul>
<li><p><code>"Streptococcus group B (known as S. agalactiae)"</code>. The text between brackets will be removed and a warning will be thrown that the result <em>Streptococcus group B</em> (<code>B_STRPT_GRPB</code>) needs review.</p></li>
<li><p><code>"S. aureus - please mind: MRSA"</code>. The last word will be stripped, after which the function will try to find a match. If it does not, the second last word will be stripped, etc. Again, a warning will be thrown that the result <em>Staphylococcus aureus</em> (<code>B_STPHY_AURS</code>) needs review.</p></li>
<li><p><code>"Fluoroquinolone-resistant Neisseria gonorrhoeae"</code>. The first word will be stripped, after which the function will try to find a match. A warning will be thrown that the result <em>Neisseria gonorrhoeae</em> (<code>B_NESSR_GNRR</code>) needs review.</p></li>
@ -330,35 +339,45 @@ In addition, the <code>as.mo()</code> function can differentiate four levels of
<p>The level of uncertainty can be set using the argument <code>allow_uncertain</code>. The default is <code>allow_uncertain = TRUE</code>, which is equal to uncertainty level 2. Using <code>allow_uncertain = FALSE</code> is equal to uncertainty level 0 and will skip all rules. You can also use e.g. <code>as.mo(..., allow_uncertain = 1)</code> to only allow up to level 1 uncertainty.</p>
<p>There are three helper functions that can be run after then <code>as.mo()</code> function:</p><ul>
<li><p>Use <code>mo_uncertainties()</code> to get a <code>data.frame</code> with all values that were coerced to a valid value, but with uncertainty. The output contains a score, that is calculated as <code>(n - 0.5 * L) / n</code>, where <em>n</em> is the number of characters of the returned full name of the microorganism, and <em>L</em> is the <a href='https://en.wikipedia.org/wiki/Levenshtein_distance'>Levenshtein distance</a> between that full name and the user input.</p></li>
<li><p>Use <code>mo_failures()</code> to get a vector with all values that could not be coerced to a valid value.</p></li>
<li><p>Use <code>mo_renamed()</code> to get a <code>data.frame</code> with all values that could be coerced based on an old, previously accepted taxonomic name.</p></li>
</ul>
<li><p>Use <code>mo_uncertainties()</code> to get a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with all values that were coerced to a valid value, but with uncertainty. The output contains a score, that is calculated as \((n - 0.5 * L) / n\), where <em>n</em> is the number of characters of the returned full name of the microorganism, and <em>L</em> is the <a href='https://en.wikipedia.org/wiki/Levenshtein_distance'>Levenshtein distance</a> between that full name and the user input.</p></li>
<li><p>Use <code>mo_failures()</code> to get a <code><a href='https://rdrr.io/r/base/vector.html'>vector</a></code> with all values that could not be coerced to a valid value.</p></li>
<li><p>Use <code>mo_renamed()</code> to get a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with all values that could be coerced based on an old, previously accepted taxonomic name.</p></li>
</ul>
<p><strong>Microbial prevalence of pathogens in humans</strong> <br />
The intelligent rules consider the prevalence of microorganisms in humans grouped into three groups, which is available as the <code>prevalence</code> columns in the <code><a href='microorganisms.html'>microorganisms</a></code> and <code><a href='microorganisms.old.html'>microorganisms.old</a></code> data sets. The grouping into prevalence groups is based on experience from several microbiological laboratories in the Netherlands in conjunction with international reports on pathogen prevalence.</p>
<h3>Microbial prevalence of pathogens in humans</h3>
<p>The intelligent rules consider the prevalence of microorganisms in humans grouped into three groups, which is available as the <code>prevalence</code> columns in the <a href='microorganisms.html'>microorganisms</a> and <a href='microorganisms.old.html'>microorganisms.old</a> data sets. The grouping into prevalence groups is based on experience from several microbiological laboratories in the Netherlands in conjunction with international reports on pathogen prevalence.</p>
<p>Group 1 (most prevalent microorganisms) consists of all microorganisms where the taxonomic class is Gammaproteobacteria or where the taxonomic genus is <em>Enterococcus</em>, <em>Staphylococcus</em> or <em>Streptococcus</em>. This group consequently contains all common Gram-negative bacteria, such as <em>Pseudomonas</em> and <em>Legionella</em> and all species within the order Enterobacteriales.</p>
<p>Group 2 consists of all microorganisms where the taxonomic phylum is Proteobacteria, Firmicutes, Actinobacteria or Sarcomastigophora, or where the taxonomic genus is <em>Aspergillus</em>, <em>Bacteroides</em>, <em>Candida</em>, <em>Capnocytophaga</em>, <em>Chryseobacterium</em>, <em>Cryptococcus</em>, <em>Elisabethkingia</em>, <em>Flavobacterium</em>, <em>Fusobacterium</em>, <em>Giardia</em>, <em>Leptotrichia</em>, <em>Mycoplasma</em>, <em>Prevotella</em>, <em>Rhodotorula</em>, <em>Treponema</em>, <em>Trichophyton</em> or <em>Ureaplasma</em>.</p>
<p>Group 3 (least prevalent microorganisms) consists of all other microorganisms.</p>
<p><strong>Self-learning algorithm</strong> <br />
The <code>as.mo()</code> function gains experience from previously determined microorganism IDs and learns from it. This drastically improves both speed and reliability. Use <code>clear_mo_history()</code> to reset the algorithms. Only experience from your current <code>AMR</code> package version is used. This is done because in the future the taxonomic tree (which is included in this package) may change for any organism and it consequently has to rebuild its knowledge.</p>
<h3>Self-learning algorithm</h3>
<p>The <code>as.mo()</code> function gains experience from previously determined microorganism IDs and learns from it. This drastically improves both speed and reliability. Use <code>clear_mo_history()</code> to reset the algorithms. Only experience from your current <code>AMR</code> package version is used. This is done because in the future the taxonomic tree (which is included in this package) may change for any organism and it consequently has to rebuild its knowledge.</p>
<p>Usually, any guess after the first try runs 80-95% faster than the first try.</p>
<p>This resets with every update of this <code>AMR</code> package since results are saved to your local package library folder.</p>
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
<p>[1] Becker K <em>et al.</em> <strong>Coagulase-Negative Staphylococci</strong>. 2014. Clin Microbiol Rev. 27(4): 870926. <a href='https://dx.doi.org/10.1128/CMR.00109-13'>https://dx.doi.org/10.1128/CMR.00109-13</a></p>
<p>[2] Becker K <em>et al.</em> <strong>Implications of identifying the recently defined members of the <em>S. aureus</em> complex, <em>S. argenteus</em> and <em>S. schweitzeri</em>: A position paper of members of the ESCMID Study Group for staphylococci and Staphylococcal Diseases (ESGS).</strong> 2019. Clin Microbiol Infect. <a href='https://doi.org/10.1016/j.cmi.2019.02.028'>https://doi.org/10.1016/j.cmi.2019.02.028</a></p>
<p>[3] Lancefield RC <strong>A serological differentiation of human and other groups of hemolytic streptococci</strong>. 1933. J Exp Med. 57(4): 57195. <a href='https://dx.doi.org/10.1084/jem.57.4.571'>https://dx.doi.org/10.1084/jem.57.4.571</a></p>
<p>[4] Catalogue of Life: Annual Checklist (public online taxonomic database), <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a> (check included annual version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a>()</code>).</p>
<ol>
<li><p>Becker K <em>et al.</em> <strong>Coagulase-Negative Staphylococci</strong>. 2014. Clin Microbiol Rev. 27(4): 870926. <a href='https://dx.doi.org/10.1128/CMR.00109-13'>https://dx.doi.org/10.1128/CMR.00109-13</a></p></li>
<li><p>Becker K <em>et al.</em> <strong>Implications of identifying the recently defined members of the <em>S. aureus</em> complex, <em>S. argenteus</em> and <em>S. schweitzeri</em>: A position paper of members of the ESCMID Study Group for staphylococci and Staphylococcal Diseases (ESGS).</strong> 2019. Clin Microbiol Infect. <a href='https://doi.org/10.1016/j.cmi.2019.02.028'>https://doi.org/10.1016/j.cmi.2019.02.028</a></p></li>
<li><p>Lancefield RC <strong>A serological differentiation of human and other groups of hemolytic streptococci</strong>. 1933. J Exp Med. 57(4): 57195. <a href='https://dx.doi.org/10.1084/jem.57.4.571'>https://dx.doi.org/10.1084/jem.57.4.571</a></p></li>
<li><p>Catalogue of Life: Annual Checklist (public online taxonomic database), <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a> (check included annual version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>).</p></li>
</ol>
<h2 class="hasAnchor" id="catalogue-of-life"><a class="anchor" href="#catalogue-of-life"></a>Catalogue of Life</h2>
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a>()</code>.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -366,8 +385,8 @@ This package contains the complete taxonomic tree of almost all microorganisms (
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='microorganisms.html'>microorganisms</a></code> for the <code>data.frame</code> that is being used to determine ID's. <br />
The <code><a href='mo_property.html'>mo_property</a></code> functions (like <code><a href='mo_property.html'>mo_genus</a></code>, <code><a href='mo_property.html'>mo_gramstain</a></code>) to get properties based on the returned code.</p></div>
<div class='dont-index'><p><a href='microorganisms.html'>microorganisms</a> for the <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> that is being used to determine ID's.</p>
<p>The <code><a href='mo_property.html'>mo_property()</a></code> functions (like <code><a href='mo_property.html'>mo_genus()</a></code>, <code><a href='mo_property.html'>mo_gramstain()</a></code>) to get properties based on the returned code.</p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># \donttest{</span>

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Class 'rsi' — as.rsi" />
<meta property="og:description" content="Interpret MIC values according to EUCAST or CLSI, or clean up existing RSI values. This transforms the input to a new class rsi, which is an ordered factor with levels S &amp;lt; I &amp;lt; R. Invalid antimicrobial interpretations will be translated as NA with a warning." />
<meta property="og:description" content="Interpret MIC values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing RSI values. This transforms the input to a new class rsi, which is an ordered factor with levels S &amp;lt; I &amp;lt; R. Invalid antimicrobial interpretations will be translated as NA with a warning." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>Interpret MIC values according to EUCAST or CLSI, or clean up existing RSI values. This transforms the input to a new class <code>rsi</code>, which is an ordered factor with levels <code>S &lt; I &lt; R</code>. Invalid antimicrobial interpretations will be translated as <code>NA</code> with a warning.</p>
<p>Interpret MIC values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing RSI values. This transforms the input to a new class <code>rsi</code>, which is an ordered factor with levels <code>S &lt; I &lt; R</code>. Invalid antimicrobial interpretations will be translated as <code>NA</code> with a warning.</p>
</div>
<pre class="usage"><span class='fu'>as.rsi</span>(<span class='no'>x</span>, <span class='no'>...</span>)
@ -246,8 +246,7 @@
<span class='fu'>as.rsi</span>(<span class='no'>x</span>, <span class='no'>mo</span>, <span class='no'>ab</span>, <span class='kw'>guideline</span> <span class='kw'>=</span> <span class='st'>"EUCAST"</span>, <span class='no'>...</span>)
<span class='co'># S3 method for data.frame</span>
<span class='fu'>as.rsi</span>(<span class='no'>x</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>guideline</span> <span class='kw'>=</span> <span class='st'>"EUCAST"</span>,
<span class='no'>...</span>)
<span class='fu'>as.rsi</span>(<span class='no'>x</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>guideline</span> <span class='kw'>=</span> <span class='st'>"EUCAST"</span>, <span class='no'>...</span>)
<span class='fu'>is.rsi</span>(<span class='no'>x</span>)
@ -258,7 +257,7 @@
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>vector of values (for class <code>mic</code>: an MIC value in mg/L, for class <code>disk</code>: a disk diffusion radius in millimeters)</p></td>
<td><p>vector of values (for class <code>mic</code>: an MIC value in mg/L, for class <code><a href='as.disk.html'>disk</a></code>: a disk diffusion radius in millimeters)</p></td>
</tr>
<tr>
<th>...</th>
@ -266,11 +265,11 @@
</tr>
<tr>
<th>mo</th>
<td><p>a microorganism code, generated with <code><a href='as.mo.html'>as.mo</a></code></p></td>
<td><p>a microorganism code, generated with <code><a href='as.mo.html'>as.mo()</a></code></p></td>
</tr>
<tr>
<th>ab</th>
<td><p>an antimicrobial code, generated with <code><a href='as.ab.html'>as.ab</a></code></p></td>
<td><p>an antimicrobial code, generated with <code><a href='as.ab.html'>as.ab()</a></code></p></td>
</tr>
<tr>
<th>guideline</th>
@ -278,11 +277,11 @@
</tr>
<tr>
<th>col_mo</th>
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo()</a></code>), defaults to the first column of class <code><a href='as.mo.html'>mo</a></code>. Values will be coerced using <code><a href='as.mo.html'>as.mo()</a></code>.</p></td>
</tr>
<tr>
<th>threshold</th>
<td><p>maximum fraction of invalid antimicrobial interpretations of <code>x</code>, see Examples</p></td>
<td><p>maximum fraction of invalid antimicrobial interpretations of <code>x</code>, please see <em>Examples</em></p></td>
</tr>
</table>
@ -292,21 +291,20 @@
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>Run <code><a href='https://rdrr.io/r/base/unique.html'>unique(AMR::rsi_translation$guideline)</a></code> for a list of all supported guidelines.</p>
<p>After using <code>as.rsi</code>, you can use <code><a href='eucast_rules.html'>eucast_rules</a></code> to (1) apply inferred susceptibility and resistance based on results of other antimicrobials and (2) apply intrinsic resistance based on taxonomic properties of a microorganism.</p>
<p>The function <code>is.rsi.eligible</code> returns <code>TRUE</code> when a columns contains at most 5% invalid antimicrobial interpretations (not S and/or I and/or R), and <code>FALSE</code> otherwise. The threshold of 5% can be set with the <code>threshold</code> parameter.</p>
<p>After using <code>as.rsi()</code>, you can use <code><a href='eucast_rules.html'>eucast_rules()</a></code> to (1) apply inferred susceptibility and resistance based on results of other antimicrobials and (2) apply intrinsic resistance based on taxonomic properties of a microorganism.</p>
<p>The function <code>is.rsi.eligible()</code> returns <code>TRUE</code> when a columns contains at most 5% invalid antimicrobial interpretations (not S and/or I and/or R), and <code>FALSE</code> otherwise. The threshold of 5% can be set with the <code>threshold</code> parameter.</p>
<h2 class="hasAnchor" id="interpretation-of-s-i-and-r"><a class="anchor" href="#interpretation-of-s-i-and-r"></a>Interpretation of S, I and R</h2>
<p>In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p>
<ul>
<p>In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p><ul>
<li><p><strong>S</strong> - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.</p></li>
<li><p><strong>I</strong> - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.</p></li>
<li><p><strong>R</strong> - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure.</p></li>
</ul>
<p>Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.</p>
<p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility</a>()</code> (equal to <code><a href='proportion.html'>proportion_SI</a>()</code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible</a>()</code> (equal to <code><a href='count.html'>count_SI</a>()</code>) to count susceptible isolates.</p>
<p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility()</a></code> (equal to <code><a href='proportion.html'>proportion_SI()</a></code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible()</a></code> (equal to <code><a href='count.html'>count_SI()</a></code>) to count susceptible isolates.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -314,7 +312,7 @@
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='as.mic.html'>as.mic</a></code></p></div>
<div class='dont-index'><p><code><a href='as.mic.html'>as.mic()</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='no'>rsi_data</span> <span class='kw'>&lt;-</span> <span class='fu'>as.rsi</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span>(<span class='st'>"S"</span>, <span class='fl'>474</span>), <span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span>(<span class='st'>"I"</span>, <span class='fl'>36</span>), <span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span>(<span class='st'>"R"</span>, <span class='fl'>370</span>)))

View File

@ -51,7 +51,8 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Get ATC properties from WHOCC website — atc_online_property" />
<meta property="og:description" content="Gets data from the WHO to determine properties of an ATC (e.g. an antibiotic) like name, defined daily dose (DDD) or standard unit. This function requires an internet connection." />
<meta property="og:description" content="Gets data from the WHO to determine properties of an ATC (e.g. an antibiotic) like name, defined daily dose (DDD) or standard unit.
This function requires an internet connection." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +86,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,11 +235,16 @@
</div>
<div class="ref-description">
<p>Gets data from the WHO to determine properties of an ATC (e.g. an antibiotic) like name, defined daily dose (DDD) or standard unit. <br /> <strong>This function requires an internet connection.</strong></p>
<p>Gets data from the WHO to determine properties of an ATC (e.g. an antibiotic) like name, defined daily dose (DDD) or standard unit.</p>
<p><strong>This function requires an internet connection.</strong></p>
</div>
<pre class="usage"><span class='fu'>atc_online_property</span>(<span class='no'>atc_code</span>, <span class='no'>property</span>, <span class='kw'>administration</span> <span class='kw'>=</span> <span class='st'>"O"</span>,
<span class='kw'>url</span> <span class='kw'>=</span> <span class='st'>"https://www.whocc.no/atc_ddd_index/?code=%s&amp;showdescription=no"</span>)
<pre class="usage"><span class='fu'>atc_online_property</span>(
<span class='no'>atc_code</span>,
<span class='no'>property</span>,
<span class='kw'>administration</span> <span class='kw'>=</span> <span class='st'>"O"</span>,
<span class='kw'>url</span> <span class='kw'>=</span> <span class='st'>"https://www.whocc.no/atc_ddd_index/?code=%s&amp;showdescription=no"</span>
)
<span class='fu'>atc_online_groups</span>(<span class='no'>atc_code</span>, <span class='no'>...</span>)
@ -290,7 +296,7 @@
<p>Abbreviations of return values when using <code>property = "U"</code> (unit):</p><ul>
<li><p><code>"g"</code> = gram</p></li>
<li><p><code>"mg"</code> = milligram</p></li>
<li><p><code>"mcg"</code> = microgram</p></li>
<li><p>`"mcg"`` = microgram</p></li>
<li><p><code>"U"</code> = unit</p></li>
<li><p><code>"TU"</code> = thousand units</p></li>
<li><p><code>"MU"</code> = million units</p></li>

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Check availability of columns — availability" />
<meta property="og:description" content="Easy check for availability of columns in a data set. This makes it easy to get an idea of which antimicrobial combination can be used for calculation with e.g. resistance." />
<meta property="og:description" content="Easy check for availability of columns in a data set. This makes it easy to get an idea of which antimicrobial combination can be used for calculation with e.g. resistance()." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>Easy check for availability of columns in a data set. This makes it easy to get an idea of which antimicrobial combination can be used for calculation with e.g. <code><a href='proportion.html'>resistance</a></code>.</p>
<p>Easy check for availability of columns in a data set. This makes it easy to get an idea of which antimicrobial combination can be used for calculation with e.g. <code><a href='proportion.html'>resistance()</a></code>.</p>
</div>
<pre class="usage"><span class='fu'>availability</span>(<span class='no'>tbl</span>, <span class='kw'>width</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
@ -244,7 +244,7 @@
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>tbl</th>
<td><p>a <code>data.frame</code> or <code>list</code></p></td>
<td><p>a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> or <code><a href='https://rdrr.io/r/base/list.html'>list</a></code></p></td>
</tr>
<tr>
<th>width</th>
@ -254,10 +254,10 @@
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p><code>data.frame</code> with column names of <code>tbl</code> as row names</p>
<p><code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with column names of <code>tbl</code> as row names</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>The function returns a <code>data.frame</code> with columns <code>"resistant"</code> and <code>"visual_resistance"</code>. The values in that columns are calculated with <code><a href='proportion.html'>resistance</a></code>.</p>
<p>The function returns a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with columns <code>"resistant"</code> and <code>"visual_resistance"</code>. The values in that columns are calculated with <code><a href='proportion.html'>resistance()</a></code>.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Determine bug-drug combinations — bug_drug_combinations" />
<meta property="og:description" content="Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use format on the result to prettify it to a publicable/printable format, see Examples." />
<meta property="og:description" content="Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use format() on the result to prettify it to a publicable/printable format, see Examples." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,18 +234,25 @@
</div>
<div class="ref-description">
<p>Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use <code>format</code> on the result to prettify it to a publicable/printable format, see Examples.</p>
<p>Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use <code><a href='https://rdrr.io/r/base/format.html'>format()</a></code> on the result to prettify it to a publicable/printable format, see Examples.</p>
</div>
<pre class="usage"><span class='fu'>bug_drug_combinations</span>(<span class='no'>x</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>FUN</span> <span class='kw'>=</span> <span class='no'>mo_shortname</span>, <span class='no'>...</span>)
<span class='co'># S3 method for bug_drug_combinations</span>
<span class='fu'><a href='https://rdrr.io/r/base/format.html'>format</a></span>(<span class='no'>x</span>,
<span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name (ab, atc)"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(),
<span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>add_ab_group</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>remove_intrinsic_resistant</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>decimal.mark</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/options.html'>getOption</a></span>(<span class='st'>"OutDec"</span>), <span class='kw'>big.mark</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span>(<span class='no'>decimal.mark</span> <span class='kw'>==</span>
<span class='st'>","</span>, <span class='st'>"."</span>, <span class='st'>","</span>), <span class='no'>...</span>)</pre>
<span class='fu'><a href='https://rdrr.io/r/base/format.html'>format</a></span>(
<span class='no'>x</span>,
<span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name (ab, atc)"</span>,
<span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(),
<span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>,
<span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>add_ab_group</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>remove_intrinsic_resistant</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>decimal.mark</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/options.html'>getOption</a></span>(<span class='st'>"OutDec"</span>),
<span class='kw'>big.mark</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span>(<span class='no'>decimal.mark</span> <span class='kw'>==</span> <span class='st'>","</span>, <span class='st'>"."</span>, <span class='st'>","</span>),
<span class='no'>...</span>
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
@ -256,11 +263,11 @@
</tr>
<tr>
<th>col_mo</th>
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo()</a></code>), defaults to the first column of class <code><a href='as.mo.html'>mo</a></code>. Values will be coerced using <code><a href='as.mo.html'>as.mo()</a></code>.</p></td>
</tr>
<tr>
<th>FUN</th>
<td><p>the function to call on the <code>mo</code> column to transform the microorganism IDs, defaults to <code><a href='mo_property.html'>mo_shortname</a></code></p></td>
<td><p>the function to call on the <code>mo</code> column to transform the microorganism IDs, defaults to <code><a href='mo_property.html'>mo_shortname()</a></code></p></td>
</tr>
<tr>
<th>...</th>
@ -268,11 +275,11 @@
</tr>
<tr>
<th>translate_ab</th>
<td><p>a character of length 1 containing column names of the <code><a href='antibiotics.html'>antibiotics</a></code> data set</p></td>
<td><p>a character of length 1 containing column names of the <a href='antibiotics.html'>antibiotics</a> data set</p></td>
</tr>
<tr>
<th>language</th>
<td><p>language of the returned text, defaults to system language (see <code><a href='translate.html'>get_locale</a></code>) and can also be set with <code><a href='https://rdrr.io/r/base/options.html'>getOption</a>("AMR_locale")</code>. Use <code>language = NULL</code> or <code>language = ""</code> to prevent translation.</p></td>
<td><p>language of the returned text, defaults to system language (see <code><a href='translate.html'>get_locale()</a></code>) and can also be set with <code><a href='https://rdrr.io/r/base/options.html'>getOption("AMR_locale")</a></code>. Use <code>language = NULL</code> or <code>language = ""</code> to prevent translation.</p></td>
</tr>
<tr>
<th>minimum</th>
@ -312,10 +319,10 @@
<p><strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition</strong>, 2014, <em>Clinical and Laboratory Standards Institute (CLSI)</em>. <a href='https://clsi.org/standards/products/microbiology/documents/m39/'>https://clsi.org/standards/products/microbiology/documents/m39/</a>.</p>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>The function <code>bug_drug_combinations</code> returns a <code>data.frame</code> with columns "mo", "ab", "S", "I", "R" and "total".</p>
<p>The function <code>bug_drug_combinations()</code> returns a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with columns "mo", "ab", "S", "I", "R" and "total".</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>The function <code>format</code> calculates the resistance per bug-drug combination. Use <code>combine_IR = FALSE</code> (default) to test R vs. S+I and <code>combine_IR = TRUE</code> to test R+I vs. S.</p>
<p>The function <code><a href='https://rdrr.io/r/base/format.html'>format()</a></code> calculates the resistance per bug-drug combination. Use <code>combine_IR = FALSE</code> (default) to test R vs. S+I and <code>combine_IR = TRUE</code> to test R+I vs. S.</p>
<p>The language of the output can be overwritten with <code><a href='https://rdrr.io/r/base/options.html'>options(AMR_locale)</a></code>, please see <a href='translate.html'>translate</a>.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -245,7 +245,7 @@
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p>
<p>Click here for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a>()</code>.</p>
<p>Click here for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p>
<h2 class="hasAnchor" id="included-taxa"><a class="anchor" href="#included-taxa"></a>Included taxa</h2>
@ -268,8 +268,8 @@ This package contains the complete taxonomic tree of almost all microorganisms (
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Data set <code><a href='microorganisms.html'>microorganisms</a></code> for the actual data. <br />
Function <code><a href='as.mo.html'>as.mo</a>()</code> to use the data for intelligent determination of microorganisms.</p></div>
<div class='dont-index'><p>Data set <a href='microorganisms.html'>microorganisms</a> for the actual data. <br />
Function <code><a href='as.mo.html'>as.mo()</a></code> to use the data for intelligent determination of microorganisms.</p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># Get version info of included data set</span>
@ -295,7 +295,7 @@ Function <code><a href='as.mo.html'>as.mo</a>()</code> to use the data for intel
<span class='fu'><a href='mo_property.html'>mo_ref</a></span>(<span class='st'>"E. coli"</span>)
<span class='co'># [1] "Castellani et al., 1919"</span>
<span class='co'># Do not get mistaken - the package only includes microorganisms</span>
<span class='co'># Do not get mistaken - this package is about microorganisms</span>
<span class='fu'><a href='mo_property.html'>mo_kingdom</a></span>(<span class='st'>"C. elegans"</span>)
<span class='co'># [1] "Bacteria" # Bacteria?!</span>
<span class='fu'><a href='mo_property.html'>mo_name</a></span>(<span class='st'>"C. elegans"</span>)

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -242,10 +242,10 @@
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>a <code>list</code>, which prints in pretty format</p>
<p>a <code><a href='https://rdrr.io/r/base/list.html'>list</a></code>, which prints in pretty format</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>For DSMZ, see <code><a href='microorganisms.html'>?microorganisms</a></code>.</p>
<p>For DSMZ, see <a href='microorganisms.html'>microorganisms</a>.</p>
<h2 class="hasAnchor" id="catalogue-of-life"><a class="anchor" href="#catalogue-of-life"></a>Catalogue of Life</h2>
@ -260,7 +260,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='microorganisms.html'>microorganisms</a></code></p></div>
<div class='dont-index'><p><a href='microorganisms.html'>microorganisms</a></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>dplyr</span>)

View File

@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Count isolates — count • AMR (for R)</title>
<title>Count available isolates — count • AMR (for R)</title>
<!-- favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
@ -50,8 +50,8 @@
<link href="../extra.css" rel="stylesheet">
<script src="../extra.js"></script>
<meta property="og:title" content="Count isolates — count" />
<meta property="og:description" content="These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in dplyrs summarise and support grouped variables, see Examples.
<meta property="og:title" content="Count available isolates — count" />
<meta property="og:description" content="These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in summarise() and support grouped variables, see Examples.
count_resistant() should be used to count resistant isolates, count_susceptible() should be used to count susceptible isolates." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -86,7 +86,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -229,14 +229,14 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Count isolates</h1>
<h1>Count available isolates</h1>
<div class="hidden name"><code>count.Rd</code></div>
</div>
<div class="ref-description">
<p>These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in <code>dplyr</code>s <code><a href='https://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></code> and support grouped variables, see <em>Examples</em>.</p>
<p><code>count_resistant()</code> should be used to count resistant isolates, <code>count_susceptible()</code> should be used to count susceptible isolates.<br /></p>
<p>These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in <code>summarise()</code> and support grouped variables, see <em>Examples</em>.</p>
<p><code>count_resistant()</code> should be used to count resistant isolates, <code>count_susceptible()</code> should be used to count susceptible isolates.</p>
</div>
<pre class="usage"><span class='fu'>count_resistant</span>(<span class='no'>...</span>, <span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
@ -257,31 +257,36 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<span class='fu'>n_rsi</span>(<span class='no'>...</span>, <span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>count_df</span>(<span class='no'>data</span>, <span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(),
<span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<span class='fu'>count_df</span>(
<span class='no'>data</span>,
<span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name"</span>,
<span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(),
<span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>...</th>
<td><p>one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with <code><a href='as.rsi.html'>as.rsi</a></code> if needed.</p></td>
<td><p>one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with <code><a href='as.rsi.html'>as.rsi()</a></code> if needed.</p></td>
</tr>
<tr>
<th>only_all_tested</th>
<td><p>(for combination therapies, i.e. using more than one variable for <code>...</code>) a logical to indicate that isolates must be tested for all antibiotics, see section <em>Combination therapy</em> below</p></td>
<td><p>(for combination therapies, i.e. using more than one variable for <code>...</code>): a logical to indicate that isolates must be tested for all antibiotics, see section <em>Combination therapy</em> below</p></td>
</tr>
<tr>
<th>data</th>
<td><p>a <code>data.frame</code> containing columns with class <code>rsi</code> (see <code><a href='as.rsi.html'>as.rsi</a></code>)</p></td>
<td><p>a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> containing columns with class <code>rsi</code> (see <code><a href='as.rsi.html'>as.rsi()</a></code>)</p></td>
</tr>
<tr>
<th>translate_ab</th>
<td><p>a column name of the <code><a href='antibiotics.html'>antibiotics</a></code> data set to translate the antibiotic abbreviations to, using <code><a href='ab_property.html'>ab_property</a></code></p></td>
<td><p>a column name of the <a href='antibiotics.html'>antibiotics</a> data set to translate the antibiotic abbreviations to, using <code><a href='ab_property.html'>ab_property()</a></code></p></td>
</tr>
<tr>
<th>language</th>
<td><p>language of the returned text, defaults to system language (see <code><a href='translate.html'>get_locale</a></code>) and can also be set with <code><a href='https://rdrr.io/r/base/options.html'>getOption</a>("AMR_locale")</code>. Use <code>language = NULL</code> or <code>language = ""</code> to prevent translation.</p></td>
<td><p>language of the returned text, defaults to system language (see <code><a href='translate.html'>get_locale()</a></code>) and can also be set with <code><a href='https://rdrr.io/r/base/options.html'>getOption("AMR_locale")</a></code>. Use <code>language = NULL</code> or <code>language = ""</code> to prevent translation.</p></td>
</tr>
<tr>
<th>combine_SI</th>
@ -295,33 +300,30 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Integer</p>
<p>An <code><a href='https://rdrr.io/r/base/integer.html'>integer</a></code></p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>These functions are meant to count isolates. Use the <code><a href='proportion.html'>resistance</a></code>/<code><a href='proportion.html'>susceptibility</a></code> functions to calculate microbial resistance/susceptibility.</p>
<p>These functions are meant to count isolates. Use the <code><a href='proportion.html'>resistance()</a></code>/<code><a href='proportion.html'>susceptibility()</a></code> functions to calculate microbial resistance/susceptibility.</p>
<p>The function <code>count_resistant()</code> is equal to the function <code>count_R()</code>. The function <code>count_susceptible()</code> is equal to the function <code>count_SI()</code>.</p>
<p>The function <code>n_rsi()</code> is an alias of <code>count_all()</code>. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to <code><a href='https://dplyr.tidyverse.org/reference/n_distinct.html'>n_distinct</a>()</code>. Their function is equal to <code>count_susceptible(...) + count_resistant(...)</code>.</p>
<p>The function <code>count_df()</code> takes any variable from <code>data</code> that has an <code>"rsi"</code> class (created with <code><a href='as.rsi.html'>as.rsi</a>()</code>) and counts the number of S's, I's and R's. The function <code><a href='proportion.html'>rsi_df()</a></code> works exactly like <code>count_df()</code>, but adds the percentage of S, I and R.</p>
<p>The function <code>n_rsi()</code> is an alias of <code>count_all()</code>. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to <code><a href='https://dplyr.tidyverse.org/reference/n_distinct.html'>n_distinct()</a></code>. Their function is equal to <code>count_susceptible(...) + count_resistant(...)</code>.</p>
<p>The function <code>count_df()</code> takes any variable from <code>data</code> that has an <code>rsi</code> class (created with <code><a href='as.rsi.html'>as.rsi()</a></code>) and counts the number of S's, I's and R's. The function <code><a href='proportion.html'>rsi_df()</a></code> works exactly like <code>count_df()</code>, but adds the percentage of S, I and R.</p>
<h2 class="hasAnchor" id="interpretation-of-s-i-and-r"><a class="anchor" href="#interpretation-of-s-i-and-r"></a>Interpretation of S, I and R</h2>
<p>In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p>
<ul>
<p>In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p><ul>
<li><p><strong>S</strong> - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.</p></li>
<li><p><strong>I</strong> - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.</p></li>
<li><p><strong>R</strong> - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure.</p></li>
</ul>
<p>Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.</p>
<p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility</a>()</code> (equal to <code><a href='proportion.html'>proportion_SI</a>()</code>) to determine antimicrobial susceptibility and <code>count_susceptible()</code> (equal to <code>count_SI()</code>) to count susceptible isolates.</p>
<p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility()</a></code> (equal to <code><a href='proportion.html'>proportion_SI()</a></code>) to determine antimicrobial susceptibility and <code>count_susceptible()</code> (equal to <code>count_SI()</code>) to count susceptible isolates.</p>
<h2 class="hasAnchor" id="combination-therapy"><a class="anchor" href="#combination-therapy"></a>Combination therapy</h2>
<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, Antibiotic A and Antibiotic B, about how <code>susceptibility</code> works to calculate the %SI:</p>
<pre>
--------------------------------------------------------------------
<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, Antibiotic A and Antibiotic B, about how <code><a href='proportion.html'>susceptibility()</a></code> works to calculate the %SI:</p><pre>--------------------------------------------------------------------
only_all_tested = FALSE only_all_tested = TRUE
----------------------- -----------------------
Drug A Drug B include as include as include as include as
@ -339,11 +341,11 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
--------------------------------------------------------------------
</pre>
<p>Please note that, in combination therapies, for <code>only_all_tested = TRUE</code> applies that:</p><pre>
count_S() + count_I() + count_R() = count_all()
<p>Please note that, in combination therapies, for <code>only_all_tested = TRUE</code> applies that:</p><pre> count_S() + count_I() + count_R() = count_all()
proportion_S() + proportion_I() + proportion_R() = 1
</pre><p>and that, in combination therapies, for <code>only_all_tested = FALSE</code> applies that:</p><pre>
count_S() + count_I() + count_R() &gt;= count_all()
</pre>
<p>and that, in combination therapies, for <code>only_all_tested = FALSE</code> applies that:</p><pre> count_S() + count_I() + count_R() &gt;= count_all()
proportion_S() + proportion_I() + proportion_R() &gt;= 1
</pre>
@ -355,7 +357,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='proportion.html'>proportion</a>_*</code> to calculate microbial resistance and susceptibility.</p></div>
<div class='dont-index'><p><code><a href='proportion.html'>proportion_*</a></code> to calculate microbial resistance and susceptibility.</p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># example_isolates is a data set available in the AMR package.</span>

View File

@ -86,7 +86,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9033</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -239,8 +239,14 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
<p>To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules are applied at default, see Details.</p>
</div>
<pre class="usage"><span class='fu'>eucast_rules</span>(<span class='no'>x</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>rules</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"breakpoints"</span>,
<span class='st'>"expert"</span>, <span class='st'>"other"</span>, <span class='st'>"all"</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)</pre>
<pre class="usage"><span class='fu'>eucast_rules</span>(
<span class='no'>x</span>,
<span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>rules</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"breakpoints"</span>, <span class='st'>"expert"</span>, <span class='st'>"other"</span>, <span class='st'>"all"</span>),
<span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='no'>...</span>
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
@ -251,7 +257,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
</tr>
<tr>
<th>col_mo</th>
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo()</a></code>), defaults to the first column of class <code><a href='as.mo.html'>mo</a></code>. Values will be coerced using <code><a href='as.mo.html'>as.mo()</a></code>.</p></td>
</tr>
<tr>
<th>info</th>
@ -267,7 +273,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
</tr>
<tr>
<th>...</th>
<td><p>column name of an antibiotic, see section Antibiotics</p></td>
<td><p>column name of an antibiotic, please see section <em>Antibiotics</em> below</p></td>
</tr>
</table>
@ -276,20 +282,20 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
<ul>
<li><p>EUCAST Expert Rules. Version 2.0, 2012. <br />
Leclercq et al. <strong>EUCAST expert rules in antimicrobial susceptibility testing.</strong> <em>Clin Microbiol Infect.</em> 2013;19(2):141-60. <br />
<a href='https://doi.org/10.1111/j.1469-0691.2011.03703.x'>https://doi.org/10.1111/j.1469-0691.2011.03703.x</a></p></li>
Leclercq et al. <strong>EUCAST expert rules in antimicrobial susceptibility testing.</strong> <em>Clin Microbiol Infect.</em> 2013;19(2):141-60. <br />
<a href='https://doi.org/10.1111/j.1469-0691.2011.03703.x'>https://doi.org/10.1111/j.1469-0691.2011.03703.x</a></p></li>
<li><p>EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes Tables. Version 3.1, 2016. <br />
<a href='http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf'>http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf</a></p></li>
<a href='http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf'>http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf</a></p></li>
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 9.0, 2019. <br />
<a href='http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx'>http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx</a></p></li>
<a href='http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx'>http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx</a></p></li>
</ul>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>The input of <code>x</code>, possibly with edited values of antibiotics. Or, if <code>verbose = TRUE</code>, a <code>data.frame</code> with all original and new values of the affected bug-drug combinations.</p>
<p>The input of <code>x</code>, possibly with edited values of antibiotics. Or, if <code>verbose = TRUE</code>, a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with all original and new values of the affected bug-drug combinations.</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p><strong>Note:</strong> This function does not translate MIC values to RSI values. Use <code><a href='as.rsi.html'>as.rsi</a></code> for that. <br />
<p><strong>Note:</strong> This function does not translate MIC values to RSI values. Use <code><a href='as.rsi.html'>as.rsi()</a></code> for that. <br />
<strong>Note:</strong> When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance.</p>
<p>Before further processing, some non-EUCAST rules are applied to improve the efficacy of the EUCAST rules. These non-EUCAST rules, that are applied to all isolates, are:</p><ul>
<li><p>Inherit amoxicillin (AMX) from ampicillin (AMP), where amoxicillin (AMX) is unavailable;</p></li>
@ -299,94 +305,96 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
<li><p>Set trimethoprim (TMP) = R where trimethoprim/sulfamethoxazole (SXT) = R;</p></li>
<li><p>Set amoxicillin/clavulanic acid (AMC) = S where amoxicillin (AMX) = S;</p></li>
<li><p>Set piperacillin/tazobactam (TZP) = S where piperacillin (PIP) = S;</p></li>
<li><p>Set trimethoprim/sulfamethoxazole (SXT) = S where trimethoprim (TMP) = S.</p></li>
</ul><p>To <em>not</em> use these rules, please use <code>eucast_rules(..., rules = c("breakpoints", "expert"))</code>.</p>
<li><p>Set trimethoprim/sulfamethoxazole (SXT) = S where trimethoprim (TMP) = S.
To <em>not</em> use these rules, please use <code>eucast_rules(..., rules = c("breakpoints", "expert"))</code>.</p></li>
</ul>
<p>The file containing all EUCAST rules is located here: <a href='https://gitlab.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv'>https://gitlab.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv</a>.</p>
<h2 class="hasAnchor" id="antibiotics"><a class="anchor" href="#antibiotics"></a>Antibiotics</h2>
<p>To define antibiotics column names, leave as it is to determine it automatically with <code><a href='guess_ab_col.html'>guess_ab_col</a></code> or input a text (case-insensitive), or use <code>NULL</code> to skip a column (e.g. <code>TIC = NULL</code> to skip ticarcillin). Manually defined but non-existing columns will be skipped with a warning.</p>
<p>The following antibiotics are used for the functions <code>eucast_rules</code> and <code><a href='mdro.html'>mdro</a></code>. These are shown below in the format '<strong>antimicrobial ID</strong>: name (<a href='https://www.whocc.no/atc/structure_and_principles/'>ATC code</a>)', sorted by name:</p>
<p>To define antibiotics column names, leave as it is to determine it automatically with <code><a href='guess_ab_col.html'>guess_ab_col()</a></code> or input a text (case-insensitive), or use <code>NULL</code> to skip a column (e.g. <code>TIC = NULL</code> to skip ticarcillin). Manually defined but non-existing columns will be skipped with a warning.</p>
<p>The following antibiotics are used for the functions <code>eucast_rules()</code> and <code><a href='mdro.html'>mdro()</a></code>. These are shown below in the format '<strong>antimicrobial ID</strong>: name (<a href='https://www.whocc.no/atc/structure_and_principles/'>ATC code</a>)', sorted by name:</p>
<p><strong>AMK</strong>: amikacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB06'>J01GB06</a>),
<strong>AMX</strong>: amoxicillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA04'>J01CA04</a>),
<strong>AMC</strong>: amoxicillin/clavulanic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR02'>J01CR02</a>),
<strong>AMP</strong>: ampicillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA01'>J01CA01</a>),
<strong>SAM</strong>: ampicillin/sulbactam (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR01'>J01CR01</a>),
<strong>AZM</strong>: azithromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA10'>J01FA10</a>),
<strong>AZL</strong>: azlocillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA09'>J01CA09</a>),
<strong>ATM</strong>: aztreonam (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DF01'>J01DF01</a>),
<strong>CAP</strong>: capreomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB30'>J04AB30</a>),
<strong>RID</strong>: cefaloridine (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DB02'>J01DB02</a>),
<strong>CZO</strong>: cefazolin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DB04'>J01DB04</a>),
<strong>FEP</strong>: cefepime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DE01'>J01DE01</a>),
<strong>CTX</strong>: cefotaxime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DD01'>J01DD01</a>),
<strong>CTT</strong>: cefotetan (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DC05'>J01DC05</a>),
<strong>FOX</strong>: cefoxitin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DC01'>J01DC01</a>),
<strong>CPT</strong>: ceftaroline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DI02'>J01DI02</a>),
<strong>CAZ</strong>: ceftazidime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DD02'>J01DD02</a>),
<strong>CRO</strong>: ceftriaxone (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DD04'>J01DD04</a>),
<strong>CXM</strong>: cefuroxime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DC02'>J01DC02</a>),
<strong>CED</strong>: cephradine (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DB09'>J01DB09</a>),
<strong>CHL</strong>: chloramphenicol (<a href='https://www.whocc.no/atc_ddd_index/?code=J01BA01'>J01BA01</a>),
<strong>CIP</strong>: ciprofloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA02'>J01MA02</a>),
<strong>CLR</strong>: clarithromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA09'>J01FA09</a>),
<strong>CLI</strong>: clindamycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FF01'>J01FF01</a>),
<strong>COL</strong>: colistin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XB01'>J01XB01</a>),
<strong>DAP</strong>: daptomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XX09'>J01XX09</a>),
<strong>DOR</strong>: doripenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH04'>J01DH04</a>),
<strong>DOX</strong>: doxycycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA02'>J01AA02</a>),
<strong>ETP</strong>: ertapenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH03'>J01DH03</a>),
<strong>ERY</strong>: erythromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA01'>J01FA01</a>),
<strong>ETH</strong>: ethambutol (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AK02'>J04AK02</a>),
<strong>FLC</strong>: flucloxacillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CF05'>J01CF05</a>),
<strong>FOS</strong>: fosfomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XX01'>J01XX01</a>),
<strong>FUS</strong>: fusidic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XC01'>J01XC01</a>),
<strong>GAT</strong>: gatifloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA16'>J01MA16</a>),
<strong>GEN</strong>: gentamicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB03'>J01GB03</a>),
<strong>GEH</strong>: gentamicin-high (no ATC code),
<strong>IPM</strong>: imipenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH51'>J01DH51</a>),
<strong>INH</strong>: isoniazid (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AC01'>J04AC01</a>),
<strong>KAN</strong>: kanamycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB04'>J01GB04</a>),
<strong>LVX</strong>: levofloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA12'>J01MA12</a>),
<strong>LIN</strong>: lincomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FF02'>J01FF02</a>),
<strong>LNZ</strong>: linezolid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XX08'>J01XX08</a>),
<strong>MEM</strong>: meropenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH02'>J01DH02</a>),
<strong>MTR</strong>: metronidazole (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XD01'>J01XD01</a>),
<strong>MEZ</strong>: mezlocillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA10'>J01CA10</a>),
<strong>MNO</strong>: minocycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA08'>J01AA08</a>),
<strong>MFX</strong>: moxifloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA14'>J01MA14</a>),
<strong>NAL</strong>: nalidixic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MB02'>J01MB02</a>),
<strong>NEO</strong>: neomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB05'>J01GB05</a>),
<strong>NET</strong>: netilmicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB07'>J01GB07</a>),
<strong>NIT</strong>: nitrofurantoin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XE01'>J01XE01</a>),
<strong>NOR</strong>: norfloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA06'>J01MA06</a>),
<strong>NOV</strong>: novobiocin (<a href='https://www.whocc.no/atc_ddd_index/?code=QJ01XX95'>QJ01XX95</a>),
<strong>OFX</strong>: ofloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA01'>J01MA01</a>),
<strong>OXA</strong>: oxacillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CF04'>J01CF04</a>),
<strong>PEN</strong>: penicillin G (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CE01'>J01CE01</a>),
<strong>PIP</strong>: piperacillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA12'>J01CA12</a>),
<strong>TZP</strong>: piperacillin/tazobactam (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR05'>J01CR05</a>),
<strong>PLB</strong>: polymyxin B (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XB02'>J01XB02</a>),
<strong>PRI</strong>: pristinamycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FG01'>J01FG01</a>),
<strong>PZA</strong>: pyrazinamide (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AK01'>J04AK01</a>),
<strong>QDA</strong>: quinupristin/dalfopristin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FG02'>J01FG02</a>),
<strong>RIB</strong>: rifabutin (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB04'>J04AB04</a>),
<strong>RIF</strong>: rifampicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB02'>J04AB02</a>),
<strong>RFP</strong>: rifapentine (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB05'>J04AB05</a>),
<strong>RXT</strong>: roxithromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA06'>J01FA06</a>),
<strong>SIS</strong>: sisomicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB08'>J01GB08</a>),
<strong>STH</strong>: streptomycin-high (no ATC code),
<strong>TEC</strong>: teicoplanin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XA02'>J01XA02</a>),
<strong>TLV</strong>: telavancin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XA03'>J01XA03</a>),
<strong>TCY</strong>: tetracycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA07'>J01AA07</a>),
<strong>TIC</strong>: ticarcillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA13'>J01CA13</a>),
<strong>TCC</strong>: ticarcillin/clavulanic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR03'>J01CR03</a>),
<strong>TGC</strong>: tigecycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA12'>J01AA12</a>),
<strong>TOB</strong>: tobramycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB01'>J01GB01</a>),
<strong>TMP</strong>: trimethoprim (<a href='https://www.whocc.no/atc_ddd_index/?code=J01EA01'>J01EA01</a>),
<strong>SXT</strong>: trimethoprim/sulfamethoxazole (<a href='https://www.whocc.no/atc_ddd_index/?code=J01EE01'>J01EE01</a>),
<strong>VAN</strong>: vancomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XA01'>J01XA01</a>).</p>
<strong>AMX</strong>: amoxicillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA04'>J01CA04</a>),
<strong>AMC</strong>: amoxicillin/clavulanic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR02'>J01CR02</a>),
<strong>AMP</strong>: ampicillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA01'>J01CA01</a>),
<strong>SAM</strong>: ampicillin/sulbactam (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR01'>J01CR01</a>),
<strong>AZM</strong>: azithromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA10'>J01FA10</a>),
<strong>AZL</strong>: azlocillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA09'>J01CA09</a>),
<strong>ATM</strong>: aztreonam (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DF01'>J01DF01</a>),
<strong>CAP</strong>: capreomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB30'>J04AB30</a>),
<strong>RID</strong>: cefaloridine (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DB02'>J01DB02</a>),
<strong>CZO</strong>: cefazolin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DB04'>J01DB04</a>),
<strong>FEP</strong>: cefepime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DE01'>J01DE01</a>),
<strong>CTX</strong>: cefotaxime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DD01'>J01DD01</a>),
<strong>CTT</strong>: cefotetan (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DC05'>J01DC05</a>),
<strong>FOX</strong>: cefoxitin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DC01'>J01DC01</a>),
<strong>CPT</strong>: ceftaroline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DI02'>J01DI02</a>),
<strong>CAZ</strong>: ceftazidime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DD02'>J01DD02</a>),
<strong>CRO</strong>: ceftriaxone (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DD04'>J01DD04</a>),
<strong>CXM</strong>: cefuroxime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DC02'>J01DC02</a>),
<strong>CED</strong>: cephradine (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DB09'>J01DB09</a>),
<strong>CHL</strong>: chloramphenicol (<a href='https://www.whocc.no/atc_ddd_index/?code=J01BA01'>J01BA01</a>),
<strong>CIP</strong>: ciprofloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA02'>J01MA02</a>),
<strong>CLR</strong>: clarithromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA09'>J01FA09</a>),
<strong>CLI</strong>: clindamycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FF01'>J01FF01</a>),
<strong>COL</strong>: colistin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XB01'>J01XB01</a>),
<strong>DAP</strong>: daptomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XX09'>J01XX09</a>),
<strong>DOR</strong>: doripenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH04'>J01DH04</a>),
<strong>DOX</strong>: doxycycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA02'>J01AA02</a>),
<strong>ETP</strong>: ertapenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH03'>J01DH03</a>),
<strong>ERY</strong>: erythromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA01'>J01FA01</a>),
<strong>ETH</strong>: ethambutol (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AK02'>J04AK02</a>),
<strong>FLC</strong>: flucloxacillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CF05'>J01CF05</a>),
<strong>FOS</strong>: fosfomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XX01'>J01XX01</a>),
<strong>FUS</strong>: fusidic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XC01'>J01XC01</a>),
<strong>GAT</strong>: gatifloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA16'>J01MA16</a>),
<strong>GEN</strong>: gentamicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB03'>J01GB03</a>),
<strong>GEH</strong>: gentamicin-high (no ATC code),
<strong>IPM</strong>: imipenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH51'>J01DH51</a>),
<strong>INH</strong>: isoniazid (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AC01'>J04AC01</a>),
<strong>KAN</strong>: kanamycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB04'>J01GB04</a>),
<strong>LVX</strong>: levofloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA12'>J01MA12</a>),
<strong>LIN</strong>: lincomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FF02'>J01FF02</a>),
<strong>LNZ</strong>: linezolid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XX08'>J01XX08</a>),
<strong>MEM</strong>: meropenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH02'>J01DH02</a>),
<strong>MTR</strong>: metronidazole (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XD01'>J01XD01</a>),
<strong>MEZ</strong>: mezlocillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA10'>J01CA10</a>),
<strong>MNO</strong>: minocycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA08'>J01AA08</a>),
<strong>MFX</strong>: moxifloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA14'>J01MA14</a>),
<strong>NAL</strong>: nalidixic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MB02'>J01MB02</a>),
<strong>NEO</strong>: neomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB05'>J01GB05</a>),
<strong>NET</strong>: netilmicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB07'>J01GB07</a>),
<strong>NIT</strong>: nitrofurantoin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XE01'>J01XE01</a>),
<strong>NOR</strong>: norfloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA06'>J01MA06</a>),
<strong>NOV</strong>: novobiocin (<a href='https://www.whocc.no/atc_ddd_index/?code=QJ01XX95'>QJ01XX95</a>),
<strong>OFX</strong>: ofloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA01'>J01MA01</a>),
<strong>OXA</strong>: oxacillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CF04'>J01CF04</a>),
<strong>PEN</strong>: penicillin G (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CE01'>J01CE01</a>),
<strong>PIP</strong>: piperacillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA12'>J01CA12</a>),
<strong>TZP</strong>: piperacillin/tazobactam (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR05'>J01CR05</a>),
<strong>PLB</strong>: polymyxin B (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XB02'>J01XB02</a>),
<strong>PRI</strong>: pristinamycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FG01'>J01FG01</a>),
<strong>PZA</strong>: pyrazinamide (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AK01'>J04AK01</a>),
<strong>QDA</strong>: quinupristin/dalfopristin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FG02'>J01FG02</a>),
<strong>RIB</strong>: rifabutin (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB04'>J04AB04</a>),
<strong>RIF</strong>: rifampicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB02'>J04AB02</a>),
<strong>RFP</strong>: rifapentine (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB05'>J04AB05</a>),
<strong>RXT</strong>: roxithromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA06'>J01FA06</a>),
<strong>SIS</strong>: sisomicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB08'>J01GB08</a>),
<strong>STH</strong>: streptomycin-high (no ATC code),
<strong>TEC</strong>: teicoplanin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XA02'>J01XA02</a>),
<strong>TLV</strong>: telavancin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XA03'>J01XA03</a>),
<strong>TCY</strong>: tetracycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA07'>J01AA07</a>),
<strong>TIC</strong>: ticarcillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA13'>J01CA13</a>),
<strong>TCC</strong>: ticarcillin/clavulanic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR03'>J01CR03</a>),
<strong>TGC</strong>: tigecycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA12'>J01AA12</a>),
<strong>TOB</strong>: tobramycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB01'>J01GB01</a>),
<strong>TMP</strong>: trimethoprim (<a href='https://www.whocc.no/atc_ddd_index/?code=J01EA01'>J01EA01</a>),
<strong>SXT</strong>: trimethoprim/sulfamethoxazole (<a href='https://www.whocc.no/atc_ddd_index/?code=J01EE01'>J01EE01</a>),
<strong>VAN</strong>: vancomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XA01'>J01XA01</a>).</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9033</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -242,19 +242,18 @@
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
<p>A <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 2,000 observations and 49 variables:</p><dl class='dl-horizontal'>
<dt><code>date</code></dt><dd><p>date of receipt at the laboratory</p></dd>
<dt><code>hospital_id</code></dt><dd><p>ID of the hospital, from A to D</p></dd>
<dt><code>ward_icu</code></dt><dd><p>logical to determine if ward is an intensive care unit</p></dd>
<dt><code>ward_clinical</code></dt><dd><p>logical to determine if ward is a regular clinical ward</p></dd>
<dt><code>ward_outpatient</code></dt><dd><p>logical to determine if ward is an outpatient clinic</p></dd>
<dt><code>age</code></dt><dd><p>age of the patient</p></dd>
<dt><code>gender</code></dt><dd><p>gender of the patient</p></dd>
<dt><code>patient_id</code></dt><dd><p>ID of the patient</p></dd>
<dt><code>mo</code></dt><dd><p>ID of microorganism created with <code><a href='as.mo.html'>as.mo</a></code>, see also <code><a href='microorganisms.html'>microorganisms</a></code></p></dd>
<dt><code>PEN:RIF</code></dt><dd><p>40 different antibiotics with class <code>rsi</code> (see <code><a href='as.rsi.html'>as.rsi</a></code>); these column names occur in <code><a href='antibiotics.html'>antibiotics</a></code> data set and can be translated with <code><a href='ab_property.html'>ab_name</a></code></p></dd>
</dl>
<p>A <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 2,000 observations and 49 variables:</p><ul>
<li><p><code>date</code><br /> date of receipt at the laboratory</p></li>
<li><p><code>hospital_id</code><br /> ID of the hospital, from A to D</p></li>
<li><p><code>ward_icu</code><br /> logical to determine if ward is an intensive care unit</p></li>
<li><p><code>ward_clinical</code><br /> logical to determine if ward is a regular clinical ward</p></li>
<li><p><code>ward_outpatient</code><br /> logical to determine if ward is an outpatient clinic</p></li>
<li><p><code>age</code><br /> age of the patient</p></li>
<li><p><code>gender</code><br /> gender of the patient</p></li>
<li><p><code>patient_id</code><br /> ID of the patient</p></li>
<li><p><code>mo</code><br /> ID of microorganism created with <code><a href='as.mo.html'>as.mo()</a></code>, see also <a href='microorganisms.html'>microorganisms</a></p></li>
<li><p><code>PEN:RIF</code><br /> 40 different antibiotics with class <code>rsi</code> (see <code><a href='as.rsi.html'>as.rsi()</a></code>); these column names occur in <a href='antibiotics.html'>antibiotics</a> data set and can be translated with <code><a href='ab_property.html'>ab_name()</a></code></p></li>
</ul>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -272,7 +272,7 @@
</tr>
<tr>
<th>ab_class</th>
<td><p>an antimicrobial class, like <code>"carbapenems"</code>, as can be found in <code>AMR::antibiotics$group</code></p></td>
<td><p>an antimicrobial class, like <code>"carbapenems"</code>, as can be found in <code><a href='antibiotics.html'>AMR::antibiotics$group</a></code></p></td>
</tr>
<tr>
<th>result</th>
@ -290,7 +290,7 @@
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>The <code>group</code> column in <code><a href='antibiotics.html'>antibiotics</a></code> data set will be searched for <code>ab_class</code> (case-insensitive). If no results are found, the <code>atc_group1</code> and <code>atc_group2</code> columns will be searched. Next, <code>x</code> will be checked for column names with a value in any abbreviations, codes or official names found in the <code>antibiotics</code> data set.</p>
<p>The <code>group</code> column in <a href='antibiotics.html'>antibiotics</a> data set will be searched for <code>ab_class</code> (case-insensitive). If no results are found, the <code>atc_group1</code> and <code>atc_group2</code> columns will be searched. Next, <code>x</code> will be checked for column names with a value in any abbreviations, codes or official names found in the <a href='antibiotics.html'>antibiotics</a> data set.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>dplyr</span>)

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -237,26 +237,50 @@
<p>Determine first (weighted) isolates of all microorganisms of every patient per episode and (if needed) per specimen type.</p>
</div>
<pre class="usage"><span class='fu'>first_isolate</span>(<span class='no'>x</span>, <span class='kw'>col_date</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>col_patient_id</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>col_testcode</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>col_specimen</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_icu</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>col_keyantibiotics</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>episode_days</span> <span class='kw'>=</span> <span class='fl'>365</span>,
<span class='kw'>testcodes_exclude</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>icu_exclude</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>specimen_group</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"keyantibiotics"</span>, <span class='kw'>ignore_I</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>points_threshold</span> <span class='kw'>=</span> <span class='fl'>2</span>, <span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>include_unknown</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)
<pre class="usage"><span class='fu'>first_isolate</span>(
<span class='no'>x</span>,
<span class='kw'>col_date</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_patient_id</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_testcode</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_specimen</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_icu</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_keyantibiotics</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>episode_days</span> <span class='kw'>=</span> <span class='fl'>365</span>,
<span class='kw'>testcodes_exclude</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>icu_exclude</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>specimen_group</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"keyantibiotics"</span>,
<span class='kw'>ignore_I</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>points_threshold</span> <span class='kw'>=</span> <span class='fl'>2</span>,
<span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>include_unknown</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='no'>...</span>
)
<span class='fu'>filter_first_isolate</span>(<span class='no'>x</span>, <span class='kw'>col_date</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>col_patient_id</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='no'>...</span>)
<span class='fu'>filter_first_isolate</span>(
<span class='no'>x</span>,
<span class='kw'>col_date</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_patient_id</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='no'>...</span>
)
<span class='fu'>filter_first_weighted_isolate</span>(<span class='no'>x</span>, <span class='kw'>col_date</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_patient_id</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>col_keyantibiotics</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='no'>...</span>)</pre>
<span class='fu'>filter_first_weighted_isolate</span>(
<span class='no'>x</span>,
<span class='kw'>col_date</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_patient_id</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>col_keyantibiotics</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='no'>...</span>
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>a <code>data.frame</code> containing isolates.</p></td>
<td><p>a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> containing isolates.</p></td>
</tr>
<tr>
<th>col_date</th>
@ -268,7 +292,7 @@
</tr>
<tr>
<th>col_mo</th>
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo()</a></code>), defaults to the first column of class <code><a href='as.mo.html'>mo</a></code>. Values will be coerced using <code><a href='as.mo.html'>as.mo()</a></code>.</p></td>
</tr>
<tr>
<th>col_testcode</th>
@ -284,7 +308,7 @@
</tr>
<tr>
<th>col_keyantibiotics</th>
<td><p>column name of the key antibiotics to determine first <em>weighted</em> isolates, see <code><a href='key_antibiotics.html'>key_antibiotics</a></code>. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use <code>col_keyantibiotics = FALSE</code> to prevent this.</p></td>
<td><p>column name of the key antibiotics to determine first <em>weighted</em> isolates, see <code><a href='key_antibiotics.html'>key_antibiotics()</a></code>. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use <code>col_keyantibiotics = FALSE</code> to prevent this.</p></td>
</tr>
<tr>
<th>episode_days</th>
@ -324,28 +348,29 @@
</tr>
<tr>
<th>...</th>
<td><p>parameters passed on to the <code>first_isolate</code> function</p></td>
<td><p>parameters passed on to the <code>first_isolate()</code> function</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
<p>Methodology of this function is based on: <strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition</strong>, 2014, <em>Clinical and Laboratory Standards Institute (CLSI)</em>. <a href='https://clsi.org/standards/products/microbiology/documents/m39/'>https://clsi.org/standards/products/microbiology/documents/m39/</a>.</p>
<p>Methodology of this function is based on:</p>
<p><strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition</strong>, 2014, <em>Clinical and Laboratory Standards Institute (CLSI)</em>. <a href='https://clsi.org/standards/products/microbiology/documents/m39/'>https://clsi.org/standards/products/microbiology/documents/m39/</a>.</p>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Logical vector</p>
<p>A <code><a href='https://rdrr.io/r/base/logical.html'>logical</a></code> vector</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p><strong>WHY THIS IS SO IMPORTANT</strong> <br />
To conduct an analysis of antimicrobial resistance, you should only include the first isolate of every patient per episode <a href='https://www.ncbi.nlm.nih.gov/pubmed/17304462'>[1]</a>. If you would not do this, you could easily get an overestimate or underestimate of the resistance of an antibiotic. Imagine that a patient was admitted with an MRSA and that it was found in 5 different blood cultures the following week. The resistance percentage of oxacillin of all <em>S. aureus</em> isolates would be overestimated, because you included this MRSA more than once. It would be <a href='https://en.wikipedia.org/wiki/Selection_bias'>selection bias</a>.</p>
To conduct an analysis of antimicrobial resistance, you should only include the first isolate of every patient per episode [1](https://www.ncbi.nlm.nih.gov/pubmed/17304462). If you would not do this, you could easily get an overestimate or underestimate of the resistance of an antibiotic. Imagine that a patient was admitted with an MRSA and that it was found in 5 different blood cultures the following week. The resistance percentage of oxacillin of all <em>S. aureus</em> isolates would be overestimated, because you included this MRSA more than once. It would be <a href='https://en.wikipedia.org/wiki/Selection_bias'>selection bias</a>.</p>
<p>All isolates with a microbial ID of <code>NA</code> will be excluded as first isolate.</p>
<p>The functions <code>filter_first_isolate</code> and <code>filter_first_weighted_isolate</code> are helper functions to quickly filter on first isolates. The function <code>filter_first_isolate</code> is essentially equal to:</p><pre>
x %&gt;%
<p>The functions <code>filter_first_isolate()</code> and <code>filter_first_weighted_isolate()</code> are helper functions to quickly filter on first isolates. The function <code>filter_first_isolate()</code> is essentially equal to:</p><pre> x %&gt;%
mutate(only_firsts = first_isolate(x, ...)) %&gt;%
filter(only_firsts == TRUE) %&gt;%
select(-only_firsts)
</pre><p>The function <code>filter_first_weighted_isolate</code> is essentially equal to:</p><pre>
x %&gt;%
</pre>
<p>The function <code>filter_first_weighted_isolate()</code> is essentially equal to:</p><pre> x %&gt;%
mutate(keyab = key_antibiotics(.)) %&gt;%
mutate(only_weighted_firsts = first_isolate(x,
col_keyantibiotics = "keyab", ...)) %&gt;%
@ -357,11 +382,13 @@ To conduct an analysis of antimicrobial resistance, you should only include the
<p>There are two ways to determine whether isolates can be included as first <em>weighted</em> isolates which will give generally the same results: <br /></p>
<p><strong>1. Using</strong> <code>type = "keyantibiotics"</code> <strong>and parameter</strong> <code>ignore_I</code> <br />
Any difference from S to R (or vice versa) will (re)select an isolate as a first weighted isolate. With <code>ignore_I = FALSE</code>, also differences from I to S|R (or vice versa) will lead to this. This is a reliable method and 30-35 times faster than method 2. Read more about this in the <code><a href='key_antibiotics.html'>key_antibiotics</a></code> function. <br /></p>
<p><strong>2. Using</strong> <code>type = "points"</code> <strong>and parameter</strong> <code>points_threshold</code> <br />
A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds <code>points_threshold</code>, which default to <code>2</code>, an isolate will be (re)selected as a first weighted isolate.</p>
<p>There are two ways to determine whether isolates can be included as first <em>weighted</em> isolates which will give generally the same results:</p><ol>
<li><p>Using <code>type = "keyantibiotics"</code> and parameter <code>ignore_I</code></p>
<p>Any difference from S to R (or vice versa) will (re)select an isolate as a first weighted isolate. With <code>ignore_I = FALSE</code>, also differences from I to S|R (or vice versa) will lead to this. This is a reliable method and 30-35 times faster than method 2. Read more about this in the <code><a href='key_antibiotics.html'>key_antibiotics()</a></code> function.</p></li>
<li><p>Using <code>type = "points"</code> and parameter <code>points_threshold</code></p>
<p>A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds <code>points_threshold</code>, which default to <code>2</code>, an isolate will be (re)selected as a first weighted isolate.</p></li>
</ol>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -369,7 +396,7 @@ To conduct an analysis of antimicrobial resistance, you should only include the
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='key_antibiotics.html'>key_antibiotics</a></code></p></div>
<div class='dont-index'><p><code><a href='key_antibiotics.html'>key_antibiotics()</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># `example_isolates` is a dataset available in the AMR package.</span>

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="<em>G</em>-test for Count Data — g.test" />
<meta property="og:description" content="g.test performs chi-squared contingency table tests and goodness-of-fit tests, just like chisq.test but is more reliable [1]. A G-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a G-test of goodness-of-fit), or to see whether the proportions of one variable are different for different values of the other variable (called a G-test of independence)." />
<meta property="og:description" content="g.test() performs chi-squared contingency table tests and goodness-of-fit tests, just like chisq.test() but is more reliable 1. A G-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a G-test of goodness-of-fit), or to see whether the proportions of one variable are different for different values of the other variable (called a G-test of independence)." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,11 +234,10 @@
</div>
<div class="ref-description">
<p><code>g.test</code> performs chi-squared contingency table tests and goodness-of-fit tests, just like <code><a href='https://rdrr.io/r/stats/chisq.test.html'>chisq.test</a></code> but is more reliable [1]. A <em>G</em>-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a <strong><em>G</em>-test of goodness-of-fit</strong>), or to see whether the proportions of one variable are different for different values of the other variable (called a <strong><em>G</em>-test of independence</strong>).</p>
<p><code>g.test()</code> performs chi-squared contingency table tests and goodness-of-fit tests, just like <code><a href='https://rdrr.io/r/stats/chisq.test.html'>chisq.test()</a></code> but is more reliable 1. A <em>G</em>-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a <strong><em>G</em>-test of goodness-of-fit</strong>), or to see whether the proportions of one variable are different for different values of the other variable (called a <strong><em>G</em>-test of independence</strong>).</p>
</div>
<pre class="usage"><span class='fu'>g.test</span>(<span class='no'>x</span>, <span class='kw'>y</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>p</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span>(<span class='fl'>1</span>/<span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='no'>x</span>), <span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='no'>x</span>)),
<span class='kw'>rescale.p</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<pre class="usage"><span class='fu'>g.test</span>(<span class='no'>x</span>, <span class='kw'>y</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>p</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span>(<span class='fl'>1</span>/<span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='no'>x</span>), <span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='no'>x</span>)), <span class='kw'>rescale.p</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
@ -268,8 +267,8 @@
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
<p>This code is almost identical to <code><a href='https://rdrr.io/r/stats/chisq.test.html'>chisq.test</a></code>, except that:</p><ul>
<li><p>The calculation of the statistic was changed to <code>2 * sum(x * log(x / E))</code></p></li>
<p>The code for this function is identical to that of <code><a href='https://rdrr.io/r/stats/chisq.test.html'>chisq.test()</a></code>, except that:</p><ul>
<li><p>The calculation of the statistic was changed to \(2 * sum(x * log(x / E))\)</p></li>
<li><p>Yates' continuity correction was removed as it does not apply to a <em>G</em>-test</p></li>
<li><p>The possibility to simulate p values with <code>simulate.p.value</code> was removed</p></li>
</ul>
@ -301,33 +300,33 @@
<p>If <code>x</code> is a matrix with at least two rows and columns, it is taken as a two-dimensional contingency table: the entries of <code>x</code> must be non-negative integers. Otherwise, <code>x</code> and <code>y</code> must be vectors or factors of the same length; cases with missing values are removed, the objects are coerced to factors, and the contingency table is computed from these. Then Pearson's chi-squared test is performed of the null hypothesis that the joint distribution of the cell counts in a 2-dimensional contingency table is the product of the row and column marginals.</p>
<p>The p-value is computed from the asymptotic chi-squared distribution of the test statistic.</p>
<p>In the contingency table case simulation is done by random sampling from the set of all contingency tables with given marginals, and works only if the marginals are strictly positive. Note that this is not the usual sampling situation assumed for a chi-squared test (like the <em>G</em>-test) but rather that for Fisher's exact test.</p>
<p>In the goodness-of-fit case simulation is done by random sampling from the discrete distribution specified by <code>p</code>, each sample being of size <code>n = sum(x)</code>. This simulation is done in <span style="R">R</span> and may be slow.</p>
<h2 class="hasAnchor" id="g-test-of-goodness-of-fit-likelihood-ratio-test-"><a class="anchor" href="#g-test-of-goodness-of-fit-likelihood-ratio-test-"></a><em>G</em>-test of goodness-of-fit (likelihood ratio test)</h2>
<p>In the goodness-of-fit case simulation is done by random sampling from the discrete distribution specified by <code>p</code>, each sample being of size <code>n = sum(x)</code>. This simulation is done in <span style="R">R</span> and may be slow.</p><h3><em>G</em>-test of goodness-of-fit (likelihood ratio test)</h3>
<p>Use the <em>G</em>-test of goodness-of-fit when you have one nominal variable with two or more values (such as male and female, or red, pink and white flowers). You compare the observed counts of numbers of observations in each category with the expected counts, which you calculate using some kind of theoretical expectation (such as a 1:1 sex ratio or a 1:2:1 ratio in a genetic cross).</p>
<p>If the expected number of observations in any category is too small, the <em>G</em>-test may give inaccurate results, and you should use an exact test instead (<code><a href='https://rdrr.io/r/stats/fisher.test.html'>fisher.test</a></code>).</p>
<p>The <em>G</em>-test of goodness-of-fit is an alternative to the chi-square test of goodness-of-fit (<code><a href='https://rdrr.io/r/stats/chisq.test.html'>chisq.test</a></code>); each of these tests has some advantages and some disadvantages, and the results of the two tests are usually very similar.</p>
<h2 class="hasAnchor" id="g-test-of-independence"><a class="anchor" href="#g-test-of-independence"></a><em>G</em>-test of independence</h2>
<p>If the expected number of observations in any category is too small, the <em>G</em>-test may give inaccurate results, and you should use an exact test instead (<code><a href='https://rdrr.io/r/stats/fisher.test.html'>fisher.test()</a></code>).</p>
<p>The <em>G</em>-test of goodness-of-fit is an alternative to the chi-square test of goodness-of-fit (<code><a href='https://rdrr.io/r/stats/chisq.test.html'>chisq.test()</a></code>); each of these tests has some advantages and some disadvantages, and the results of the two tests are usually very similar.</p>
<h3><em>G</em>-test of independence</h3>
<p>Use the <em>G</em>-test of independence when you have two nominal variables, each with two or more possible values. You want to know whether the proportions for one variable are different among values of the other variable.</p>
<p>It is also possible to do a <em>G</em>-test of independence with more than two nominal variables. For example, Jackson et al. (2013) also had data for children under 3, so you could do an analysis of old vs. young, thigh vs. arm, and reaction vs. no reaction, all analyzed together.</p>
<p>Fisher's exact test (<code><a href='https://rdrr.io/r/stats/fisher.test.html'>fisher.test</a></code>) is an <strong>exact</strong> test, where the <em>G</em>-test is still only an <strong>approximation</strong>. For any 2x2 table, Fisher's Exact test may be slower but will still run in seconds, even if the sum of your observations is multiple millions.</p>
<p>The <em>G</em>-test of independence is an alternative to the chi-square test of independence (<code><a href='https://rdrr.io/r/stats/chisq.test.html'>chisq.test</a></code>), and they will give approximately the same results.</p>
<h2 class="hasAnchor" id="how-the-test-works"><a class="anchor" href="#how-the-test-works"></a>How the test works</h2>
<p>Fisher's exact test (<code><a href='https://rdrr.io/r/stats/fisher.test.html'>fisher.test()</a></code>) is an <strong>exact</strong> test, where the <em>G</em>-test is still only an <strong>approximation</strong>. For any 2x2 table, Fisher's Exact test may be slower but will still run in seconds, even if the sum of your observations is multiple millions.</p>
<p>The <em>G</em>-test of independence is an alternative to the chi-square test of independence (<code><a href='https://rdrr.io/r/stats/chisq.test.html'>chisq.test()</a></code>), and they will give approximately the same results.</p>
<h3>How the test works</h3>
<p>Unlike the exact test of goodness-of-fit (<code><a href='https://rdrr.io/r/stats/fisher.test.html'>fisher.test</a></code>), the <em>G</em>-test does not directly calculate the probability of obtaining the observed results or something more extreme. Instead, like almost all statistical tests, the <em>G</em>-test has an intermediate step; it uses the data to calculate a test statistic that measures how far the observed data are from the null expectation. You then use a mathematical relationship, in this case the chi-square distribution, to estimate the probability of obtaining that value of the test statistic.</p>
<p>Unlike the exact test of goodness-of-fit (<code><a href='https://rdrr.io/r/stats/fisher.test.html'>fisher.test()</a></code>), the <em>G</em>-test does not directly calculate the probability of obtaining the observed results or something more extreme. Instead, like almost all statistical tests, the <em>G</em>-test has an intermediate step; it uses the data to calculate a test statistic that measures how far the observed data are from the null expectation. You then use a mathematical relationship, in this case the chi-square distribution, to estimate the probability of obtaining that value of the test statistic.</p>
<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><code>G &lt;- 2 * sum(x * log(x / E))</code></p>
<p>where <code>E</code> are the expected values. Since this is chi-square distributed, the p value can be calculated with:</p>
<p><code>p &lt;- stats::pchisq(G, df, lower.tail = FALSE)</code></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><pre>p &lt;- stats::pchisq(G, df, lower.tail = FALSE)
</pre>
<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>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -335,10 +334,10 @@
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p>[1] McDonald, J.H. 2014. <strong>Handbook of Biological Statistics (3rd ed.)</strong>. Sparky House Publishing, Baltimore, Maryland. <a href='http://www.biostathandbook.com/gtestgof.html'>http://www.biostathandbook.com/gtestgof.html</a>.</p>
<p>1 McDonald, J.H. 2014. <strong>Handbook of Biological Statistics (3rd ed.)</strong>. Sparky House Publishing, Baltimore, Maryland. <a href='http://www.biostathandbook.com/gtestgof.html'>http://www.biostathandbook.com/gtestgof.html</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='https://rdrr.io/r/stats/chisq.test.html'>chisq.test</a></code></p></div>
<div class='dont-index'><p><code><a href='https://rdrr.io/r/stats/chisq.test.html'>chisq.test()</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># = EXAMPLE 1 =</span>
@ -380,9 +379,6 @@
<li><a href="#source">Source</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#details">Details</a></li>
<li><a href="#g-test-of-goodness-of-fit-likelihood-ratio-test-"><em>G</em>-test of goodness-of-fit (likelihood ratio test)</a></li>
<li><a href="#g-test-of-independence"><em>G</em>-test of independence</a></li>
<li><a href="#how-the-test-works">How the test works</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#references">References</a></li>
<li><a href="#see-also">See also</a></li>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,43 +234,73 @@
</div>
<div class="ref-description">
<p>Use these functions to create bar plots for antimicrobial resistance analysis. All functions rely on internal <code><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a>2</code> functions.</p>
<p>Use these functions to create bar plots for antimicrobial resistance analysis. All functions rely on internal <a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot2</a> functions.</p>
</div>
<pre class="usage"><span class='fu'>ggplot_rsi</span>(<span class='no'>data</span>, <span class='kw'>position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"antibiotic"</span>,
<span class='kw'>fill</span> <span class='kw'>=</span> <span class='st'>"interpretation"</span>, <span class='kw'>facet</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>breaks</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>0.1</span>),
<span class='kw'>limits</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name"</span>, <span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>nrow</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>colours</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>S</span> <span class='kw'>=</span> <span class='st'>"#61a8ff"</span>, <span class='kw'>SI</span> <span class='kw'>=</span> <span class='st'>"#61a8ff"</span>, <span class='kw'>I</span> <span class='kw'>=</span> <span class='st'>"#61f7ff"</span>, <span class='kw'>IR</span> <span class='kw'>=</span>
<span class='st'>"#ff6961"</span>, <span class='kw'>R</span> <span class='kw'>=</span> <span class='st'>"#ff6961"</span>), <span class='kw'>datalabels</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>datalabels.size</span> <span class='kw'>=</span> <span class='fl'>2.5</span>,
<span class='kw'>datalabels.colour</span> <span class='kw'>=</span> <span class='st'>"gray15"</span>, <span class='kw'>title</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>subtitle</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>caption</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>x.title</span> <span class='kw'>=</span> <span class='st'>"Antimicrobial"</span>, <span class='kw'>y.title</span> <span class='kw'>=</span> <span class='st'>"Proportion"</span>,
<span class='no'>...</span>)
<pre class="usage"><span class='fu'>ggplot_rsi</span>(
<span class='no'>data</span>,
<span class='kw'>position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"antibiotic"</span>,
<span class='kw'>fill</span> <span class='kw'>=</span> <span class='st'>"interpretation"</span>,
<span class='kw'>facet</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>breaks</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>0.1</span>),
<span class='kw'>limits</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name"</span>,
<span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(),
<span class='kw'>nrow</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>colours</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>S</span> <span class='kw'>=</span> <span class='st'>"#61a8ff"</span>, <span class='kw'>SI</span> <span class='kw'>=</span> <span class='st'>"#61a8ff"</span>, <span class='kw'>I</span> <span class='kw'>=</span> <span class='st'>"#61f7ff"</span>, <span class='kw'>IR</span> <span class='kw'>=</span> <span class='st'>"#ff6961"</span>, <span class='kw'>R</span> <span class='kw'>=</span>
<span class='st'>"#ff6961"</span>),
<span class='kw'>datalabels</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>datalabels.size</span> <span class='kw'>=</span> <span class='fl'>2.5</span>,
<span class='kw'>datalabels.colour</span> <span class='kw'>=</span> <span class='st'>"gray15"</span>,
<span class='kw'>title</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>subtitle</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>caption</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>x.title</span> <span class='kw'>=</span> <span class='st'>"Antimicrobial"</span>,
<span class='kw'>y.title</span> <span class='kw'>=</span> <span class='st'>"Proportion"</span>,
<span class='no'>...</span>
)
<span class='fu'>geom_rsi</span>(<span class='kw'>position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>x</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"antibiotic"</span>, <span class='st'>"interpretation"</span>),
<span class='kw'>fill</span> <span class='kw'>=</span> <span class='st'>"interpretation"</span>, <span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name"</span>,
<span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='no'>...</span>)
<span class='fu'>geom_rsi</span>(
<span class='kw'>position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>x</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"antibiotic"</span>, <span class='st'>"interpretation"</span>),
<span class='kw'>fill</span> <span class='kw'>=</span> <span class='st'>"interpretation"</span>,
<span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name"</span>,
<span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(),
<span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='no'>...</span>
)
<span class='fu'>facet_rsi</span>(<span class='kw'>facet</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"interpretation"</span>, <span class='st'>"antibiotic"</span>), <span class='kw'>nrow</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)
<span class='fu'>scale_y_percent</span>(<span class='kw'>breaks</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>0.1</span>), <span class='kw'>limits</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)
<span class='fu'>scale_rsi_colours</span>(<span class='kw'>colours</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>S</span> <span class='kw'>=</span> <span class='st'>"#61a8ff"</span>, <span class='kw'>SI</span> <span class='kw'>=</span> <span class='st'>"#61a8ff"</span>, <span class='kw'>I</span> <span class='kw'>=</span>
<span class='st'>"#61f7ff"</span>, <span class='kw'>IR</span> <span class='kw'>=</span> <span class='st'>"#ff6961"</span>, <span class='kw'>R</span> <span class='kw'>=</span> <span class='st'>"#ff6961"</span>))
<span class='fu'>scale_rsi_colours</span>(
<span class='kw'>colours</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>S</span> <span class='kw'>=</span> <span class='st'>"#61a8ff"</span>, <span class='kw'>SI</span> <span class='kw'>=</span> <span class='st'>"#61a8ff"</span>, <span class='kw'>I</span> <span class='kw'>=</span> <span class='st'>"#61f7ff"</span>, <span class='kw'>IR</span> <span class='kw'>=</span> <span class='st'>"#ff6961"</span>, <span class='kw'>R</span> <span class='kw'>=</span>
<span class='st'>"#ff6961"</span>)
)
<span class='fu'>theme_rsi</span>()
<span class='fu'>labels_rsi_count</span>(<span class='kw'>position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"antibiotic"</span>,
<span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name"</span>, <span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>datalabels.size</span> <span class='kw'>=</span> <span class='fl'>3</span>, <span class='kw'>datalabels.colour</span> <span class='kw'>=</span> <span class='st'>"gray15"</span>)</pre>
<span class='fu'>labels_rsi_count</span>(
<span class='kw'>position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"antibiotic"</span>,
<span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name"</span>,
<span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>datalabels.size</span> <span class='kw'>=</span> <span class='fl'>3</span>,
<span class='kw'>datalabels.colour</span> <span class='kw'>=</span> <span class='st'>"gray15"</span>
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>data</th>
<td><p>a <code>data.frame</code> with column(s) of class <code>"rsi"</code> (see <code><a href='as.rsi.html'>as.rsi</a></code>)</p></td>
<td><p>a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with column(s) of class <code>rsi</code> (see <code><a href='as.rsi.html'>as.rsi()</a></code>)</p></td>
</tr>
<tr>
<th>position</th>
@ -298,7 +328,7 @@
</tr>
<tr>
<th>translate_ab</th>
<td><p>a column name of the <code><a href='antibiotics.html'>antibiotics</a></code> data set to translate the antibiotic abbreviations to, using <code><a href='ab_property.html'>ab_property</a></code></p></td>
<td><p>a column name of the <a href='antibiotics.html'>antibiotics</a> data set to translate the antibiotic abbreviations to, using <code><a href='ab_property.html'>ab_property()</a></code></p></td>
</tr>
<tr>
<th>combine_SI</th>
@ -310,7 +340,7 @@
</tr>
<tr>
<th>language</th>
<td><p>language of the returned text, defaults to system language (see <code><a href='translate.html'>get_locale</a></code>) and can also be set with <code><a href='https://rdrr.io/r/base/options.html'>getOption</a>("AMR_locale")</code>. Use <code>language = NULL</code> or <code>language = ""</code> to prevent translation.</p></td>
<td><p>language of the returned text, defaults to system language (see <code><a href='translate.html'>get_locale()</a></code>) and can also be set with <code><a href='https://rdrr.io/r/base/options.html'>getOption("AMR_locale")</a></code>. Use <code>language = NULL</code> or <code>language = ""</code> to prevent translation.</p></td>
</tr>
<tr>
<th>nrow</th>
@ -318,11 +348,11 @@
</tr>
<tr>
<th>colours</th>
<td><p>a named vector with colours for the bars. The names must be one or more of: S, SI, I, IR, R or be <code>FALSE</code> to use default <code>ggplot2</code> colours.</p></td>
<td><p>a named vector with colours for the bars. The names must be one or more of: S, SI, I, IR, R or be <code>FALSE</code> to use default [ggplot2][<code><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot2::ggplot()</a></code> colours.</p></td>
</tr>
<tr>
<th>datalabels</th>
<td><p>show datalabels using <code>labels_rsi_count</code></p></td>
<td><p>show datalabels using <code>labels_rsi_count()</code></p></td>
</tr>
<tr>
<th>datalabels.size</th>
@ -354,21 +384,23 @@
</tr>
<tr>
<th>...</th>
<td><p>other parameters passed on to <code>geom_rsi</code></p></td>
<td><p>other parameters passed on to <code>geom_rsi()</code></p></td>
</tr>
</table>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>At default, the names of antibiotics will be shown on the plots using <code><a href='ab_property.html'>ab_name</a></code>. This can be set with the <code>translate_ab</code> parameter. See <code><a href='count.html'>count_df</a></code>.</p>
<p><strong>The functions</strong><br />
<code>geom_rsi</code> will take any variable from the data that has an <code>rsi</code> class (created with <code><a href='as.rsi.html'>as.rsi</a></code>) using <code><a href='proportion.html'>rsi_df</a></code> and will plot bars with the percentage R, I and S. The default behaviour is to have the bars stacked and to have the different antibiotics on the x axis.</p>
<p><code>facet_rsi</code> creates 2d plots (at default based on S/I/R) using <code><a href='https://ggplot2.tidyverse.org/reference/facet_wrap.html'>facet_wrap</a></code>.</p>
<p><code>scale_y_percent</code> transforms the y axis to a 0 to 100% range using <code>scale_continuous</code>.</p>
<p><code>scale_rsi_colours</code> sets colours to the bars: pastel blue for S, pastel turquoise for I and pastel red for R, using <code>scale_brewer</code>.</p>
<p><code>theme_rsi</code> is a <code>ggplot <a href='https://ggplot2.tidyverse.org/reference/theme.html'>theme</a></code> with minimal distraction.</p>
<p><code>labels_rsi_count</code> print datalabels on the bars with percentage and amount of isolates using <code><a href='https://ggplot2.tidyverse.org/reference/geom_text.html'>geom_text</a></code></p>
<p><code>ggplot_rsi</code> is a wrapper around all above functions that uses data as first input. This makes it possible to use this function after a pipe (<code>%&gt;%</code>). See Examples.</p>
<p>At default, the names of antibiotics will be shown on the plots using <code><a href='ab_property.html'>ab_name()</a></code>. This can be set with the <code>translate_ab</code> parameter. See <code><a href='count.html'>count_df()</a></code>.</p><h3>The functions</h3>
<p><code>geom_rsi()</code> will take any variable from the data that has an <code>rsi</code> class (created with <code><a href='as.rsi.html'>as.rsi()</a></code>) using <code><a href='proportion.html'>rsi_df()</a></code> and will plot bars with the percentage R, I and S. The default behaviour is to have the bars stacked and to have the different antibiotics on the x axis.</p>
<p><code>facet_rsi()</code> creates 2d plots (at default based on S/I/R) using <code><a href='https://ggplot2.tidyverse.org/reference/facet_wrap.html'>ggplot2::facet_wrap()</a></code>.</p>
<p><code>scale_y_percent()</code> transforms the y axis to a 0 to 100% range using <code>ggplot2::scale_continuous()</code>.</p>
<p><code>scale_rsi_colours()</code> sets colours to the bars: pastel blue for S, pastel turquoise for I and pastel red for R, using <code>ggplot2::scale_brewer()</code>.</p>
<p><code>theme_rsi()</code> is a [ggplot2 theme][<code><a href='https://ggplot2.tidyverse.org/reference/theme.html'>ggplot2::theme()</a></code> with minimal distraction.</p>
<p><code>labels_rsi_count()</code> print datalabels on the bars with percentage and amount of isolates using <code><a href='https://ggplot2.tidyverse.org/reference/geom_text.html'>ggplot2::geom_text()</a></code></p>
<p><code>ggplot_rsi()</code> is a wrapper around all above functions that uses data as first input. This makes it possible to use this function after a pipe (<code>%&gt;%</code>). See Examples.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>This tries to find a column name in a data set based on information from the <code><a href='antibiotics.html'>antibiotics</a></code> data set. Also supports WHONET abbreviations.</p>
<p>This tries to find a column name in a data set based on information from the <a href='antibiotics.html'>antibiotics</a> data set. Also supports WHONET abbreviations.</p>
</div>
<pre class="usage"><span class='fu'>guess_ab_col</span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>search_string</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
@ -244,11 +244,11 @@
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>a <code>data.frame</code></p></td>
<td><p>a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code></p></td>
</tr>
<tr>
<th>search_string</th>
<td><p>a text to search <code>x</code> for, will be checked with <code><a href='as.ab.html'>as.ab</a></code> if this value is not a column in <code>x</code></p></td>
<td><p>a text to search <code>x</code> for, will be checked with <code><a href='as.ab.html'>as.ab()</a></code> if this value is not a column in <code>x</code></p></td>
</tr>
<tr>
<th>verbose</th>
@ -261,7 +261,7 @@
<p>A column name of <code>x</code>, or <code>NULL</code> when no result is found.</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>You can look for an antibiotic (trade) name or abbreviation and it will search <code>x</code> and the <code><a href='antibiotics.html'>antibiotics</a></code> data set for any column containing a name or code of that antibiotic. <strong>Longer columns names take precendence over shorter column names.</strong></p>
<p>You can look for an antibiotic (trade) name or abbreviation and it will search <code>x</code> and the <a href='antibiotics.html'>antibiotics</a> data set for any column containing a name or code of that antibiotic. <strong>Longer columns names take precendence over shorter column names.</strong></p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -84,7 +84,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9035</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -348,7 +348,7 @@
<td>
<p><code><a href="join.html">inner_join_microorganisms()</a></code> <code><a href="join.html">left_join_microorganisms()</a></code> <code><a href="join.html">right_join_microorganisms()</a></code> <code><a href="join.html">full_join_microorganisms()</a></code> <code><a href="join.html">semi_join_microorganisms()</a></code> <code><a href="join.html">anti_join_microorganisms()</a></code> </p>
</td>
<td><p>Join a table with <code>microorganisms</code></p></td>
<td><p>Join a table with microorganisms</p></td>
</tr><tr>
<td>
@ -372,7 +372,7 @@
<td>
<p><code><a href="p_symbol.html">p_symbol()</a></code> </p>
</td>
<td><p>Symbol of a p value</p></td>
<td><p>Symbol of a p-value</p></td>
</tr>
</tbody><tbody>
<tr>
@ -398,7 +398,7 @@
<td>
<p><code><a href="count.html">count_resistant()</a></code> <code><a href="count.html">count_susceptible()</a></code> <code><a href="count.html">count_R()</a></code> <code><a href="count.html">count_IR()</a></code> <code><a href="count.html">count_I()</a></code> <code><a href="count.html">count_SI()</a></code> <code><a href="count.html">count_S()</a></code> <code><a href="count.html">count_all()</a></code> <code><a href="count.html">n_rsi()</a></code> <code><a href="count.html">count_df()</a></code> </p>
</td>
<td><p>Count isolates</p></td>
<td><p>Count available isolates</p></td>
</tr><tr>
<td>
@ -560,7 +560,7 @@
<tr>
<td>
<p><code><a href="AMR-deprecated.html">p.symbol()</a></code> <code><a href="AMR-deprecated.html">portion_R()</a></code> <code><a href="AMR-deprecated.html">portion_IR()</a></code> <code><a href="AMR-deprecated.html">portion_I()</a></code> <code><a href="AMR-deprecated.html">portion_SI()</a></code> <code><a href="AMR-deprecated.html">portion_S()</a></code> </p>
<p><code><a href="AMR-deprecated.html">p.symbol()</a></code> <code><a href="AMR-deprecated.html">portion_R()</a></code> <code><a href="AMR-deprecated.html">portion_IR()</a></code> <code><a href="AMR-deprecated.html">portion_I()</a></code> <code><a href="AMR-deprecated.html">portion_SI()</a></code> <code><a href="AMR-deprecated.html">portion_S()</a></code> <code><a href="AMR-deprecated.html">portion_df()</a></code> </p>
</td>
<td><p>Deprecated functions</p></td>
</tr>

View File

@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Join a table with <code>microorganisms</code> — join • AMR (for R)</title>
<title>Join a table with <a href='microorganisms.html'>microorganisms</a> — join • AMR (for R)</title>
<!-- favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
@ -50,8 +50,8 @@
<link href="../extra.css" rel="stylesheet">
<script src="../extra.js"></script>
<meta property="og:title" content="Join a table with <code>microorganisms</code> — join" />
<meta property="og:description" content="Join the dataset microorganisms easily to an existing table or character vector." />
<meta property="og:title" content="Join a table with <a href='microorganisms.html'>microorganisms</a> — join" />
<meta property="og:description" content="Join the data set microorganisms easily to an existing table or character vector." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -228,13 +228,13 @@
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Join a table with <code>microorganisms</code></h1>
<h1>Join a table with <a href='microorganisms.html'>microorganisms</a></h1>
<div class="hidden name"><code>join.Rd</code></div>
</div>
<div class="ref-description">
<p>Join the dataset <code><a href='microorganisms.html'>microorganisms</a></code> easily to an existing table or character vector.</p>
<p>Join the data set <a href='microorganisms.html'>microorganisms</a> easily to an existing table or character vector.</p>
</div>
<pre class="usage"><span class='fu'>inner_join_microorganisms</span>(<span class='no'>x</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>suffix</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"2"</span>, <span class='st'>""</span>), <span class='no'>...</span>)
@ -258,7 +258,7 @@
</tr>
<tr>
<th>by</th>
<td><p>a variable to join by - if left empty will search for a column with class <code>mo</code> (created with <code><a href='as.mo.html'>as.mo</a></code>) or will be <code>"mo"</code> if that column name exists in <code>x</code>, could otherwise be a column name of <code>x</code> with values that exist in <code>microorganisms$mo</code> (like <code>by = "bacteria_id"</code>), or another column in <code><a href='microorganisms.html'>microorganisms</a></code> (but then it should be named, like <code>by = c("my_genus_species" = "fullname")</code>)</p></td>
<td><p>a variable to join by - if left empty will search for a column with class <code><a href='as.mo.html'>mo</a></code> (created with <code><a href='as.mo.html'>as.mo()</a></code>) or will be <code>"mo"</code> if that column name exists in <code>x</code>, could otherwise be a column name of <code>x</code> with values that exist in <code>microorganisms$mo</code> (like <code>by = "bacteria_id"</code>), or another column in <a href='microorganisms.html'>microorganisms</a> (but then it should be named, like <code>by = c("my_genus_species" = "fullname")</code>)</p></td>
</tr>
<tr>
<th>suffix</th>
@ -266,13 +266,13 @@
</tr>
<tr>
<th>...</th>
<td><p>other parameters to pass on to <code>dplyr::<a href='https://dplyr.tidyverse.org/reference/join.html'>join</a></code>.</p></td>
<td><p>other parameters to pass on to <code><a href='https://dplyr.tidyverse.org/reference/join.html'>dplyr::join()</a></code></p></td>
</tr>
</table>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p><strong>Note:</strong> As opposed to the <code><a href='https://dplyr.tidyverse.org/reference/join.html'>join</a></code> functions of <code>dplyr</code>, characters vectors are supported and at default existing columns will get a suffix <code>"2"</code> and the newly joined columns will not get a suffix. See <code><a href='https://dplyr.tidyverse.org/reference/join.html'>join</a></code> for more information.</p>
<p><strong>Note:</strong> As opposed to the <code><a href='https://dplyr.tidyverse.org/reference/join.html'>dplyr::join()</a></code> functions of <code>dplyr</code>, <code>characters</code> vectors are supported and at default existing columns will get a suffix <code>"2"</code> and the newly joined columns will not get a suffix. See <code><a href='https://dplyr.tidyverse.org/reference/join.html'>dplyr::join()</a></code> for more information.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Key antibiotics for first <em>weighted</em> isolates — key_antibiotics" />
<meta property="og:description" content="These function can be used to determine first isolates (see first_isolate). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates will then be called first weighted isolates." />
<meta property="og:description" content="These function can be used to determine first isolates (see first_isolate()). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates will then be called first weighted isolates." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,28 +234,42 @@
</div>
<div class="ref-description">
<p>These function can be used to determine first isolates (see <code><a href='first_isolate.html'>first_isolate</a></code>). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates will then be called first <em>weighted</em> isolates.</p>
<p>These function can be used to determine first isolates (see <code><a href='first_isolate.html'>first_isolate()</a></code>). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates will then be called first <em>weighted</em> isolates.</p>
</div>
<pre class="usage"><span class='fu'>key_antibiotics</span>(<span class='no'>x</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>universal_1</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>,
<span class='st'>"amoxicillin"</span>), <span class='kw'>universal_2</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>,
<span class='st'>"amoxicillin/clavulanic acid"</span>), <span class='kw'>universal_3</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>,
<span class='st'>"cefuroxime"</span>), <span class='kw'>universal_4</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>,
<span class='st'>"piperacillin/tazobactam"</span>), <span class='kw'>universal_5</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>,
<span class='st'>"ciprofloxacin"</span>), <span class='kw'>universal_6</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>,
<span class='st'>"trimethoprim/sulfamethoxazole"</span>), <span class='kw'>GramPos_1</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>,
<span class='st'>"vancomycin"</span>), <span class='kw'>GramPos_2</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"teicoplanin"</span>),
<pre class="usage"><span class='fu'>key_antibiotics</span>(
<span class='no'>x</span>,
<span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>universal_1</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"amoxicillin"</span>),
<span class='kw'>universal_2</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"amoxicillin/clavulanic acid"</span>),
<span class='kw'>universal_3</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"cefuroxime"</span>),
<span class='kw'>universal_4</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"piperacillin/tazobactam"</span>),
<span class='kw'>universal_5</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"ciprofloxacin"</span>),
<span class='kw'>universal_6</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"trimethoprim/sulfamethoxazole"</span>),
<span class='kw'>GramPos_1</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"vancomycin"</span>),
<span class='kw'>GramPos_2</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"teicoplanin"</span>),
<span class='kw'>GramPos_3</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"tetracycline"</span>),
<span class='kw'>GramPos_4</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"erythromycin"</span>),
<span class='kw'>GramPos_5</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"oxacillin"</span>), <span class='kw'>GramPos_6</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>,
<span class='st'>"rifampin"</span>), <span class='kw'>GramNeg_1</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"gentamicin"</span>),
<span class='kw'>GramPos_5</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"oxacillin"</span>),
<span class='kw'>GramPos_6</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"rifampin"</span>),
<span class='kw'>GramNeg_1</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"gentamicin"</span>),
<span class='kw'>GramNeg_2</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"tobramycin"</span>),
<span class='kw'>GramNeg_3</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"colistin"</span>), <span class='kw'>GramNeg_4</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>,
<span class='st'>"cefotaxime"</span>), <span class='kw'>GramNeg_5</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"ceftazidime"</span>),
<span class='kw'>GramNeg_6</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"meropenem"</span>), <span class='kw'>warnings</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='no'>...</span>)
<span class='kw'>GramNeg_3</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"colistin"</span>),
<span class='kw'>GramNeg_4</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"cefotaxime"</span>),
<span class='kw'>GramNeg_5</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"ceftazidime"</span>),
<span class='kw'>GramNeg_6</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(<span class='no'>x</span>, <span class='st'>"meropenem"</span>),
<span class='kw'>warnings</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='no'>...</span>
)
<span class='fu'>key_antibiotics_equal</span>(<span class='no'>y</span>, <span class='no'>z</span>, <span class='kw'>type</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"keyantibiotics"</span>, <span class='st'>"points"</span>),
<span class='kw'>ignore_I</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>points_threshold</span> <span class='kw'>=</span> <span class='fl'>2</span>, <span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<span class='fu'>key_antibiotics_equal</span>(
<span class='no'>y</span>,
<span class='no'>z</span>,
<span class='kw'>type</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"keyantibiotics"</span>, <span class='st'>"points"</span>),
<span class='kw'>ignore_I</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>points_threshold</span> <span class='kw'>=</span> <span class='fl'>2</span>,
<span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
@ -266,19 +280,19 @@
</tr>
<tr>
<th>col_mo</th>
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo()</a></code>), defaults to the first column of class <code><a href='as.mo.html'>mo</a></code>. Values will be coerced using <code><a href='as.mo.html'>as.mo()</a></code>.</p></td>
</tr>
<tr>
<th>universal_1, universal_2, universal_3, universal_4, universal_5, universal_6</th>
<td><p>column names of <strong>broad-spectrum</strong> antibiotics, case-insensitive. At default, the columns containing these antibiotics will be guessed with <code><a href='guess_ab_col.html'>guess_ab_col</a></code>.</p></td>
<td><p>column names of <strong>broad-spectrum</strong> antibiotics, case-insensitive. At default, the columns containing these antibiotics will be guessed with <code><a href='guess_ab_col.html'>guess_ab_col()</a></code>.</p></td>
</tr>
<tr>
<th>GramPos_1, GramPos_2, GramPos_3, GramPos_4, GramPos_5, GramPos_6</th>
<td><p>column names of antibiotics for <strong>Gram-positives</strong>, case-insensitive. At default, the columns containing these antibiotics will be guessed with <code><a href='guess_ab_col.html'>guess_ab_col</a></code>.</p></td>
<td><p>column names of antibiotics for <strong>Gram-positives</strong>, case-insensitive. At default, the columns containing these antibiotics will be guessed with <code><a href='guess_ab_col.html'>guess_ab_col()</a></code>.</p></td>
</tr>
<tr>
<th>GramNeg_1, GramNeg_2, GramNeg_3, GramNeg_4, GramNeg_5, GramNeg_6</th>
<td><p>column names of antibiotics for <strong>Gram-negatives</strong>, case-insensitive. At default, the columns containing these antibiotics will be guessed with <code><a href='guess_ab_col.html'>guess_ab_col</a></code>.</p></td>
<td><p>column names of antibiotics for <strong>Gram-negatives</strong>, case-insensitive. At default, the columns containing these antibiotics will be guessed with <code><a href='guess_ab_col.html'>guess_ab_col()</a></code>.</p></td>
</tr>
<tr>
<th>warnings</th>
@ -312,22 +326,49 @@
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>The function <code>key_antibiotics</code> returns a character vector with 12 antibiotic results for every isolate. These isolates can then be compared using <code>key_antibiotics_equal</code>, to check if two isolates have generally the same antibiogram. Missing and invalid values are replaced with a dot (<code>"."</code>). The <code><a href='first_isolate.html'>first_isolate</a></code> function only uses this function on the same microbial species from the same patient. Using this, an MRSA will be included after a susceptible <em>S. aureus</em> (MSSA) found within the same episode (see <code>episode</code> parameter of <code><a href='first_isolate.html'>first_isolate</a></code>). Without key antibiotic comparison it would not.</p>
<p>At default, the antibiotics that are used for <strong>Gram-positive bacteria</strong> are: <br />
amoxicillin, amoxicillin/clavulanic acid, cefuroxime, piperacillin/tazobactam, ciprofloxacin, trimethoprim/sulfamethoxazole (until here is universal), vancomycin, teicoplanin, tetracycline, erythromycin, oxacillin, rifampin.</p>
<p>At default, the antibiotics that are used for <strong>Gram-negative bacteria</strong> are: <br />
amoxicillin, amoxicillin/clavulanic acid, cefuroxime, piperacillin/tazobactam, ciprofloxacin, trimethoprim/sulfamethoxazole (until here is universal), gentamicin, tobramycin, colistin, cefotaxime, ceftazidime, meropenem.</p>
<p>The function <code>key_antibiotics()</code> returns a character vector with 12 antibiotic results for every isolate. These isolates can then be compared using <code>key_antibiotics_equal()</code>, to check if two isolates have generally the same antibiogram. Missing and invalid values are replaced with a dot (<code>"."</code>). The <code><a href='first_isolate.html'>first_isolate()</a></code> function only uses this function on the same microbial species from the same patient. Using this, an MRSA will be included after a susceptible <em>S. aureus</em> (MSSA) found within the same episode (see <code>episode</code> parameter of <code><a href='first_isolate.html'>first_isolate()</a></code>). Without key antibiotic comparison it would not.</p>
<p>At default, the antibiotics that are used for <strong>Gram-positive bacteria</strong> are:</p><ul>
<li><p>Amoxicillin</p></li>
<li><p>Amoxicillin/clavulanic acid</p></li>
<li><p>Cefuroxime</p></li>
<li><p>Piperacillin/tazobactam</p></li>
<li><p>Ciprofloxacin</p></li>
<li><p>Trimethoprim/sulfamethoxazole</p></li>
<li><p>Vancomycin</p></li>
<li><p>Teicoplanin</p></li>
<li><p>Tetracycline</p></li>
<li><p>Erythromycin</p></li>
<li><p>Oxacillin</p></li>
<li><p>Rifampin</p></li>
</ul>
<p>The function <code>key_antibiotics_equal</code> checks the characters returned by <code>key_antibiotics</code> for equality, and returns a logical vector.</p>
<p>At default the antibiotics that are used for <strong>Gram-negative bacteria</strong> are:</p><ul>
<li><p>Amoxicillin</p></li>
<li><p>Amoxicillin/clavulanic acid</p></li>
<li><p>Cefuroxime</p></li>
<li><p>Piperacillin/tazobactam</p></li>
<li><p>Ciprofloxacin</p></li>
<li><p>Trimethoprim/sulfamethoxazole</p></li>
<li><p>Gentamicin</p></li>
<li><p>Tobramycin</p></li>
<li><p>Colistin</p></li>
<li><p>Cefotaxime</p></li>
<li><p>Ceftazidime</p></li>
<li><p>Meropenem</p></li>
</ul>
<p>The function <code>key_antibiotics_equal()</code> checks the characters returned by <code>key_antibiotics()</code> for equality, and returns a <code><a href='https://rdrr.io/r/base/logical.html'>logical</a></code> vector.</p>
<h2 class="hasAnchor" id="key-antibiotics"><a class="anchor" href="#key-antibiotics"></a>Key antibiotics</h2>
<p>There are two ways to determine whether isolates can be included as first <em>weighted</em> isolates which will give generally the same results: <br /></p>
<p><strong>1. Using</strong> <code>type = "keyantibiotics"</code> <strong>and parameter</strong> <code>ignore_I</code> <br />
Any difference from S to R (or vice versa) will (re)select an isolate as a first weighted isolate. With <code>ignore_I = FALSE</code>, also differences from I to S|R (or vice versa) will lead to this. This is a reliable method and 30-35 times faster than method 2. Read more about this in the <code>key_antibiotics</code> function. <br /></p>
<p><strong>2. Using</strong> <code>type = "points"</code> <strong>and parameter</strong> <code>points_threshold</code> <br />
A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds <code>points_threshold</code>, which default to <code>2</code>, an isolate will be (re)selected as a first weighted isolate.</p>
<p>There are two ways to determine whether isolates can be included as first <em>weighted</em> isolates which will give generally the same results:</p><ol>
<li><p>Using <code>type = "keyantibiotics"</code> and parameter <code>ignore_I</code></p>
<p>Any difference from S to R (or vice versa) will (re)select an isolate as a first weighted isolate. With <code>ignore_I = FALSE</code>, also differences from I to S|R (or vice versa) will lead to this. This is a reliable method and 30-35 times faster than method 2. Read more about this in the <code>key_antibiotics()</code> function.</p></li>
<li><p>Using <code>type = "points"</code> and parameter <code>points_threshold</code></p>
<p>A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds <code>points_threshold</code>, which default to <code>2</code>, an isolate will be (re)selected as a first weighted isolate.</p></li>
</ol>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -335,7 +376,7 @@
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='first_isolate.html'>first_isolate</a></code></p></div>
<div class='dont-index'><p><code><a href='first_isolate.html'>first_isolate()</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># `example_isolates` is a dataset available in the AMR package.</span>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -253,7 +253,7 @@
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>a vector of values, a <code>matrix</code> or a <code>data frame</code></p></td>
<td><p>a vector of values, a <code><a href='https://rdrr.io/r/base/matrix.html'>matrix</a></code> or a <code>data frame</code></p></td>
</tr>
<tr>
<th>na.rm</th>
@ -268,7 +268,7 @@
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='skewness.html'>skewness</a></code></p></div>
<div class='dont-index'><p><code><a href='skewness.html'>skewness()</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Pattern Matching — like" />
<meta property="og:description" content="Convenient wrapper around grep to match a pattern: a %like% b. It always returns a logical vector and is always case-insensitive (use a %like_case% b for case-sensitive matching). Also, pattern (b) can be as long as x (a) to compare items of each index in both vectors, or can both have the same length to iterate over all cases." />
<meta property="og:description" content="Convenient wrapper around base::grep() to match a pattern: a %like% b. It always returns a logical vector and is always case-insensitive (use a %like_case% b for case-sensitive matching). Also, pattern (b) can be as long as x (a) to compare items of each index in both vectors, or can both have the same length to iterate over all cases." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>Convenient wrapper around <code><a href='https://rdrr.io/r/base/grep.html'>grep</a></code> to match a pattern: <code>a %like% b</code>. It always returns a <code>logical</code> vector and is always case-insensitive (use <code>a %like_case% b</code> for case-sensitive matching). Also, <code>pattern</code> (<code>b</code>) can be as long as <code>x</code> (<code>a</code>) to compare items of each index in both vectors, or can both have the same length to iterate over all cases.</p>
<p>Convenient wrapper around <code><a href='https://rdrr.io/r/base/grep.html'>base::grep()</a></code> to match a pattern: <code>a %like% b</code>. It always returns a <code><a href='https://rdrr.io/r/base/logical.html'>logical</a></code> vector and is always case-insensitive (use <code>a %like_case% b</code> for case-sensitive matching). Also, <code>pattern</code> (<em>b</em>) can be as long as <code>x</code> (<em>a</em>) to compare items of each index in both vectors, or can both have the same length to iterate over all cases.</p>
</div>
<pre class="usage"><span class='fu'>like</span>(<span class='no'>x</span>, <span class='no'>pattern</span>, <span class='kw'>ignore.case</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
@ -274,10 +274,10 @@
<p>Idea from the <a href='https://github.com/Rdatatable/data.table/blob/master/R/like.R'><code>like</code> function from the <code>data.table</code> package</a>, but made it case insensitive at default and let it support multiple patterns. Also, if the regex fails the first time, it tries again with <code>perl = TRUE</code>.</p>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A <code>logical</code> vector</p>
<p>A <code><a href='https://rdrr.io/r/base/logical.html'>logical</a></code> vector</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>Using RStudio? This function can also be inserted from the Addins menu and can have its own Keyboard Shortcut like Ctrl+Shift+L or Cmd+Shift+L (see Tools &gt; Modify Keyboard Shortcuts...).</p>
<p>Using RStudio? This function can also be inserted from the Addins menu and can have its own Keyboard Shortcut like <code>Ctrl+Shift+L</code> or <code>Cmd+Shift+L</code> (see <code>Tools</code> &gt; <code>Modify Keyboard Shortcuts...</code>).</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -285,7 +285,7 @@
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='https://rdrr.io/r/base/grep.html'>grep</a></code></p></div>
<div class='dont-index'><p><code><a href='https://rdrr.io/r/base/grep.html'>base::grep()</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># simple test</span>

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9033</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -237,9 +237,16 @@
<p>Determine which isolates are multidrug-resistant organisms (MDRO) according to international and national guidelines.</p>
</div>
<pre class="usage"><span class='fu'>mdro</span>(<span class='no'>x</span>, <span class='kw'>guideline</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>pct_required_classes</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='no'>...</span>)
<pre class="usage"><span class='fu'>mdro</span>(
<span class='no'>x</span>,
<span class='kw'>guideline</span> <span class='kw'>=</span> <span class='st'>"CMI2012"</span>,
<span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>pct_required_classes</span> <span class='kw'>=</span> <span class='fl'>0.5</span>,
<span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='no'>...</span>
)
<span class='fu'>brmo</span>(<span class='no'>x</span>, <span class='kw'>guideline</span> <span class='kw'>=</span> <span class='st'>"BRMO"</span>, <span class='no'>...</span>)
@ -260,15 +267,15 @@
</tr>
<tr>
<th>guideline</th>
<td><p>a specific guideline to follow. When left empty, the publication by Magiorakos <em>et al.</em> (2012, Clinical Microbiology and Infection) will be followed, see Details.</p></td>
<td><p>a specific guideline to follow. When left empty, the publication by Magiorakos <em>et al.</em> (2012, Clinical Microbiology and Infection) will be followed, please see <em>Details</em>.</p></td>
</tr>
<tr>
<th>col_mo</th>
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><a href='as.mo.html'>as.mo</a></code>.</p></td>
<td><p>column name of the IDs of the microorganisms (see <code><a href='as.mo.html'>as.mo()</a></code>), defaults to the first column of class <code><a href='as.mo.html'>mo</a></code>. Values will be coerced using <code><a href='as.mo.html'>as.mo()</a></code>.</p></td>
</tr>
<tr>
<th>info</th>
<td><p>print progress</p></td>
<td><p>a logical to indicate whether progress should be printed to the console</p></td>
</tr>
<tr>
<th>pct_required_classes</th>
@ -284,32 +291,41 @@
</tr>
<tr>
<th>...</th>
<td><p>column name of an antibiotic, see section Antibiotics</p></td>
<td><p>column name of an antibiotic, please see section <em>Antibiotics</em> below</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
<p>Please see Details for the list of publications used for this function.</p>
<p>Please see <em>Details</em> for the list of publications used for this function.</p>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<ul>
<li><p>CMI 2012 paper - function <code>mdr_cmi2012()</code> or <code>mdro()</code>:<br /> Ordered factor with levels <code>Negative &lt; Multi-drug-resistant (MDR) &lt; Extensively drug-resistant (XDR) &lt; Pandrug-resistant (PDR)</code></p></li>
<li><p>TB guideline - function <code>mdr_tb()</code> or <code>mdro(..., guideline = "TB")</code>:<br /> Ordered factor with levels <code>Negative &lt; Mono-resistant &lt; Poly-resistant &lt; Multi-drug-resistant &lt; Extensively drug-resistant</code></p></li>
<li><p>German guideline - function <code>mrgn()</code> or <code>mdro(..., guideline = "MRGN")</code>:<br /> Ordered factor with levels <code>Negative &lt; 3MRGN &lt; 4MRGN</code></p></li>
<li><p>Everything else:<br /> Ordered factor with levels <code>Negative &lt; Positive, unconfirmed &lt; Positive</code>. The value <code>"Positive, unconfirmed"</code> means that, according to the guideline, it is not entirely sure if the isolate is multi-drug resistant and this should be confirmed with additional (e.g. molecular) tests</p></li>
<li><p>CMI 2012 paper - function <code>mdr_cmi2012()</code> or <code>mdro()</code>:<br />
Ordered <code><a href='https://rdrr.io/r/base/factor.html'>factor</a></code> with levels <code>Negative</code> &lt; <code>Multi-drug-resistant (MDR)</code> &lt; <code>Extensively drug-resistant (XDR)</code> &lt; <code>Pandrug-resistant (PDR)</code></p></li>
<li><p>TB guideline - function <code>mdr_tb()</code> or <code>mdro(..., guideline = "TB")</code>:<br />
Ordered <code><a href='https://rdrr.io/r/base/factor.html'>factor</a></code> with levels <code>Negative</code> &lt; <code>Mono-resistant</code> &lt; <code>Poly-resistant</code> &lt; <code>Multi-drug-resistant</code> &lt; <code>Extensively drug-resistant</code></p></li>
<li><p>German guideline - function <code>mrgn()</code> or <code>mdro(..., guideline = "MRGN")</code>:<br />
Ordered <code><a href='https://rdrr.io/r/base/factor.html'>factor</a></code> with levels <code>Negative</code> &lt; <code>3MRGN</code> &lt; <code>4MRGN</code></p></li>
<li><p>Everything else:<br />
Ordered <code><a href='https://rdrr.io/r/base/factor.html'>factor</a></code> with levels <code>Negative</code> &lt; <code>Positive, unconfirmed</code> &lt; <code>Positive</code>. The value <code>"Positive, unconfirmed"</code> means that, according to the guideline, it is not entirely sure if the isolate is multi-drug resistant and this should be confirmed with additional (e.g. molecular) tests</p></li>
</ul>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>For the <code>pct_required_classes</code> argument, values above 1 will be divided by 100. This is to support both fractions (<code>0.75</code> or <code>3/4</code>) and percentages (<code>75</code>).</p>
<p>Currently supported guidelines are (case-insensitive):</p><ul>
<li><p><code>guideline = "CMI2012"</code>: Magiorakos AP, Srinivasan A <em>et al.</em> "Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance." Clinical Microbiology and Infection (2012) (<a href='https://www.clinicalmicrobiologyandinfection.com/article/S1198-743X(14)61632-3/fulltext'>link</a>)</p></li>
<li><p><code>guideline = "EUCAST"</code>: The European international guideline - EUCAST Expert Rules Version 3.1 "Intrinsic Resistance and Exceptional Phenotypes Tables" (<a href='http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf'>link</a>)</p></li>
<li><p><code>guideline = "TB"</code>: The international guideline for multi-drug resistant tuberculosis - World Health Organization "Companion handbook to the WHO guidelines for the programmatic management of drug-resistant tuberculosis" (<a href='https://www.who.int/tb/publications/pmdt_companionhandbook/en/'>link</a>)</p></li>
<li><p><code>guideline = "MRGN"</code>: The German national guideline - Mueller et al. (2015) Antimicrobial Resistance and Infection Control 4:7. DOI: 10.1186/s13756-015-0047-6</p></li>
<li><p><code>guideline = "BRMO"</code>: The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WIP-richtlijn BRMO (Bijzonder Resistente Micro-Organismen) [ZKH]" (<a href='https://www.rivm.nl/Documenten_en_publicaties/Professioneel_Praktisch/Richtlijnen/Infectieziekten/WIP_Richtlijnen/WIP_Richtlijnen/Ziekenhuizen/WIP_richtlijn_BRMO_Bijzonder_Resistente_Micro_Organismen_ZKH'>link</a>)</p></li>
<li><p><code>guideline = "CMI2012"</code><br />
Magiorakos AP, Srinivasan A <em>et al.</em> "Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance." Clinical Microbiology and Infection (2012) (<a href='https://www.clinicalmicrobiologyandinfection.com/article/S1198-743X(14)61632-3/fulltext'>link</a>)</p></li>
<li><p><code>guideline = "EUCAST"</code><br />
The European international guideline - EUCAST Expert Rules Version 3.1 "Intrinsic Resistance and Exceptional Phenotypes Tables" (<a href='http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf'>link</a>)</p></li>
<li><p><code>guideline = "TB"</code><br />
The international guideline for multi-drug resistant tuberculosis - World Health Organization "Companion handbook to the WHO guidelines for the programmatic management of drug-resistant tuberculosis" (<a href='https://www.who.int/tb/publications/pmdt_companionhandbook/en/'>link</a>)</p></li>
<li><p><code>guideline = "MRGN"</code><br />
The German national guideline - Mueller et al. (2015) Antimicrobial Resistance and Infection Control 4:7. DOI: 10.1186/s13756-015-0047-6</p></li>
<li><p><code>guideline = "BRMO"</code><br />
The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WIP-richtlijn BRMO (Bijzonder Resistente Micro-Organismen) ZKH" (<a href='https://www.rivm.nl/Documenten_en_publicaties/Professioneel_Praktisch/Richtlijnen/Infectieziekten/WIP_Richtlijnen/WIP_Richtlijnen/Ziekenhuizen/WIP_richtlijn_BRMO_Bijzonder_Resistente_Micro_Organismen_ZKH'>link</a>)</p></li>
</ul>
<p>Please suggest your own (country-specific) guidelines by letting us know: <a href='https://gitlab.com/msberends/AMR/issues/new'>https://gitlab.com/msberends/AMR/issues/new</a>.</p>
@ -318,100 +334,99 @@
<p>To define antibiotics column names, leave as it is to determine it automatically with <code><a href='guess_ab_col.html'>guess_ab_col</a></code> or input a text (case-insensitive), or use <code>NULL</code> to skip a column (e.g. <code>TIC = NULL</code> to skip ticarcillin). Manually defined but non-existing columns will be skipped with a warning.</p>
<p>The following antibiotics are used for the functions <code><a href='eucast_rules.html'>eucast_rules</a></code> and <code>mdro</code>. These are shown below in the format '<strong>antimicrobial ID</strong>: name (<a href='https://www.whocc.no/atc/structure_and_principles/'>ATC code</a>)', sorted by name:</p>
<p>To define antibiotics column names, leave as it is to determine it automatically with <code><a href='guess_ab_col.html'>guess_ab_col()</a></code> or input a text (case-insensitive), or use <code>NULL</code> to skip a column (e.g. <code>TIC = NULL</code> to skip ticarcillin). Manually defined but non-existing columns will be skipped with a warning.</p>
<p>The following antibiotics are used for the functions <code><a href='eucast_rules.html'>eucast_rules()</a></code> and <code>mdro()</code>. These are shown below in the format '<strong>antimicrobial ID</strong>: name (<a href='https://www.whocc.no/atc/structure_and_principles/'>ATC code</a>)', sorted by name:</p>
<p><strong>AMK</strong>: amikacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB06'>J01GB06</a>),
<strong>AMX</strong>: amoxicillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA04'>J01CA04</a>),
<strong>AMC</strong>: amoxicillin/clavulanic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR02'>J01CR02</a>),
<strong>AMP</strong>: ampicillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA01'>J01CA01</a>),
<strong>SAM</strong>: ampicillin/sulbactam (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR01'>J01CR01</a>),
<strong>AZM</strong>: azithromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA10'>J01FA10</a>),
<strong>AZL</strong>: azlocillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA09'>J01CA09</a>),
<strong>ATM</strong>: aztreonam (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DF01'>J01DF01</a>),
<strong>CAP</strong>: capreomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB30'>J04AB30</a>),
<strong>RID</strong>: cefaloridine (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DB02'>J01DB02</a>),
<strong>CZO</strong>: cefazolin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DB04'>J01DB04</a>),
<strong>FEP</strong>: cefepime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DE01'>J01DE01</a>),
<strong>CTX</strong>: cefotaxime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DD01'>J01DD01</a>),
<strong>CTT</strong>: cefotetan (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DC05'>J01DC05</a>),
<strong>FOX</strong>: cefoxitin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DC01'>J01DC01</a>),
<strong>CPT</strong>: ceftaroline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DI02'>J01DI02</a>),
<strong>CAZ</strong>: ceftazidime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DD02'>J01DD02</a>),
<strong>CRO</strong>: ceftriaxone (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DD04'>J01DD04</a>),
<strong>CXM</strong>: cefuroxime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DC02'>J01DC02</a>),
<strong>CED</strong>: cephradine (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DB09'>J01DB09</a>),
<strong>CHL</strong>: chloramphenicol (<a href='https://www.whocc.no/atc_ddd_index/?code=J01BA01'>J01BA01</a>),
<strong>CIP</strong>: ciprofloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA02'>J01MA02</a>),
<strong>CLR</strong>: clarithromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA09'>J01FA09</a>),
<strong>CLI</strong>: clindamycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FF01'>J01FF01</a>),
<strong>COL</strong>: colistin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XB01'>J01XB01</a>),
<strong>DAP</strong>: daptomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XX09'>J01XX09</a>),
<strong>DOR</strong>: doripenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH04'>J01DH04</a>),
<strong>DOX</strong>: doxycycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA02'>J01AA02</a>),
<strong>ETP</strong>: ertapenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH03'>J01DH03</a>),
<strong>ERY</strong>: erythromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA01'>J01FA01</a>),
<strong>ETH</strong>: ethambutol (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AK02'>J04AK02</a>),
<strong>FLC</strong>: flucloxacillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CF05'>J01CF05</a>),
<strong>FOS</strong>: fosfomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XX01'>J01XX01</a>),
<strong>FUS</strong>: fusidic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XC01'>J01XC01</a>),
<strong>GAT</strong>: gatifloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA16'>J01MA16</a>),
<strong>GEN</strong>: gentamicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB03'>J01GB03</a>),
<strong>GEH</strong>: gentamicin-high (no ATC code),
<strong>IPM</strong>: imipenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH51'>J01DH51</a>),
<strong>INH</strong>: isoniazid (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AC01'>J04AC01</a>),
<strong>KAN</strong>: kanamycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB04'>J01GB04</a>),
<strong>LVX</strong>: levofloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA12'>J01MA12</a>),
<strong>LIN</strong>: lincomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FF02'>J01FF02</a>),
<strong>LNZ</strong>: linezolid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XX08'>J01XX08</a>),
<strong>MEM</strong>: meropenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH02'>J01DH02</a>),
<strong>MTR</strong>: metronidazole (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XD01'>J01XD01</a>),
<strong>MEZ</strong>: mezlocillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA10'>J01CA10</a>),
<strong>MNO</strong>: minocycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA08'>J01AA08</a>),
<strong>MFX</strong>: moxifloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA14'>J01MA14</a>),
<strong>NAL</strong>: nalidixic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MB02'>J01MB02</a>),
<strong>NEO</strong>: neomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB05'>J01GB05</a>),
<strong>NET</strong>: netilmicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB07'>J01GB07</a>),
<strong>NIT</strong>: nitrofurantoin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XE01'>J01XE01</a>),
<strong>NOR</strong>: norfloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA06'>J01MA06</a>),
<strong>NOV</strong>: novobiocin (<a href='https://www.whocc.no/atc_ddd_index/?code=QJ01XX95'>QJ01XX95</a>),
<strong>OFX</strong>: ofloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA01'>J01MA01</a>),
<strong>OXA</strong>: oxacillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CF04'>J01CF04</a>),
<strong>PEN</strong>: penicillin G (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CE01'>J01CE01</a>),
<strong>PIP</strong>: piperacillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA12'>J01CA12</a>),
<strong>TZP</strong>: piperacillin/tazobactam (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR05'>J01CR05</a>),
<strong>PLB</strong>: polymyxin B (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XB02'>J01XB02</a>),
<strong>PRI</strong>: pristinamycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FG01'>J01FG01</a>),
<strong>PZA</strong>: pyrazinamide (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AK01'>J04AK01</a>),
<strong>QDA</strong>: quinupristin/dalfopristin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FG02'>J01FG02</a>),
<strong>RIB</strong>: rifabutin (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB04'>J04AB04</a>),
<strong>RIF</strong>: rifampicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB02'>J04AB02</a>),
<strong>RFP</strong>: rifapentine (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB05'>J04AB05</a>),
<strong>RXT</strong>: roxithromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA06'>J01FA06</a>),
<strong>SIS</strong>: sisomicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB08'>J01GB08</a>),
<strong>STH</strong>: streptomycin-high (no ATC code),
<strong>TEC</strong>: teicoplanin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XA02'>J01XA02</a>),
<strong>TLV</strong>: telavancin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XA03'>J01XA03</a>),
<strong>TCY</strong>: tetracycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA07'>J01AA07</a>),
<strong>TIC</strong>: ticarcillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA13'>J01CA13</a>),
<strong>TCC</strong>: ticarcillin/clavulanic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR03'>J01CR03</a>),
<strong>TGC</strong>: tigecycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA12'>J01AA12</a>),
<strong>TOB</strong>: tobramycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB01'>J01GB01</a>),
<strong>TMP</strong>: trimethoprim (<a href='https://www.whocc.no/atc_ddd_index/?code=J01EA01'>J01EA01</a>),
<strong>SXT</strong>: trimethoprim/sulfamethoxazole (<a href='https://www.whocc.no/atc_ddd_index/?code=J01EE01'>J01EE01</a>),
<strong>VAN</strong>: vancomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XA01'>J01XA01</a>).</p>
<strong>AMX</strong>: amoxicillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA04'>J01CA04</a>),
<strong>AMC</strong>: amoxicillin/clavulanic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR02'>J01CR02</a>),
<strong>AMP</strong>: ampicillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA01'>J01CA01</a>),
<strong>SAM</strong>: ampicillin/sulbactam (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR01'>J01CR01</a>),
<strong>AZM</strong>: azithromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA10'>J01FA10</a>),
<strong>AZL</strong>: azlocillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA09'>J01CA09</a>),
<strong>ATM</strong>: aztreonam (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DF01'>J01DF01</a>),
<strong>CAP</strong>: capreomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB30'>J04AB30</a>),
<strong>RID</strong>: cefaloridine (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DB02'>J01DB02</a>),
<strong>CZO</strong>: cefazolin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DB04'>J01DB04</a>),
<strong>FEP</strong>: cefepime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DE01'>J01DE01</a>),
<strong>CTX</strong>: cefotaxime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DD01'>J01DD01</a>),
<strong>CTT</strong>: cefotetan (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DC05'>J01DC05</a>),
<strong>FOX</strong>: cefoxitin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DC01'>J01DC01</a>),
<strong>CPT</strong>: ceftaroline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DI02'>J01DI02</a>),
<strong>CAZ</strong>: ceftazidime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DD02'>J01DD02</a>),
<strong>CRO</strong>: ceftriaxone (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DD04'>J01DD04</a>),
<strong>CXM</strong>: cefuroxime (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DC02'>J01DC02</a>),
<strong>CED</strong>: cephradine (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DB09'>J01DB09</a>),
<strong>CHL</strong>: chloramphenicol (<a href='https://www.whocc.no/atc_ddd_index/?code=J01BA01'>J01BA01</a>),
<strong>CIP</strong>: ciprofloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA02'>J01MA02</a>),
<strong>CLR</strong>: clarithromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA09'>J01FA09</a>),
<strong>CLI</strong>: clindamycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FF01'>J01FF01</a>),
<strong>COL</strong>: colistin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XB01'>J01XB01</a>),
<strong>DAP</strong>: daptomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XX09'>J01XX09</a>),
<strong>DOR</strong>: doripenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH04'>J01DH04</a>),
<strong>DOX</strong>: doxycycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA02'>J01AA02</a>),
<strong>ETP</strong>: ertapenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH03'>J01DH03</a>),
<strong>ERY</strong>: erythromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA01'>J01FA01</a>),
<strong>ETH</strong>: ethambutol (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AK02'>J04AK02</a>),
<strong>FLC</strong>: flucloxacillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CF05'>J01CF05</a>),
<strong>FOS</strong>: fosfomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XX01'>J01XX01</a>),
<strong>FUS</strong>: fusidic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XC01'>J01XC01</a>),
<strong>GAT</strong>: gatifloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA16'>J01MA16</a>),
<strong>GEN</strong>: gentamicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB03'>J01GB03</a>),
<strong>GEH</strong>: gentamicin-high (no ATC code),
<strong>IPM</strong>: imipenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH51'>J01DH51</a>),
<strong>INH</strong>: isoniazid (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AC01'>J04AC01</a>),
<strong>KAN</strong>: kanamycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB04'>J01GB04</a>),
<strong>LVX</strong>: levofloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA12'>J01MA12</a>),
<strong>LIN</strong>: lincomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FF02'>J01FF02</a>),
<strong>LNZ</strong>: linezolid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XX08'>J01XX08</a>),
<strong>MEM</strong>: meropenem (<a href='https://www.whocc.no/atc_ddd_index/?code=J01DH02'>J01DH02</a>),
<strong>MTR</strong>: metronidazole (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XD01'>J01XD01</a>),
<strong>MEZ</strong>: mezlocillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA10'>J01CA10</a>),
<strong>MNO</strong>: minocycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA08'>J01AA08</a>),
<strong>MFX</strong>: moxifloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA14'>J01MA14</a>),
<strong>NAL</strong>: nalidixic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MB02'>J01MB02</a>),
<strong>NEO</strong>: neomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB05'>J01GB05</a>),
<strong>NET</strong>: netilmicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB07'>J01GB07</a>),
<strong>NIT</strong>: nitrofurantoin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XE01'>J01XE01</a>),
<strong>NOR</strong>: norfloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA06'>J01MA06</a>),
<strong>NOV</strong>: novobiocin (<a href='https://www.whocc.no/atc_ddd_index/?code=QJ01XX95'>QJ01XX95</a>),
<strong>OFX</strong>: ofloxacin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01MA01'>J01MA01</a>),
<strong>OXA</strong>: oxacillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CF04'>J01CF04</a>),
<strong>PEN</strong>: penicillin G (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CE01'>J01CE01</a>),
<strong>PIP</strong>: piperacillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA12'>J01CA12</a>),
<strong>TZP</strong>: piperacillin/tazobactam (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR05'>J01CR05</a>),
<strong>PLB</strong>: polymyxin B (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XB02'>J01XB02</a>),
<strong>PRI</strong>: pristinamycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FG01'>J01FG01</a>),
<strong>PZA</strong>: pyrazinamide (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AK01'>J04AK01</a>),
<strong>QDA</strong>: quinupristin/dalfopristin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FG02'>J01FG02</a>),
<strong>RIB</strong>: rifabutin (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB04'>J04AB04</a>),
<strong>RIF</strong>: rifampicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB02'>J04AB02</a>),
<strong>RFP</strong>: rifapentine (<a href='https://www.whocc.no/atc_ddd_index/?code=J04AB05'>J04AB05</a>),
<strong>RXT</strong>: roxithromycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01FA06'>J01FA06</a>),
<strong>SIS</strong>: sisomicin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB08'>J01GB08</a>),
<strong>STH</strong>: streptomycin-high (no ATC code),
<strong>TEC</strong>: teicoplanin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XA02'>J01XA02</a>),
<strong>TLV</strong>: telavancin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XA03'>J01XA03</a>),
<strong>TCY</strong>: tetracycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA07'>J01AA07</a>),
<strong>TIC</strong>: ticarcillin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CA13'>J01CA13</a>),
<strong>TCC</strong>: ticarcillin/clavulanic acid (<a href='https://www.whocc.no/atc_ddd_index/?code=J01CR03'>J01CR03</a>),
<strong>TGC</strong>: tigecycline (<a href='https://www.whocc.no/atc_ddd_index/?code=J01AA12'>J01AA12</a>),
<strong>TOB</strong>: tobramycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01GB01'>J01GB01</a>),
<strong>TMP</strong>: trimethoprim (<a href='https://www.whocc.no/atc_ddd_index/?code=J01EA01'>J01EA01</a>),
<strong>SXT</strong>: trimethoprim/sulfamethoxazole (<a href='https://www.whocc.no/atc_ddd_index/?code=J01EE01'>J01EE01</a>),
<strong>VAN</strong>: vancomycin (<a href='https://www.whocc.no/atc_ddd_index/?code=J01XA01'>J01XA01</a>).</p>
<h2 class="hasAnchor" id="interpretation-of-s-i-and-r"><a class="anchor" href="#interpretation-of-s-i-and-r"></a>Interpretation of S, I and R</h2>
<p>In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p>
<ul>
<p>In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p><ul>
<li><p><strong>S</strong> - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.</p></li>
<li><p><strong>I</strong> - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.</p></li>
<li><p><strong>R</strong> - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure.</p></li>
</ul>
<p>Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.</p>
<p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility</a>()</code> (equal to <code><a href='proportion.html'>proportion_SI</a>()</code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible</a>()</code> (equal to <code><a href='count.html'>count_SI</a>()</code>) to count susceptible isolates.</p>
<p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility()</a></code> (equal to <code><a href='proportion.html'>proportion_SI()</a></code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible()</a></code> (equal to <code><a href='count.html'>count_SI()</a></code>) to count susceptible isolates.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Translation table for common microorganism codes — microorganisms.codes" />
<meta property="og:description" content="A data set containing commonly used codes for microorganisms, from laboratory systems and WHONET. Define your own with set_mo_source." />
<meta property="og:description" content="A data set containing commonly used codes for microorganisms, from laboratory systems and WHONET. Define your own with set_mo_source()." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9035</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>A data set containing commonly used codes for microorganisms, from laboratory systems and WHONET. Define your own with <code><a href='mo_source.html'>set_mo_source</a></code>.</p>
<p>A data set containing commonly used codes for microorganisms, from laboratory systems and WHONET. Define your own with <code><a href='mo_source.html'>set_mo_source()</a></code>.</p>
</div>
<pre class="usage"><span class='no'>microorganisms.codes</span></pre>
@ -242,18 +242,17 @@
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
<p>A <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 5,433 observations and 2 variables:</p><dl class='dl-horizontal'>
<dt><code>code</code></dt><dd><p>Commonly used code of a microorganism</p></dd>
<dt><code>mo</code></dt><dd><p>ID of the microorganism in the <code><a href='microorganisms.html'>microorganisms</a></code> data set</p></dd>
</dl>
<p>A <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 5,433 observations and 2 variables:</p><ul>
<li><p><code>code</code><br /> Commonly used code of a microorganism</p></li>
<li><p><code>mo</code><br /> ID of the microorganism in the <a href='microorganisms.html'>microorganisms</a> data set</p></li>
</ul>
<h2 class="hasAnchor" id="catalogue-of-life"><a class="anchor" href="#catalogue-of-life"></a>Catalogue of Life</h2>
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a>()</code>.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -261,7 +260,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='as.mo.html'>as.mo</a></code> <code><a href='microorganisms.html'>microorganisms</a></code></p></div>
<div class='dont-index'><p><code><a href='as.mo.html'>as.mo()</a></code> <a href='microorganisms.html'>microorganisms</a></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Data set with ~70,000 microorganisms — microorganisms" />
<meta property="og:description" content="A data set containing the microbial taxonomy of six kingdoms from the Catalogue of Life. MO codes can be looked up using as.mo." />
<meta property="og:description" content="A data set containing the microbial taxonomy of six kingdoms from the Catalogue of Life. MO codes can be looked up using as.mo()." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>A data set containing the microbial taxonomy of six kingdoms from the Catalogue of Life. MO codes can be looked up using <code><a href='as.mo.html'>as.mo</a></code>.</p>
<p>A data set containing the microbial taxonomy of six kingdoms from the Catalogue of Life. MO codes can be looked up using <code><a href='as.mo.html'>as.mo()</a></code>.</p>
</div>
<pre class="usage"><span class='no'>microorganisms</span></pre>
@ -242,27 +242,26 @@
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
<p>A <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 69,447 observations and 16 variables:</p><dl class='dl-horizontal'>
<dt><code>mo</code></dt><dd><p>ID of microorganism as used by this package</p></dd>
<dt><code>col_id</code></dt><dd><p>Catalogue of Life ID</p></dd>
<dt><code>fullname</code></dt><dd><p>Full name, like <code>"Escherichia coli"</code></p></dd>
<dt><code>kingdom</code>, <code>phylum</code>, <code>class</code>, <code>order</code>, <code>family</code>, <code>genus</code>, <code>species</code>, <code>subspecies</code></dt><dd><p>Taxonomic rank of the microorganism</p></dd>
<dt><code>rank</code></dt><dd><p>Text of the taxonomic rank of the microorganism, like <code>"species"</code> or <code>"genus"</code></p></dd>
<dt><code>ref</code></dt><dd><p>Author(s) and year of concerning scientific publication</p></dd>
<dt><code>species_id</code></dt><dd><p>ID of the species as used by the Catalogue of Life</p></dd>
<dt><code>source</code></dt><dd><p>Either "CoL", "DSMZ" (see Source) or "manually added"</p></dd>
<dt><code>prevalence</code></dt><dd><p>Prevalence of the microorganism, see <code><a href='as.mo.html'>?as.mo</a></code></p></dd>
</dl>
<p>A <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 69,447 observations and 16 variables:</p><ul>
<li><p><code>mo</code><br /> ID of microorganism as used by this package</p></li>
<li><p><code>col_id</code><br /> Catalogue of Life ID</p></li>
<li><p><code>fullname</code><br /> Full name, like <code>"Escherichia coli"</code></p></li>
<li><p><code>kingdom</code>, <code>phylum</code>, <code>class</code>, <code>order</code>, <code>family</code>, <code>genus</code>, <code>species</code>, <code>subspecies</code><br /> Taxonomic rank of the microorganism</p></li>
<li><p><code>rank</code><br /> Text of the taxonomic rank of the microorganism, like <code>"species"</code> or <code>"genus"</code></p></li>
<li><p><code>ref</code><br /> Author(s) and year of concerning scientific publication</p></li>
<li><p><code>species_id</code><br /> ID of the species as used by the Catalogue of Life</p></li>
<li><p><code>source</code><br /> Either "CoL", "DSMZ" (see Source) or "manually added"</p></li>
<li><p><code>prevalence</code><br /> Prevalence of the microorganism, see <code><a href='as.mo.html'>as.mo()</a></code></p></li>
</ul>
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
<p>Catalogue of Life: Annual Checklist (public online taxonomic database), <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a> (check included annual version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a>()</code>).</p>
<p>Leibniz Institute DSMZ-German Collection of Microorganisms and Cell Cultures, Germany, Prokaryotic Nomenclature Up-to-Date, <a href='http://www.dsmz.de/bacterial-diversity/prokaryotic-nomenclature-up-to-date'>http://www.dsmz.de/bacterial-diversity/prokaryotic-nomenclature-up-to-date</a> (check included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a>()</code>).</p>
<p>Catalogue of Life: Annual Checklist (public online taxonomic database), <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a> (check included annual version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>).</p>
<p>Leibniz Institute DSMZ-German Collection of Microorganisms and Cell Cultures, Germany, Prokaryotic Nomenclature Up-to-Date, <a href='http://www.dsmz.de/bacterial-diversity/prokaryotic-nomenclature-up-to-date'>http://www.dsmz.de/bacterial-diversity/prokaryotic-nomenclature-up-to-date</a> (check included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>).</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>Manually added were:</p><ul>
<li><p>11 entries of <em>Streptococcus</em> (beta-haemolytic: groups A, B, C, D, F, G, H, K and unspecified; other: viridans, milleri)</p></li>
<li><p>2 entries of <em>Staphylococcus</em> (coagulase-negative [CoNS] and coagulase-positive [CoPS])</p></li>
<li><p>2 entries of <em>Staphylococcus</em> (coagulase-negative CoNS and coagulase-positive CoPS)</p></li>
<li><p>3 entries of <em>Trichomonas</em> (<em>Trichomonas vaginalis</em>, and its family and genus)</p></li>
<li><p>1 entry of <em>Blastocystis</em> (<em>Blastocystis hominis</em>), although it officially does not exist (Noel <em>et al.</em> 2005, PMID 15634993)</p></li>
<li><p>5 other 'undefined' entries (unknown, unknown Gram negatives, unknown Gram positives, unknown yeast and unknown fungus)</p></li>
@ -282,7 +281,7 @@
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a>()</code>.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -290,7 +289,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='as.mo.html'>as.mo</a></code>, <code><a href='mo_property.html'>mo_property</a></code>, <code><a href='microorganisms.codes.html'>microorganisms.codes</a></code></p></div>
<div class='dont-index'><p><code><a href='as.mo.html'>as.mo()</a></code>, <code><a href='mo_property.html'>mo_property()</a></code>, <a href='microorganisms.codes.html'>microorganisms.codes</a></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Data set with previously accepted taxonomic names — microorganisms.old" />
<meta property="og:description" content="A data set containing old (previously valid or accepted) taxonomic names according to the Catalogue of Life. This data set is used internally by as.mo." />
<meta property="og:description" content="A data set containing old (previously valid or accepted) taxonomic names according to the Catalogue of Life. This data set is used internally by as.mo()." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>A data set containing old (previously valid or accepted) taxonomic names according to the Catalogue of Life. This data set is used internally by <code><a href='as.mo.html'>as.mo</a></code>.</p>
<p>A data set containing old (previously valid or accepted) taxonomic names according to the Catalogue of Life. This data set is used internally by <code><a href='as.mo.html'>as.mo()</a></code>.</p>
</div>
<pre class="usage"><span class='no'>microorganisms.old</span></pre>
@ -242,24 +242,23 @@
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
<p>A <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 24,246 observations and 5 variables:</p><dl class='dl-horizontal'>
<dt><code>col_id</code></dt><dd><p>Catalogue of Life ID that was originally given</p></dd>
<dt><code>col_id_new</code></dt><dd><p>New Catalogue of Life ID that responds to an entry in the <code><a href='microorganisms.html'>microorganisms</a></code> data set</p></dd>
<dt><code>fullname</code></dt><dd><p>Old full taxonomic name of the microorganism</p></dd>
<dt><code>ref</code></dt><dd><p>Author(s) and year of concerning scientific publication</p></dd>
<dt><code>prevalence</code></dt><dd><p>Prevalence of the microorganism, see <code><a href='as.mo.html'>?as.mo</a></code></p></dd>
</dl>
<p>A <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 24,246 observations and 5 variables:</p><ul>
<li><p><code>col_id</code><br /> Catalogue of Life ID that was originally given</p></li>
<li><p><code>col_id_new</code><br /> New Catalogue of Life ID that responds to an entry in the <a href='microorganisms.html'>microorganisms</a> data set</p></li>
<li><p><code>fullname</code><br /> Old full taxonomic name of the microorganism</p></li>
<li><p><code>ref</code><br /> Author(s) and year of concerning scientific publication</p></li>
<li><p><code>prevalence</code><br /> Prevalence of the microorganism, see <code><a href='as.mo.html'>as.mo()</a></code></p></li>
</ul>
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
<p>Catalogue of Life: Annual Checklist (public online taxonomic database), <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a> (check included annual version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a>()</code>).</p>
<p>Catalogue of Life: Annual Checklist (public online taxonomic database), <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a> (check included annual version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>).</p>
<h2 class="hasAnchor" id="catalogue-of-life"><a class="anchor" href="#catalogue-of-life"></a>Catalogue of Life</h2>
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a>()</code>.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -267,7 +266,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='as.mo.html'>as.mo</a></code> <code><a href='mo_property.html'>mo_property</a></code> <code><a href='microorganisms.html'>microorganisms</a></code></p></div>
<div class='dont-index'><p><code><a href='as.mo.html'>as.mo()</a></code> <code><a href='mo_property.html'>mo_property()</a></code> <a href='microorganisms.html'>microorganisms</a></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Property of a microorganism — mo_property" />
<meta property="og:description" content="Use these functions to return a specific property of a microorganism. All input values will be evaluated internally with as.mo, which makes it possible for input of these functions to use microbial abbreviations, codes and names. See Examples." />
<meta property="og:description" content="Use these functions to return a specific property of a microorganism. All input values will be evaluated internally with as.mo(), which makes it possible for input of these functions to use microbial abbreviations, codes and names. See Examples." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9035</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>Use these functions to return a specific property of a microorganism. All input values will be evaluated internally with <code><a href='as.mo.html'>as.mo</a></code>, which makes it possible for input of these functions to use microbial abbreviations, codes and names. See Examples.</p>
<p>Use these functions to return a specific property of a microorganism. All input values will be evaluated internally with <code><a href='as.mo.html'>as.mo()</a></code>, which makes it possible for input of these functions to use microbial abbreviations, codes and names. See Examples.</p>
</div>
<pre class="usage"><span class='fu'>mo_name</span>(<span class='no'>x</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='no'>...</span>)
@ -286,23 +286,23 @@
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>any (vector of) text that can be coerced to a valid microorganism code with <code><a href='as.mo.html'>as.mo</a></code></p></td>
<td><p>any (vector of) text that can be coerced to a valid microorganism code with <code><a href='as.mo.html'>as.mo()</a></code></p></td>
</tr>
<tr>
<th>language</th>
<td><p>language of the returned text, defaults to system language (see <code><a href='translate.html'>get_locale</a></code>) and can also be set with <code><a href='https://rdrr.io/r/base/options.html'>getOption</a>("AMR_locale")</code>. Use <code>language = NULL</code> or <code>language = ""</code> to prevent translation.</p></td>
<td><p>language of the returned text, defaults to system language (see <code><a href='translate.html'>get_locale()</a></code>) and can also be set with <code><a href='https://rdrr.io/r/base/options.html'>getOption("AMR_locale")</a></code>. Use <code>language = NULL</code> or <code>language = ""</code> to prevent translation.</p></td>
</tr>
<tr>
<th>...</th>
<td><p>other parameters passed on to <code><a href='as.mo.html'>as.mo</a></code></p></td>
<td><p>other parameters passed on to <code><a href='as.mo.html'>as.mo()</a></code></p></td>
</tr>
<tr>
<th>open</th>
<td><p>browse the URL using <code><a href='https://rdrr.io/r/utils/browseURL.html'>browseURL</a>()</code></p></td>
<td><p>browse the URL using <code><a href='https://rdrr.io/r/utils/browseURL.html'>utils::browseURL()</a></code></p></td>
</tr>
<tr>
<th>property</th>
<td><p>one of the column names of the <code><a href='microorganisms.html'>microorganisms</a></code> data set or <code>"shortname"</code></p></td>
<td><p>one of the column names of the <a href='microorganisms.html'>microorganisms</a> data set or <code>"shortname"</code></p></td>
</tr>
</table>
@ -310,15 +310,15 @@
<ul>
<li><p>An <code>integer</code> in case of <code>mo_year</code></p></li>
<li><p>A <code>list</code> in case of <code>mo_taxonomy</code></p></li>
<li><p>A named <code>character</code> in case of <code>mo_url</code></p></li>
<li><p>A <code>character</code> in all other cases</p></li>
<li><p>An <code><a href='https://rdrr.io/r/base/integer.html'>integer</a></code> in case of <code>mo_year()</code></p></li>
<li><p>A <code><a href='https://rdrr.io/r/base/list.html'>list</a></code> in case of <code>mo_taxonomy()</code></p></li>
<li><p>A named <code><a href='https://rdrr.io/r/base/character.html'>character</a></code> in case of <code>mo_url()</code></p></li>
<li><p>A <code><a href='https://rdrr.io/r/base/character.html'>character</a></code> in all other cases</p></li>
</ul>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>All functions will return the most recently known taxonomic property according to the Catalogue of Life, except for <code>mo_ref</code>, <code>mo_authors</code> and <code>mo_year</code>. This leads to the following results:</p><ul>
<p>All functions will return the most recently known taxonomic property according to the Catalogue of Life, except for <code>mo_ref()</code>, <code>mo_authors()</code> and <code>mo_year()</code>. This leads to the following results:</p><ul>
<li><p><code>mo_name("Chlamydia psittaci")</code> will return <code>"Chlamydophila psittaci"</code> (with a warning about the renaming)</p></li>
<li><p><code>mo_ref("Chlamydia psittaci")</code> will return <code>"Page, 1968"</code> (with a warning about the renaming)</p></li>
<li><p><code>mo_ref("Chlamydophila psittaci")</code> will return <code>"Everett et al., 1999"</code> (without a warning)</p></li>
@ -333,15 +333,18 @@
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a>()</code>.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p>
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
<p>[1] Becker K <em>et al.</em> <strong>Coagulase-Negative Staphylococci</strong>. 2014. Clin Microbiol Rev. 27(4): 870926. <a href='https://dx.doi.org/10.1128/CMR.00109-13'>https://dx.doi.org/10.1128/CMR.00109-13</a></p>
<p>[2] Becker K <em>et al.</em> <strong>Implications of identifying the recently defined members of the <em>S. aureus</em> complex, <em>S. argenteus</em> and <em>S. schweitzeri</em>: A position paper of members of the ESCMID Study Group for staphylococci and Staphylococcal Diseases (ESGS).</strong> 2019. Clin Microbiol Infect. <a href='https://doi.org/10.1016/j.cmi.2019.02.028'>https://doi.org/10.1016/j.cmi.2019.02.028</a></p>
<p>[3] Lancefield RC <strong>A serological differentiation of human and other groups of hemolytic streptococci</strong>. 1933. J Exp Med. 57(4): 57195. <a href='https://dx.doi.org/10.1084/jem.57.4.571'>https://dx.doi.org/10.1084/jem.57.4.571</a></p>
<p>[4] Catalogue of Life: Annual Checklist (public online taxonomic database), <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a> (check included annual version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a>()</code>).</p>
<ol>
<li><p>Becker K <em>et al.</em> <strong>Coagulase-Negative Staphylococci</strong>. 2014. Clin Microbiol Rev. 27(4): 870926. <a href='https://dx.doi.org/10.1128/CMR.00109-13'>https://dx.doi.org/10.1128/CMR.00109-13</a></p></li>
<li><p>Becker K <em>et al.</em> <strong>Implications of identifying the recently defined members of the <em>S. aureus</em> complex, <em>S. argenteus</em> and <em>S. schweitzeri</em>: A position paper of members of the ESCMID Study Group for staphylococci and Staphylococcal Diseases (ESGS).</strong> 2019. Clin Microbiol Infect. <a href='https://doi.org/10.1016/j.cmi.2019.02.028'>https://doi.org/10.1016/j.cmi.2019.02.028</a></p></li>
<li><p>Lancefield RC <strong>A serological differentiation of human and other groups of hemolytic streptococci</strong>. 1933. J Exp Med. 57(4): 57195. <a href='https://dx.doi.org/10.1084/jem.57.4.571'>https://dx.doi.org/10.1084/jem.57.4.571</a></p></li>
<li><p>Catalogue of Life: Annual Checklist (public online taxonomic database), <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a> (check included annual version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>).</p></li>
</ol>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -349,7 +352,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='microorganisms.html'>microorganisms</a></code></p></div>
<div class='dont-index'><p><a href='microorganisms.html'>microorganisms</a></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># taxonomic tree -----------------------------------------------------------</span>
@ -431,7 +434,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
<span class='co'># get a list with the complete taxonomy (from kingdom to subspecies)</span>
<span class='fu'>mo_taxonomy</span>(<span class='st'>"E. coli"</span>)
<span class='co'># get a list with the taxonomy, the authors and the URL to the online database</span>
<span class='co'># get a list with the taxonomy, the authors, Gram-stain and URL to the online database</span>
<span class='fu'>mo_info</span>(<span class='st'>"E. coli"</span>)
<span class='co'># }</span></pre>
</div>

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Use predefined reference data set — mo_source" />
<meta property="og:description" content="These functions can be used to predefine your own reference to be used in as.mo and consequently all mo_* functions like mo_genus and mo_gramstain.
<meta property="og:description" content="These functions can be used to predefine your own reference to be used in as.mo() and consequently all mo_* functions like mo_genus() and mo_gramstain().
This is the fastest way to have your organisation (or analysis) specific codes picked up and translated by this package." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -86,7 +86,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -235,7 +235,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
</div>
<div class="ref-description">
<p>These functions can be used to predefine your own reference to be used in <code><a href='as.mo.html'>as.mo</a></code> and consequently all <code>mo_*</code> functions like <code><a href='mo_property.html'>mo_genus</a></code> and <code><a href='mo_property.html'>mo_gramstain</a></code>.</p>
<p>These functions can be used to predefine your own reference to be used in <code><a href='as.mo.html'>as.mo()</a></code> and consequently all <code>mo_*</code> functions like <code><a href='mo_property.html'>mo_genus()</a></code> and <code><a href='mo_property.html'>mo_gramstain()</a></code>.</p>
<p>This is <strong>the fastest way</strong> to have your organisation (or analysis) specific codes picked up and translated by this package.</p>
</div>
@ -255,15 +255,12 @@ This is the fastest way to have your organisation (or analysis) specific codes p
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>The reference file can be a text file seperated with commas (CSV) or tabs or pipes, an Excel file (either 'xls' or 'xlsx' format) or an R object file (extension '.rds'). To use an Excel file, you need to have the <code>readxl</code> package installed.</p>
<p><code>set_mo_source</code> will check the file for validity: it must be a <code>data.frame</code>, must have a column named <code>"mo"</code> which contains values from <code>microorganisms$mo</code> and must have a reference column with your own defined values. If all tests pass, <code>set_mo_source</code> will read the file into R and export it to <code>"~/.mo_source.rds"</code>. This compressed data file will then be used at default for MO determination (function <code><a href='as.mo.html'>as.mo</a></code> and consequently all <code>mo_*</code> functions like <code><a href='mo_property.html'>mo_genus</a></code> and <code><a href='mo_property.html'>mo_gramstain</a></code>). The location of the original file will be saved as option with <code><a href='https://rdrr.io/r/base/options.html'>options</a>(mo_source = path)</code>. Its timestamp will be saved with <code><a href='https://rdrr.io/r/base/options.html'>options</a>(mo_source_datetime = ...)</code>.</p>
<p><code>get_mo_source</code> will return the data set by reading <code>"~/.mo_source.rds"</code> with <code><a href='https://rdrr.io/r/base/readRDS.html'>readRDS</a></code>. If the original file has changed (the file defined with <code>path</code>), it will call <code>set_mo_source</code> to update the data file automatically.</p>
<p>Reading an Excel file (<code>.xlsx</code>) with only one row has a size of 8-9 kB. The compressed file used by this package will have a size of 0.1 kB and can be read by <code>get_mo_source</code> in only a couple of microseconds (a millionth of a second).</p>
<h2 class="hasAnchor" id="how-it-works"><a class="anchor" href="#how-it-works"></a>How it works</h2>
<p><code>set_mo_source()</code> will check the file for validity: it must be a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code>, must have a column named <code>"mo"</code> which contains values from <code><a href='microorganisms.html'>microorganisms$mo</a></code> and must have a reference column with your own defined values. If all tests pass, <code>set_mo_source()</code> will read the file into R and export it to <code>"~/.mo_source.rds"</code>. This compressed data file will then be used at default for MO determination (function <code><a href='as.mo.html'>as.mo()</a></code> and consequently all <code>mo_*</code> functions like <code><a href='mo_property.html'>mo_genus()</a></code> and <code><a href='mo_property.html'>mo_gramstain()</a></code>). The location of the original file will be saved as option with <code><a href='https://rdrr.io/r/base/options.html'>options(mo_source = path)</a></code>. Its timestamp will be saved with <code><a href='https://rdrr.io/r/base/options.html'>options(mo_source_datetime = ...)</a></code>.</p>
<p><code>get_mo_source()</code> will return the data set by reading <code>"~/.mo_source.rds"</code> with <code><a href='https://rdrr.io/r/base/readRDS.html'>readRDS()</a></code>. If the original file has changed (the file defined with <code>path</code>), it will call <code>set_mo_source()</code> to update the data file automatically.</p>
<p>Reading an Excel file (<code>.xlsx</code>) with only one row has a size of 8-9 kB. The compressed file used by this package will have a size of 0.1 kB and can be read by <code>get_mo_source()</code> in only a couple of microseconds (a millionth of a second).</p><h3>How it works</h3>
<p>Imagine this data on a sheet of an Excel file (mo codes were looked up in the `microorganisms` data set). The first column contains the organisation specific codes, the second column contains an MO code from this package:</p><pre>
| A | B |
<p>Imagine this data on a sheet of an Excel file (mo codes were looked up in the <code>microorganisms</code> data set). The first column contains the organisation specific codes, the second column contains an MO code from this package:</p><pre> | A | B |
--|--------------------|-------------|
1 | Organisation XYZ | mo |
2 | lab_mo_ecoli | B_ESCHR_COL |
@ -271,49 +268,45 @@ This is the fastest way to have your organisation (or analysis) specific codes p
4 | | |
</pre>
<p>We save it as <code>'home/me/ourcodes.xlsx'</code>. Now we have to set it as a source:</p><pre>
set_mo_source("home/me/ourcodes.xlsx")
<p>We save it as <code>"home/me/ourcodes.xlsx"</code>. Now we have to set it as a source:</p><pre>set_mo_source("home/me/ourcodes.xlsx")
# Created mo_source file '~/.mo_source.rds' from 'home/me/ourcodes.xlsx'.
</pre>
<p>It has now created a file "~/.mo_source.rds" with the contents of our Excel file, but only the first column with foreign values and the 'mo' column will be kept.</p>
<p>And now we can use it in our functions:</p><pre>
as.mo("lab_mo_ecoli")
[1] B_ESCHR_COL
<p>It has now created a file <code>"~/.mo_source.rds"</code> with the contents of our Excel file, but only the first column with foreign values and the 'mo' column will be kept.</p>
<p>And now we can use it in our functions:</p><pre>as.mo("lab_mo_ecoli")
\[1\] B_ESCHR_COLI
mo_genus("lab_mo_kpneumoniae")
[1] "Klebsiella"
# other input values still work too
as.mo(c("Escherichia coli", "E. coli", "lab_mo_ecoli"))
[1] B_ESCHR_COL B_ESCHR_COL B_ESCHR_COL
[1] B_ESCHR_COLI B_ESCHR_COLI B_ESCHR_COLI
</pre>
<p>If we edit the Excel file to, let's say, this:</p><pre>
| A | B |
--|--------------------|-------------|
1 | Organisation XYZ | mo |
2 | lab_mo_ecoli | B_ESCHR_COL |
3 | lab_mo_kpneumoniae | B_KLBSL_PNE |
4 | lab_Staph_aureus | B_STPHY_AUR |
5 | | |
<p>If we edit the Excel file to, let's say, this:</p><pre> | A | B |
--|--------------------|--------------|
1 | Organisation XYZ | mo |
2 | lab_mo_ecoli | B_ESCHR_COLI |
3 | lab_mo_kpneumoniae | B_KLBSL_PNMN |
4 | lab_Staph_aureus | B_STPHY_AURS |
5 | | |
</pre>
<p>...any new usage of an MO function in this package will update your data:</p><pre>
as.mo("lab_mo_ecoli")
<p>...any new usage of an MO function in this package will update your data:</p><pre>as.mo("lab_mo_ecoli")
# Updated mo_source file '~/.mo_source.rds' from 'home/me/ourcodes.xlsx'.
[1] B_ESCHR_COL
[1] B_ESCHR_COLI
mo_genus("lab_Staph_aureus")
[1] "Staphylococcus"
</pre>
<p>To remove the reference completely, just use any of these:</p><pre>
set_mo_source("")
<p>To remove the reference completely, just use any of these:</p><pre>set_mo_source("")
set_mo_source(NULL)
# Removed mo_source file '~/.mo_source.rds'.
</pre>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -326,7 +319,6 @@ set_mo_source(NULL)
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#details">Details</a></li>
<li><a href="#how-it-works">How it works</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
</ul>

View File

@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Symbol of a p value — p_symbol • AMR (for R)</title>
<title>Symbol of a p-value — p_symbol • AMR (for R)</title>
<!-- favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
@ -50,8 +50,8 @@
<link href="../extra.css" rel="stylesheet">
<script src="../extra.js"></script>
<meta property="og:title" content="Symbol of a p value — p_symbol" />
<meta property="og:description" content="Return the symbol related to the p value: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1. Values above p = 1 will return NA." />
<meta property="og:title" content="Symbol of a p-value — p_symbol" />
<meta property="og:description" content="Return the symbol related to the p-value: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1. Values above p = 1 will return NA." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -228,13 +228,13 @@
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Symbol of a p value</h1>
<h1>Symbol of a p-value</h1>
<div class="hidden name"><code>p_symbol.Rd</code></div>
</div>
<div class="ref-description">
<p>Return the symbol related to the p value: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1. Values above <code>p = 1</code> will return <code>NA</code>.</p>
<p>Return the symbol related to the p-value: 0 '<code>***</code>' 0.001 '<code>**</code>' 0.01 '<code>*</code>' 0.05 '<code>.</code>' 0.1 ' ' 1. Values above <code>p = 1</code> will return <code>NA</code>.</p>
</div>
<pre class="usage"><span class='fu'>p_symbol</span>(<span class='no'>p</span>, <span class='kw'>emptychar</span> <span class='kw'>=</span> <span class='st'>" "</span>)</pre>

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Calculate microbial resistance — proportion" />
<meta property="og:description" content="These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in dplyrs summarise and support grouped variables, see Examples.
<meta property="og:description" content="These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in dplyr::summarise() and support grouped variables, please see Examples.
resistance() should be used to calculate resistance, susceptibility() should be used to calculate susceptibility." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -86,7 +86,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -235,45 +235,50 @@ resistance() should be used to calculate resistance, susceptibility() should be
</div>
<div class="ref-description">
<p>These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in <code>dplyr</code>s <code><a href='https://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></code> and support grouped variables, see <em>Examples</em>.</p>
<p>These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in <code><a href='https://dplyr.tidyverse.org/reference/summarise.html'>dplyr::summarise()</a></code> and support grouped variables, please see <em>Examples</em>.</p>
<p><code>resistance()</code> should be used to calculate resistance, <code>susceptibility()</code> should be used to calculate susceptibility.<br /></p>
</div>
<pre class="usage"><span class='fu'>resistance</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<pre class="usage"><span class='fu'>resistance</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>susceptibility</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>susceptibility</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>proportion_R</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>proportion_R</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>proportion_IR</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>proportion_IR</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>proportion_I</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>proportion_I</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>proportion_SI</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>proportion_SI</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>proportion_S</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>proportion_S</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>proportion_df</span>(<span class='no'>data</span>, <span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(),
<span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='fu'>proportion_df</span>(
<span class='no'>data</span>,
<span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name"</span>,
<span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(),
<span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>,
<span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>
)
<span class='fu'>rsi_df</span>(<span class='no'>data</span>, <span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(),
<span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<span class='fu'>rsi_df</span>(
<span class='no'>data</span>,
<span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='st'>"name"</span>,
<span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(),
<span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>,
<span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>combine_SI</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>combine_IR</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>...</th>
<td><p>one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with <code><a href='as.rsi.html'>as.rsi</a></code> if needed. Use multiple columns to calculate (the lack of) co-resistance: the probability where one of two drugs have a resistant or susceptible result. See Examples.</p></td>
<td><p>one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with <code><a href='as.rsi.html'>as.rsi()</a></code> if needed. Use multiple columns to calculate (the lack of) co-resistance: the probability where one of two drugs have a resistant or susceptible result. See Examples.</p></td>
</tr>
<tr>
<th>minimum</th>
@ -285,19 +290,19 @@ resistance() should be used to calculate resistance, susceptibility() should be
</tr>
<tr>
<th>only_all_tested</th>
<td><p>(for combination therapies, i.e. using more than one variable for <code>...</code>) a logical to indicate that isolates must be tested for all antibiotics, see section <em>Combination therapy</em> below</p></td>
<td><p>(for combination therapies, i.e. using more than one variable for <code>...</code>): a logical to indicate that isolates must be tested for all antibiotics, see section <em>Combination therapy</em> below</p></td>
</tr>
<tr>
<th>data</th>
<td><p>a <code>data.frame</code> containing columns with class <code>rsi</code> (see <code><a href='as.rsi.html'>as.rsi</a></code>)</p></td>
<td><p>a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> containing columns with class <code>rsi</code> (see <code><a href='as.rsi.html'>as.rsi()</a></code>)</p></td>
</tr>
<tr>
<th>translate_ab</th>
<td><p>a column name of the <code><a href='antibiotics.html'>antibiotics</a></code> data set to translate the antibiotic abbreviations to, using <code><a href='ab_property.html'>ab_property</a></code></p></td>
<td><p>a column name of the <a href='antibiotics.html'>antibiotics</a> data set to translate the antibiotic abbreviations to, using <code><a href='ab_property.html'>ab_property()</a></code></p></td>
</tr>
<tr>
<th>language</th>
<td><p>language of the returned text, defaults to system language (see <code><a href='translate.html'>get_locale</a></code>) and can also be set with <code><a href='https://rdrr.io/r/base/options.html'>getOption</a>("AMR_locale")</code>. Use <code>language = NULL</code> or <code>language = ""</code> to prevent translation.</p></td>
<td><p>language of the returned text, defaults to system language (see <code><a href='translate.html'>get_locale()</a></code>) and can also be set with <code><a href='https://rdrr.io/r/base/options.html'>getOption("AMR_locale")</a></code>. Use <code>language = NULL</code> or <code>language = ""</code> to prevent translation.</p></td>
</tr>
<tr>
<th>combine_SI</th>
@ -314,20 +319,18 @@ resistance() should be used to calculate resistance, susceptibility() should be
<p><strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition</strong>, 2014, <em>Clinical and Laboratory Standards Institute (CLSI)</em>. <a href='https://clsi.org/standards/products/microbiology/documents/m39/'>https://clsi.org/standards/products/microbiology/documents/m39/</a>.</p>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Double or, when <code>as_percent = TRUE</code>, a character.</p>
<p>A <code><a href='https://rdrr.io/r/base/double.html'>double</a></code> or, when <code>as_percent = TRUE</code>, a <code><a href='https://rdrr.io/r/base/character.html'>character</a></code>.</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>The function <code>resistance()</code> is equal to the function <code>proportion_R()</code>. The function <code>susceptibility()</code> is equal to the function <code>proportion_SI()</code>.</p>
<p><strong>Remember that you should filter your table to let it contain only first isolates!</strong> This is needed to exclude duplicates and to reduce selection bias. Use <code><a href='first_isolate.html'>first_isolate</a></code> to determine them in your data set.</p>
<p>These functions are not meant to count isolates, but to calculate the proportion of resistance/susceptibility. Use the <code><a href='count.html'>count</a></code> functions to count isolates. The function <code>susceptibility()</code> is essentially equal to <code>count_susceptible() / count_all()</code>. <em>Low counts can infuence the outcome - the <code>proportion</code> functions may camouflage this, since they only return the proportion (albeit being dependent on the <code>minimum</code> parameter).</em></p>
<p>The function <code>proportion_df()</code> takes any variable from <code>data</code> that has an <code>"rsi"</code> class (created with <code><a href='as.rsi.html'>as.rsi</a>()</code>) and calculates the proportions R, I and S. The function <code>rsi_df()</code> works exactly like <code>proportion_df()</code>, but adds the number of isolates.</p>
<p>The function <code>resistance()</code> is equal to the function <code>proportion_R()</code>. The function <code>susceptibility()</code> is equal to the function <code>proportion_SI()</code>.</p>
<p><strong>Remember that you should filter your table to let it contain only first isolates!</strong> This is needed to exclude duplicates and to reduce selection bias. Use <code><a href='first_isolate.html'>first_isolate()</a></code> to determine them in your data set.</p>
<p>These functions are not meant to count isolates, but to calculate the proportion of resistance/susceptibility. Use the <code><a href='count.html'>AMR::count()</a></code> functions to count isolates. The function <code>susceptibility()</code> is essentially equal to <code>count_susceptible() / count_all()</code>. <em>Low counts can infuence the outcome - the <code>proportion</code> functions may camouflage this, since they only return the proportion (albeit being dependent on the <code>minimum</code> parameter).</em></p>
<p>The function <code>proportion_df()</code> takes any variable from <code>data</code> that has an <code>rsi</code> class (created with <code><a href='as.rsi.html'>as.rsi()</a></code>) and calculates the proportions R, I and S. The function <code>rsi_df()</code> works exactly like <code>proportion_df()</code>, but adds the number of isolates.</p>
<h2 class="hasAnchor" id="combination-therapy"><a class="anchor" href="#combination-therapy"></a>Combination therapy</h2>
<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, Antibiotic A and Antibiotic B, about how <code>susceptibility</code> works to calculate the %SI:</p>
<pre>
--------------------------------------------------------------------
<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, Antibiotic A and Antibiotic B, about how <code>susceptibility()</code> works to calculate the %SI:</p><pre>--------------------------------------------------------------------
only_all_tested = FALSE only_all_tested = TRUE
----------------------- -----------------------
Drug A Drug B include as include as include as include as
@ -345,11 +348,11 @@ resistance() should be used to calculate resistance, susceptibility() should be
--------------------------------------------------------------------
</pre>
<p>Please note that, in combination therapies, for <code>only_all_tested = TRUE</code> applies that:</p><pre>
count_S() + count_I() + count_R() = count_all()
<p>Please note that, in combination therapies, for <code>only_all_tested = TRUE</code> applies that:</p><pre> count_S() + count_I() + count_R() = count_all()
proportion_S() + proportion_I() + proportion_R() = 1
</pre><p>and that, in combination therapies, for <code>only_all_tested = FALSE</code> applies that:</p><pre>
count_S() + count_I() + count_R() &gt;= count_all()
</pre>
<p>and that, in combination therapies, for <code>only_all_tested = FALSE</code> applies that:</p><pre> count_S() + count_I() + count_R() &gt;= count_all()
proportion_S() + proportion_I() + proportion_R() &gt;= 1
</pre>
@ -358,15 +361,14 @@ resistance() should be used to calculate resistance, susceptibility() should be
<p>In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p>
<ul>
<p>In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p><ul>
<li><p><strong>S</strong> - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.</p></li>
<li><p><strong>I</strong> - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.</p></li>
<li><p><strong>R</strong> - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure.</p></li>
</ul>
<p>Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.</p>
<p>This AMR package honours this new insight. Use <code>susceptibility()</code> (equal to <code>proportion_SI()</code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible</a>()</code> (equal to <code><a href='count.html'>count_SI</a>()</code>) to count susceptible isolates.</p>
<p>This AMR package honours this new insight. Use <code>susceptibility()</code> (equal to <code>proportion_SI()</code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible()</a></code> (equal to <code><a href='count.html'>count_SI()</a></code>) to count susceptible isolates.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -374,7 +376,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='count.html'>count</a>_*</code> to count resistant and susceptible isolates.</p></div>
<div class='dont-index'><p><code><a href='count.html'>AMR::count()</a></code> to count resistant and susceptible isolates.</p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># example_isolates is a data set available in the AMR package.</span>

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Read data from 4D database — read.4D" />
<meta property="og:description" content="This function is only useful for the MMB department of the UMCG. Use this function to import data by just defining the file parameter. It will automatically transform birth dates and calculate patients age, translate the column names to English, transform the MO codes with as.mo and transform all antimicrobial columns with as.rsi." />
<meta property="og:description" content="This function is only useful for the MMB department of the UMCG. Use this function to import data by just defining the file parameter. It will automatically transform birth dates and calculate patients age, translate the column names to English, transform the MO codes with as.mo() and transform all antimicrobial columns with as.rsi()." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,14 +234,27 @@
</div>
<div class="ref-description">
<p>This function is only useful for the MMB department of the UMCG. Use this function to <strong>import data by just defining the <code>file</code> parameter</strong>. It will automatically transform birth dates and calculate patients age, translate the column names to English, transform the MO codes with <code><a href='as.mo.html'>as.mo</a></code> and transform all antimicrobial columns with <code><a href='as.rsi.html'>as.rsi</a></code>.</p>
<p>This function is only useful for the MMB department of the UMCG. Use this function to <strong>import data by just defining the <code>file</code> parameter</strong>. It will automatically transform birth dates and calculate patients age, translate the column names to English, transform the MO codes with <code><a href='as.mo.html'>as.mo()</a></code> and transform all antimicrobial columns with <code><a href='as.rsi.html'>as.rsi()</a></code>.</p>
</div>
<pre class="usage"><span class='fu'>read.4D</span>(<span class='no'>file</span>, <span class='kw'>info</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/interactive.html'>interactive</a></span>(), <span class='kw'>header</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>row.names</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>sep</span> <span class='kw'>=</span> <span class='st'>"\t"</span>, <span class='kw'>quote</span> <span class='kw'>=</span> <span class='st'>"\"'"</span>, <span class='kw'>dec</span> <span class='kw'>=</span> <span class='st'>","</span>, <span class='kw'>na.strings</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"NA"</span>, <span class='st'>""</span>,
<span class='st'>"."</span>), <span class='kw'>skip</span> <span class='kw'>=</span> <span class='fl'>2</span>, <span class='kw'>check.names</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>strip.white</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>fill</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>blank.lines.skip</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>stringsAsFactors</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>fileEncoding</span> <span class='kw'>=</span> <span class='st'>"UTF-8"</span>, <span class='kw'>encoding</span> <span class='kw'>=</span> <span class='st'>"UTF-8"</span>)</pre>
<pre class="usage"><span class='fu'>read.4D</span>(
<span class='no'>file</span>,
<span class='kw'>info</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/interactive.html'>interactive</a></span>(),
<span class='kw'>header</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>row.names</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>sep</span> <span class='kw'>=</span> <span class='st'>"\t"</span>,
<span class='kw'>quote</span> <span class='kw'>=</span> <span class='st'>"\"'"</span>,
<span class='kw'>dec</span> <span class='kw'>=</span> <span class='st'>","</span>,
<span class='kw'>na.strings</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"NA"</span>, <span class='st'>""</span>, <span class='st'>"."</span>),
<span class='kw'>skip</span> <span class='kw'>=</span> <span class='fl'>2</span>,
<span class='kw'>check.names</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>strip.white</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>fill</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>blank.lines.skip</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>stringsAsFactors</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>fileEncoding</span> <span class='kw'>=</span> <span class='st'>"UTF-8"</span>,
<span class='kw'>encoding</span> <span class='kw'>=</span> <span class='st'>"UTF-8"</span>
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">

View File

@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,34 +234,59 @@
</div>
<div class="ref-description">
<p>Create a prediction model to predict antimicrobial resistance for the next years on statistical solid ground. Standard errors (SE) will be returned as columns <code>se_min</code> and <code>se_max</code>. See Examples for a real live example.</p>
<p>Create a prediction model to predict antimicrobial resistance for the next years on statistical solid ground. Standard errors (SE) will be returned as columns <code>se_min</code> and <code>se_max</code>. See <em>Examples</em> for a real live example.</p>
</div>
<pre class="usage"><span class='fu'>resistance_predict</span>(<span class='no'>x</span>, <span class='no'>col_ab</span>, <span class='kw'>col_date</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>year_min</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>year_max</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>year_every</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>model</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>I_as_S</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>preserve_measurements</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='no'>...</span>)
<pre class="usage"><span class='fu'>resistance_predict</span>(
<span class='no'>x</span>,
<span class='no'>col_ab</span>,
<span class='kw'>col_date</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>year_min</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>year_max</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>year_every</span> <span class='kw'>=</span> <span class='fl'>1</span>,
<span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>,
<span class='kw'>model</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>I_as_S</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>preserve_measurements</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='no'>...</span>
)
<span class='fu'>rsi_predict</span>(<span class='no'>x</span>, <span class='no'>col_ab</span>, <span class='kw'>col_date</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>year_min</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>year_max</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>year_every</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>model</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>I_as_S</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>preserve_measurements</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='no'>...</span>)
<span class='fu'>rsi_predict</span>(
<span class='no'>x</span>,
<span class='no'>col_ab</span>,
<span class='kw'>col_date</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>year_min</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>year_max</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>year_every</span> <span class='kw'>=</span> <span class='fl'>1</span>,
<span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>,
<span class='kw'>model</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>I_as_S</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>preserve_measurements</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='no'>...</span>
)
<span class='co'># S3 method for resistance_predict</span>
<span class='fu'><a href='https://rdrr.io/r/graphics/plot.html'>plot</a></span>(<span class='no'>x</span>,
<span class='kw'>main</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Resistance Prediction of"</span>, <span class='no'>x_name</span>), <span class='no'>...</span>)
<span class='fu'><a href='https://rdrr.io/r/graphics/plot.html'>plot</a></span>(<span class='no'>x</span>, <span class='kw'>main</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Resistance Prediction of"</span>, <span class='no'>x_name</span>), <span class='no'>...</span>)
<span class='fu'>ggplot_rsi_predict</span>(<span class='no'>x</span>, <span class='kw'>main</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Resistance Prediction of"</span>, <span class='no'>x_name</span>),
<span class='kw'>ribbon</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='no'>...</span>)</pre>
<span class='fu'>ggplot_rsi_predict</span>(
<span class='no'>x</span>,
<span class='kw'>main</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Resistance Prediction of"</span>, <span class='no'>x_name</span>),
<span class='kw'>ribbon</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='no'>...</span>
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>a <code>data.frame</code> containing isolates.</p></td>
<td><p>a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> containing isolates.</p></td>
</tr>
<tr>
<th>col_ab</th>
<td><p>column name of <code>x</code> with antimicrobial interpretations (<code>R</code>, <code>I</code> and <code>S</code>)</p></td>
<td><p>column name of <code>x</code> containing antimicrobial interpretations (<code>"R"</code>, <code>"I"</code> and <code>"S"</code>)</p></td>
</tr>
<tr>
<th>col_date</th>
@ -285,11 +310,11 @@
</tr>
<tr>
<th>model</th>
<td><p>the statistical model of choice. This could be a generalised linear regression model with binomial distribution (i.e. using <code><a href='https://rdrr.io/r/stats/glm.html'>glm</a>(..., family = <a href='https://rdrr.io/r/stats/family.html'>binomial</a>)</code>), assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance. See Details for all valid options.</p></td>
<td><p>the statistical model of choice. This could be a generalised linear regression model with binomial distribution (i.e. using `glm(..., family = binomial)``, assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance. See Details for all valid options.</p></td>
</tr>
<tr>
<th>I_as_S</th>
<td><p>a logical to indicate whether values <code>I</code> should be treated as <code>S</code> (will otherwise be treated as <code>R</code>). The default, <code>TRUE</code>, follows the redefinition by EUCAST about the interpretion of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below.</p></td>
<td><p>a logical to indicate whether values <code>I</code> should be treated as <code>S</code> (will otherwise be treated as <code>R</code>). The default, <code>TRUE</code>, follows the redefinition by EUCAST about the interpretion of I (increased exposure) in 2019, see section <em>Interpretation of S, I and R</em> below.</p></td>
</tr>
<tr>
<th>preserve_measurements</th>
@ -297,7 +322,7 @@
</tr>
<tr>
<th>info</th>
<td><p>a logical to indicate whether textual analysis should be printed with the name and <code><a href='https://rdrr.io/r/base/summary.html'>summary</a></code> of the statistical model.</p></td>
<td><p>a logical to indicate whether textual analysis should be printed with the name and <code><a href='https://rdrr.io/r/base/summary.html'>summary()</a></code> of the statistical model.</p></td>
</tr>
<tr>
<th>...</th>
@ -315,18 +340,20 @@
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p><code>data.frame</code> with extra class <code>"resistance_predict"</code> with columns:</p><ul>
<p>A <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with extra class <code>resistance_predict</code> with columns:</p><ul>
<li><p><code>year</code></p></li>
<li><p><code>value</code>, the same as <code>estimated</code> when <code>preserve_measurements = FALSE</code>, and a combination of <code>observed</code> and <code>estimated</code> otherwise</p></li>
<li><p><code>se_min</code>, the lower bound of the standard error with a minimum of <code>0</code> (so the standard error will never go below 0%)</p></li>
<li><p><code>se_max</code> the upper bound of the standard error with a maximum of <code>1</code> (so the standard error will never go above 100%)</p></li>
<li><p><code>observations</code>, the total number of available observations in that year, i.e. S + I + R</p></li>
<li><p><code>observations</code>, the total number of available observations in that year, i.e. \(S + I + R\)</p></li>
<li><p><code>observed</code>, the original observed resistant percentages</p></li>
<li><p><code>estimated</code>, the estimated resistant percentages, calculated by the model</p></li>
</ul><p>Furthermore, the model itself is available as an attribute: <code>attributes(x)$model</code>, see Examples.</p>
</ul>
<p>Furthermore, the model itself is available as an attribute: <code>attributes(x)$model</code>, please see <em>Examples</em>.</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>Valid options for the statistical model are:</p><ul>
<p>Valid options for the statistical model (parameter <code>model</code>) are:</p><ul>
<li><p><code>"binomial"</code> or <code>"binom"</code> or <code>"logit"</code>: a generalised linear regression model with binomial distribution</p></li>
<li><p><code>"loglin"</code> or <code>"poisson"</code>: a generalised log-linear regression model with poisson distribution</p></li>
<li><p><code>"lin"</code> or <code>"linear"</code>: a linear regression model</p></li>
@ -336,15 +363,14 @@
<p>In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p>
<ul>
<p>In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I and R as shown below (<a href='http://www.eucast.org/newsiandr/'>http://www.eucast.org/newsiandr/</a>). Results of several consultations on the new definitions are available on the EUCAST website under "Consultations".</p><ul>
<li><p><strong>S</strong> - Susceptible, standard dosing regimen: A microorganism is categorised as "Susceptible, standard dosing regimen", when there is a high likelihood of therapeutic success using a standard dosing regimen of the agent.</p></li>
<li><p><strong>I</strong> - Susceptible, increased exposure: A microorganism is categorised as "Susceptible, Increased exposure" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.</p></li>
<li><p><strong>R</strong> - Resistant: A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure.</p></li>
</ul>
<p>Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.</p>
<p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility</a>()</code> (equal to <code><a href='proportion.html'>proportion_SI</a>()</code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible</a>()</code> (equal to <code><a href='count.html'>count_SI</a>()</code>) to count susceptible isolates.</p>
<p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility()</a></code> (equal to <code><a href='proportion.html'>proportion_SI()</a></code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible()</a></code> (equal to <code><a href='count.html'>count_SI()</a></code>) to count susceptible isolates.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -352,10 +378,14 @@
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>The <code><a href='proportion.html'>portion</a></code> function to calculate resistance, <br /> <code><a href='https://rdrr.io/r/stats/lm.html'>lm</a></code> <code><a href='https://rdrr.io/r/stats/glm.html'>glm</a></code></p></div>
<div class='dont-index'><p>The <code><a href='proportion.html'>proportion()</a></code> functions to calculate resistance</p>
<p>Models: <code><a href='https://rdrr.io/r/stats/lm.html'>lm()</a></code> <code><a href='https://rdrr.io/r/stats/glm.html'>glm()</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='no'>x</span> <span class='kw'>&lt;-</span> <span class='fu'>resistance_predict</span>(<span class='no'>example_isolates</span>, <span class='kw'>col_ab</span> <span class='kw'>=</span> <span class='st'>"AMX"</span>, <span class='kw'>year_min</span> <span class='kw'>=</span> <span class='fl'>2010</span>, <span class='kw'>model</span> <span class='kw'>=</span> <span class='st'>"binomial"</span>)
<pre class="examples"><span class='no'>x</span> <span class='kw'>&lt;-</span> <span class='fu'>resistance_predict</span>(<span class='no'>example_isolates</span>,
<span class='kw'>col_ab</span> <span class='kw'>=</span> <span class='st'>"AMX"</span>,
<span class='kw'>year_min</span> <span class='kw'>=</span> <span class='fl'>2010</span>,
<span class='kw'>model</span> <span class='kw'>=</span> <span class='st'>"binomial"</span>)
<span class='fu'><a href='https://rdrr.io/r/graphics/plot.html'>plot</a></span>(<span class='no'>x</span>)
<span class='fu'>ggplot_rsi_predict</span>(<span class='no'>x</span>)
@ -394,9 +424,9 @@
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/scale_continuous.html'>scale_y_continuous</a></span>(<span class='kw'>limits</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>),
<span class='kw'>breaks</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>0.1</span>),
<span class='kw'>labels</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>100</span>, <span class='fl'>10</span>), <span class='st'>"%"</span>)) +
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>labs</a></span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/expression.html'>expression</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Forecast of amoxicillin resistance in "</span>,
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>labs</a></span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/expression.html'>expression</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Forecast of Amoxicillin Resistance in "</span>,
<span class='fu'><a href='https://rdrr.io/r/grDevices/plotmath.html'>italic</a></span>(<span class='st'>"E. coli"</span>))),
<span class='kw'>y</span> <span class='kw'>=</span> <span class='st'>"%IR"</span>,
<span class='kw'>y</span> <span class='kw'>=</span> <span class='st'>"%R"</span>,
<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"Year"</span>) +
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggtheme.html'>theme_minimal</a></span>(<span class='kw'>base_size</span> <span class='kw'>=</span> <span class='fl'>13</span>)
}</pre>

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Data set for RSI interpretation — rsi_translation" />
<meta property="og:description" content="Data set to interpret MIC and disk diffusion to RSI values. Included guidelines are CLSI (2011-2019) and EUCAST (2011-2019). Use as.rsi to transform MICs or disks measurements to RSI values." />
<meta property="og:description" content="Data set to interpret MIC and disk diffusion to RSI values. Included guidelines are CLSI (2011-2019) and EUCAST (2011-2019). Use as.rsi() to transform MICs or disks measurements to RSI values." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9033</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>Data set to interpret MIC and disk diffusion to RSI values. Included guidelines are CLSI (2011-2019) and EUCAST (2011-2019). Use <code><a href='as.rsi.html'>as.rsi</a></code> to transform MICs or disks measurements to RSI values.</p>
<p>Data set to interpret MIC and disk diffusion to RSI values. Included guidelines are CLSI (2011-2019) and EUCAST (2011-2019). Use <code><a href='as.rsi.html'>as.rsi()</a></code> to transform MICs or disks measurements to RSI values.</p>
</div>
<pre class="usage"><span class='no'>rsi_translation</span></pre>
@ -242,18 +242,17 @@
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
<p>A <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 13,975 observations and 9 variables:</p><dl class='dl-horizontal'>
<dt><code>guideline</code></dt><dd><p>Name of the guideline</p></dd>
<dt><code>method</code></dt><dd><p>Either "MIC" or "DISK"</p></dd>
<dt><code>site</code></dt><dd><p>Body site, e.g. "Oral" or "Respiratory"</p></dd>
<dt><code>mo</code></dt><dd><p>Microbial ID, see <code><a href='as.mo.html'>as.mo</a></code></p></dd>
<dt><code>ab</code></dt><dd><p>Antibiotic ID, see <code><a href='as.ab.html'>as.ab</a></code></p></dd>
<dt><code>ref_tbl</code></dt><dd><p>Info about where the guideline rule can be found</p></dd>
<dt><code>disk_dose</code></dt><dd><p>Dose of the used disk diffusion method</p></dd>
<dt><code>breakpoint_S</code></dt><dd><p>Lowest MIC value or highest number of millimeters that leads to "S"</p></dd>
<dt><code>breakpoint_R</code></dt><dd><p>Highest MIC value or lowest number of millimeters that leads to "R"</p></dd>
</dl>
<p>A <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with 13,975 observations and 9 variables:</p><ul>
<li><p><code>guideline</code><br /> Name of the guideline</p></li>
<li><p><code>method</code><br /> Either "MIC" or "DISK"</p></li>
<li><p><code>site</code><br /> Body site, e.g. "Oral" or "Respiratory"</p></li>
<li><p><code>mo</code><br /> Microbial ID, see <code><a href='as.mo.html'>as.mo()</a></code></p></li>
<li><p><code>ab</code><br /> Antibiotic ID, see <code><a href='as.ab.html'>as.ab()</a></code></p></li>
<li><p><code>ref_tbl</code><br /> Info about where the guideline rule can be found</p></li>
<li><p><code>disk_dose</code><br /> Dose of the used disk diffusion method</p></li>
<li><p><code>breakpoint_S</code><br /> Lowest MIC value or highest number of millimeters that leads to "S"</p></li>
<li><p><code>breakpoint_R</code><br /> Highest MIC value or lowest number of millimeters that leads to "R"</p></li>
</ul>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -86,7 +86,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -255,7 +255,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>a vector of values, a <code>matrix</code> or a <code>data frame</code></p></td>
<td><p>a vector of values, a <code><a href='https://rdrr.io/r/base/matrix.html'>matrix</a></code> or a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code></p></td>
</tr>
<tr>
<th>na.rm</th>
@ -270,7 +270,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='kurtosis.html'>kurtosis</a></code></p></div>
<div class='dont-index'><p><code><a href='kurtosis.html'>kurtosis()</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Translate strings from AMR package — translate" />
<meta property="og:description" content="For language-dependent output of AMR functions, like mo_name, mo_type and ab_name." />
<meta property="og:description" content="For language-dependent output of AMR functions, like mo_name(), mo_type() and ab_name()." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9032</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9036</span>
</span>
</div>
@ -234,7 +234,7 @@
</div>
<div class="ref-description">
<p>For language-dependent output of AMR functions, like <code><a href='mo_property.html'>mo_name</a></code>, <code><a href='mo_property.html'>mo_type</a></code> and <code><a href='ab_property.html'>ab_name</a></code>.</p>
<p>For language-dependent output of AMR functions, like <code><a href='mo_property.html'>mo_name()</a></code>, <code><a href='mo_property.html'>mo_type()</a></code> and <code><a href='ab_property.html'>ab_name()</a></code>.</p>
</div>
<pre class="usage"><span class='fu'>get_locale</span>()</pre>
@ -245,8 +245,8 @@
<p>Strings will be translated to foreign languages if they are defined in a local translation file. Additions to this file can be suggested at our repository. The file can be found here: <a href='https://gitlab.com/msberends/AMR/blob/master/data-raw/translations.tsv'>https://gitlab.com/msberends/AMR/blob/master/data-raw/translations.tsv</a>.</p>
<p>Currently supported languages can be found if running: <code><a href='https://rdrr.io/r/base/unique.html'>unique(AMR:::translations_file$lang)</a></code>.</p>
<p>Please suggest your own translations <a href='https://gitlab.com/msberends/AMR/issues/new?issue[title]=Translation%20suggestion'>by creating a new issue on our repository</a>.</p>
<p>This file will be read by all functions where a translated output can be desired, like all <code><a href='mo_property.html'>mo_property</a></code> functions (<code><a href='mo_property.html'>mo_fullname</a></code>, <code><a href='mo_property.html'>mo_type</a></code>, etc.).</p>
<p>The system language will be used at default, if that language is supported. The system language can be overwritten with <code><a href='https://rdrr.io/r/base/options.html'>getOption</a>("AMR_locale")</code>.</p>
<p>This file will be read by all functions where a translated output can be desired, like all <code><a href='mo_property.html'>mo_property()</a></code> functions (<code><a href='mo_property.html'>mo_fullname()</a></code>, <code><a href='mo_property.html'>mo_type()</a></code>, etc.).</p>
<p>The system language will be used at default, if that language is supported. The system language can be overwritten with <code><a href='https://rdrr.io/r/base/Sys.setenv.html'>Sys.setenv(AMR_locale = yourlanguage)</a></code>.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>