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

Compare commits

...

3 Commits

Author SHA1 Message Date
github-actions
943ca7c7de Built site for AMR@2.1.1.9095: 40edc16 2024-10-15 15:37:30 +00:00
github-actions
8cca90250b Built site for AMR@2.1.1.9095: 448b6ab 2024-10-15 15:32:56 +00:00
github-actions
4ddb872f23 Built site for AMR@2.1.1.9095: 5c4d8fc 2024-10-15 15:24:09 +00:00
79 changed files with 652 additions and 399 deletions

View File

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

View File

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

View File

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

View File

@ -29,7 +29,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -86,203 +86,562 @@
<div class="section level2">
<h2 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a>
</h2>
<p>The <code>AMR</code> package for R is an incredible tool for
antimicrobial resistance (AMR) data analysis, providing extensive
functionality for working with microbial and antimicrobial properties.
But what if youre working in Python and still want to benefit from the
robust features of <code>AMR</code>?</p>
<p>The best way is to access R directly from Python with the help of
<code>rpy2</code>, a simple yet powerful Python package. You can easily
call functions from the <code>AMR</code> package to process your own
data in your own Python environment. This post will guide you through
setting up <code>rpy2</code> and show you how to use R functions from
<code>AMR</code> in Python to supercharge your antimicrobial resistance
analysis.</p>
</div>
<div class="section level2">
<h2 id="what-is-rpy2">What is <code>rpy2</code>?<a class="anchor" aria-label="anchor" href="#what-is-rpy2"></a>
</h2>
<p><code>rpy2</code> is a Python library that allows Python users to run
R code within their Python scripts. Essentially, it acts as a bridge
between the two languages, allowing you to tap into the rich ecosystem
of R libraries (like <code>AMR</code>) while maintaining the flexibility
of Python.</p>
<p>The <code>AMR</code> package for R is a powerful tool for
antimicrobial resistance (AMR) analysis. It provides extensive features
for handling microbial and antimicrobial data. However, for those who
work primarily in Python, we now have a more intuitive option available:
the <code>AMR</code> Python package, which uses <code>rpy2</code>
internally. This package allows Python users to access all the functions
from the R <code>AMR</code> package without the need to set up
<code>rpy2</code> themselves. Since this Python package is not a true
port (which would require all R functions to be rewritten into
Python), R and the AMR R package are still required to be installed.
Yet, Python users can now easily work with AMR data directly through
Python code.</p>
<p>In this document, we explain how this works and provide simple
examples of using the <code>AMR</code> Python package.</p>
<div class="section level3">
<h3 id="key-features-of-rpy2">Key Features of <code>rpy2</code>:<a class="anchor" aria-label="anchor" href="#key-features-of-rpy2"></a>
<h3 id="how-it-works">How It Works<a class="anchor" aria-label="anchor" href="#how-it-works"></a>
</h3>
<p>The <code>AMR</code> Python package acts as a wrapper around the
functions in the <code>AMR</code> R package. The package simplifies the
process of calling R functions in Python, eliminating the need to
manually manage the <code>rpy2</code> setup, which Python uses
internally to be able to work with the R package. By just using
<code>import AMR</code>, Python users can directly use the functions
from the <code>AMR</code> R package as if they were native Python
functions.</p>
<p>Internally, <code>rpy2</code> is still being used, but all complexity
is hidden from the user. This approach keeps the Python code clean and
Pythonic, while still leveraging the full power of the R
<code>AMR</code> package.</p>
</div>
<div class="section level3">
<h3 id="example-of-usage">Example of Usage<a class="anchor" aria-label="anchor" href="#example-of-usage"></a>
</h3>
<p>Heres an example that demonstrates how to clean microorganism and
drug names using the <code>AMR</code> Python package:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="im">import</span> pandas <span class="im">as</span> pd</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a><span class="im">import</span> AMR</span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a><span class="co"># Sample data</span></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a>data <span class="op">=</span> {</span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a> <span class="st">"MOs"</span>: [<span class="st">'E. coli'</span>, <span class="st">'ESCCOL'</span>, <span class="st">'esco'</span>, <span class="st">'Esche coli'</span>],</span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> <span class="st">"Drug"</span>: [<span class="st">'Cipro'</span>, <span class="st">'CIP'</span>, <span class="st">'J01MA02'</span>, <span class="st">'Ciproxin'</span>]</span>
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a>}</span>
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a>df <span class="op">=</span> pd.DataFrame(data)</span>
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a></span>
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a><span class="co"># Use AMR functions to clean microorganism and drug names</span></span>
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a>df[<span class="st">'MO_clean'</span>] <span class="op">=</span> AMR.mo_name(df[<span class="st">'MOs'</span>])</span>
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a>df[<span class="st">'Drug_clean'</span>] <span class="op">=</span> AMR.ab_name(df[<span class="st">'Drug'</span>])</span>
<span id="cb1-14"><a href="#cb1-14" tabindex="-1"></a></span>
<span id="cb1-15"><a href="#cb1-15" tabindex="-1"></a><span class="co"># Display the results</span></span>
<span id="cb1-16"><a href="#cb1-16" tabindex="-1"></a><span class="bu">print</span>(df)</span></code></pre></div>
<table class="table">
<thead><tr class="header">
<th>MOs</th>
<th>Drug</th>
<th>MO_clean</th>
<th>Drug_clean</th>
</tr></thead>
<tbody>
<tr class="odd">
<td>E. coli</td>
<td>Cipro</td>
<td>Escherichia coli</td>
<td>Ciprofloxacin</td>
</tr>
<tr class="even">
<td>ESCCOL</td>
<td>CIP</td>
<td>Escherichia coli</td>
<td>Ciprofloxacin</td>
</tr>
<tr class="odd">
<td>esco</td>
<td>J01MA02</td>
<td>Escherichia coli</td>
<td>Ciprofloxacin</td>
</tr>
<tr class="even">
<td>Esche coli</td>
<td>Ciproxin</td>
<td>Escherichia coli</td>
<td>Ciprofloxacin</td>
</tr>
</tbody>
</table>
<div class="section level4">
<h4 id="explanation">Explanation<a class="anchor" aria-label="anchor" href="#explanation"></a>
</h4>
<ul>
<li>Seamlessly call R functions from Python.</li>
<li>Convert R data structures into Python data structures like pandas
DataFrames.</li>
<li>Leverage the full power of R libraries without leaving your Python
environment.</li>
<li><p><strong>mo_name:</strong> This function standardises
microorganism names. Here, different variations of <em>Escherichia
coli</em> (such as “E. coli”, “ESCCOL”, “esco”, and “Esche coli”) are
all converted into the correct, standardised form, “Escherichia
coli”.</p></li>
<li><p><strong>ab_name</strong>: Similarly, this function standardises
antimicrobial names. The different representations of ciprofloxacin
(e.g., “Cipro”, “CIP”, “J01MA02”, and “Ciproxin”) are all converted to
the standard name, “Ciprofloxacin”.</p></li>
</ul>
</div>
<div class="section level4">
<h4 id="taxonomic-data-sets-now-in-python">Taxonomic Data Sets Now in Python!<a class="anchor" aria-label="anchor" href="#taxonomic-data-sets-now-in-python"></a>
</h4>
<p>As a Python user, you might like that the most important data sets of
the <code>AMR</code> R package, <code>microorganisms</code>,
<code>antibiotics</code>, <code>clinical_breakpoints</code>, and
<code>example_isolates</code>, are now available as regular Python data
frames:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb2-1"><a href="#cb2-1" tabindex="-1"></a>AMR.microorganisms</span></code></pre></div>
<table class="table">
<colgroup>
<col width="11%">
<col width="29%">
<col width="8%">
<col width="8%">
<col width="8%">
<col width="10%">
<col width="13%">
<col width="9%">
</colgroup>
<thead><tr class="header">
<th>mo</th>
<th>fullname</th>
<th>status</th>
<th>kingdom</th>
<th>gbif</th>
<th>gbif_parent</th>
<th>gbif_renamed_to</th>
<th>prevalence</th>
</tr></thead>
<tbody>
<tr class="odd">
<td>B_GRAMN</td>
<td>(unknown Gram-negatives)</td>
<td>unknown</td>
<td>Bacteria</td>
<td>None</td>
<td>None</td>
<td>None</td>
<td>2.0</td>
</tr>
<tr class="even">
<td>B_GRAMP</td>
<td>(unknown Gram-positives)</td>
<td>unknown</td>
<td>Bacteria</td>
<td>None</td>
<td>None</td>
<td>None</td>
<td>2.0</td>
</tr>
<tr class="odd">
<td>B_ANAER-NEG</td>
<td>(unknown anaerobic Gram-negatives)</td>
<td>unknown</td>
<td>Bacteria</td>
<td>None</td>
<td>None</td>
<td>None</td>
<td>2.0</td>
</tr>
<tr class="even">
<td>B_ANAER-POS</td>
<td>(unknown anaerobic Gram-positives)</td>
<td>unknown</td>
<td>Bacteria</td>
<td>None</td>
<td>None</td>
<td>None</td>
<td>2.0</td>
</tr>
<tr class="odd">
<td>B_ANAER</td>
<td>(unknown anaerobic bacteria)</td>
<td>unknown</td>
<td>Bacteria</td>
<td>None</td>
<td>None</td>
<td>None</td>
<td>2.0</td>
</tr>
<tr class="even">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td>B_ZYMMN_POMC</td>
<td>Zymomonas pomaceae</td>
<td>accepted</td>
<td>Bacteria</td>
<td>10744418</td>
<td>3221412</td>
<td>None</td>
<td>2.0</td>
</tr>
<tr class="even">
<td>B_ZYMPH</td>
<td>Zymophilus</td>
<td>synonym</td>
<td>Bacteria</td>
<td>None</td>
<td>9475166</td>
<td>None</td>
<td>2.0</td>
</tr>
<tr class="odd">
<td>B_ZYMPH_PCVR</td>
<td>Zymophilus paucivorans</td>
<td>synonym</td>
<td>Bacteria</td>
<td>None</td>
<td>None</td>
<td>None</td>
<td>2.0</td>
</tr>
<tr class="even">
<td>B_ZYMPH_RFFN</td>
<td>Zymophilus raffinosivorans</td>
<td>synonym</td>
<td>Bacteria</td>
<td>None</td>
<td>None</td>
<td>None</td>
<td>2.0</td>
</tr>
<tr class="odd">
<td>F_ZYZYG</td>
<td>Zyzygomyces</td>
<td>unknown</td>
<td>Fungi</td>
<td>None</td>
<td>7581</td>
<td>None</td>
<td>2.0</td>
</tr>
</tbody>
</table>
<div class="sourceCode" id="cb3"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb3-1"><a href="#cb3-1" tabindex="-1"></a>AMR.antibiotics</span></code></pre></div>
<table style="width:100%;" class="table">
<colgroup>
<col width="4%">
<col width="12%">
<col width="20%">
<col width="25%">
<col width="9%">
<col width="11%">
<col width="7%">
<col width="9%">
</colgroup>
<thead><tr class="header">
<th>ab</th>
<th>cid</th>
<th>name</th>
<th>group</th>
<th>oral_ddd</th>
<th>oral_units</th>
<th>iv_ddd</th>
<th>iv_units</th>
</tr></thead>
<tbody>
<tr class="odd">
<td>AMA</td>
<td>4649.0</td>
<td>4-aminosalicylic acid</td>
<td>Antimycobacterials</td>
<td>12.00</td>
<td>g</td>
<td>NaN</td>
<td>None</td>
</tr>
<tr class="even">
<td>ACM</td>
<td>6450012.0</td>
<td>Acetylmidecamycin</td>
<td>Macrolides/lincosamides</td>
<td>NaN</td>
<td>None</td>
<td>NaN</td>
<td>None</td>
</tr>
<tr class="odd">
<td>ASP</td>
<td>49787020.0</td>
<td>Acetylspiramycin</td>
<td>Macrolides/lincosamides</td>
<td>NaN</td>
<td>None</td>
<td>NaN</td>
<td>None</td>
</tr>
<tr class="even">
<td>ALS</td>
<td>8954.0</td>
<td>Aldesulfone sodium</td>
<td>Other antibacterials</td>
<td>0.33</td>
<td>g</td>
<td>NaN</td>
<td>None</td>
</tr>
<tr class="odd">
<td>AMK</td>
<td>37768.0</td>
<td>Amikacin</td>
<td>Aminoglycosides</td>
<td>NaN</td>
<td>None</td>
<td>1.0</td>
<td>g</td>
</tr>
<tr class="even">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td>VIR</td>
<td>11979535.0</td>
<td>Virginiamycine</td>
<td>Other antibacterials</td>
<td>NaN</td>
<td>None</td>
<td>NaN</td>
<td>None</td>
</tr>
<tr class="even">
<td>VOR</td>
<td>71616.0</td>
<td>Voriconazole</td>
<td>Antifungals/antimycotics</td>
<td>0.40</td>
<td>g</td>
<td>0.4</td>
<td>g</td>
</tr>
<tr class="odd">
<td>XBR</td>
<td>72144.0</td>
<td>Xibornol</td>
<td>Other antibacterials</td>
<td>NaN</td>
<td>None</td>
<td>NaN</td>
<td>None</td>
</tr>
<tr class="even">
<td>ZID</td>
<td>77846445.0</td>
<td>Zidebactam</td>
<td>Other antibacterials</td>
<td>NaN</td>
<td>None</td>
<td>NaN</td>
<td>None</td>
</tr>
<tr class="odd">
<td>ZFD</td>
<td>NaN</td>
<td>Zoliflodacin</td>
<td>None</td>
<td>NaN</td>
<td>None</td>
<td>NaN</td>
<td>None</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section level2">
<h2 id="setting-up-rpy2">Setting Up <code>rpy2</code><a class="anchor" aria-label="anchor" href="#setting-up-rpy2"></a>
<h2 id="installation">Installation<a class="anchor" aria-label="anchor" href="#installation"></a>
</h2>
<p>Before diving into the examples, youll need to install both R and
<code>rpy2</code>. Heres a step-by-step guide on setting things up.</p>
<div class="section level3">
<h3 id="step-1-install-r">Step 1: Install R<a class="anchor" aria-label="anchor" href="#step-1-install-r"></a>
</h3>
<p>Ensure that R is installed on your system. R has minimal dependencies
and is very simple to install:</p>
<ul>
<li>
<strong>Linux</strong>
<ul>
<li>Ubuntu / Debian:<br><code>sudo apt install r-base</code>
</li>
<li>Fedora:<br><code>sudo dnf install R</code>
</li>
<li>CentOS/RHEL:<br><code>sudo yum install R</code>
</li>
<li>Arch Linux:<br><code>sudo pacman -S r</code>
</li>
</ul>
</li>
<li>
<strong>macOS</strong> (with Homebrew):<br><code>brew install r</code>
</li>
<li>
<strong>Other Systems:</strong><br>
Visit the <a href="https://cran.r-project.org" class="external-link">CRAN download
page</a>.</li>
</ul>
<p>To be able to use the <code>AMR</code> Python package, it is required
to install both R and the <code>AMR</code> R package.</p>
<div class="section level4">
<h4 id="preparation-install-r-and-amr-r-package">Preparation: Install R and <code>AMR</code> R package<a class="anchor" aria-label="anchor" href="#preparation-install-r-and-amr-r-package"></a>
</h4>
<p>For Linux and macOS, this is just:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" tabindex="-1"></a><span class="co"># Ubuntu / Debian</span></span>
<span id="cb4-2"><a href="#cb4-2" tabindex="-1"></a><span class="fu">sudo</span> apt install r-base <span class="kw">&amp;&amp;</span> <span class="ex">Rscript</span> <span class="at">-e</span> <span class="st">'install.packages("AMR")'</span></span>
<span id="cb4-3"><a href="#cb4-3" tabindex="-1"></a><span class="co"># Fedora:</span></span>
<span id="cb4-4"><a href="#cb4-4" tabindex="-1"></a><span class="fu">sudo</span> dnf install R <span class="kw">&amp;&amp;</span> <span class="ex">Rscript</span> <span class="at">-e</span> <span class="st">'install.packages("AMR")'</span></span>
<span id="cb4-5"><a href="#cb4-5" tabindex="-1"></a><span class="co"># CentOS/RHEL</span></span>
<span id="cb4-6"><a href="#cb4-6" tabindex="-1"></a><span class="fu">sudo</span> yum install R <span class="kw">&amp;&amp;</span> <span class="ex">Rscript</span> <span class="at">-e</span> <span class="st">'install.packages("AMR")'</span></span>
<span id="cb4-7"><a href="#cb4-7" tabindex="-1"></a><span class="co"># Arch Linux</span></span>
<span id="cb4-8"><a href="#cb4-8" tabindex="-1"></a><span class="fu">sudo</span> pacman <span class="at">-S</span> r <span class="kw">&amp;&amp;</span> <span class="ex">Rscript</span> <span class="at">-e</span> <span class="st">'install.packages("AMR")'</span></span>
<span id="cb4-9"><a href="#cb4-9" tabindex="-1"></a><span class="co"># macOS</span></span>
<span id="cb4-10"><a href="#cb4-10" tabindex="-1"></a><span class="ex">brew</span> install r <span class="kw">&amp;&amp;</span> <span class="ex">Rscript</span> <span class="at">-e</span> <span class="st">'install.packages("AMR")'</span></span></code></pre></div>
<p>For Windows, visit the <a href="https://cran.r-project.org" class="external-link">CRAN
download page</a> in install R, then afterwards install the AMR
package manually.</p>
</div>
<div class="section level3">
<h3 id="step-2-install-the-amr-package-in-r">Step 2: Install the <code>AMR</code> package in R<a class="anchor" aria-label="anchor" href="#step-2-install-the-amr-package-in-r"></a>
</h3>
<p>On Linux and macOS, open Terminal and run:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="ex">Rscript</span> <span class="at">-e</span> <span class="st">'install.packages("AMR")'</span></span></code></pre></div>
<p>For other systems, open your R console and install the
<code>AMR</code> package by running:</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"AMR"</span><span class="op">)</span></span></code></pre></div>
<p>On any system, you can also install the latest development version of
the <code>AMR</code> package by setting <code>repos</code> to our beta
channel:</p>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"AMR"</span>, repos <span class="op">=</span> <span class="st">"https://msberends.r-universe.dev"</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level3">
<h3 id="step-3-install-rpy2-in-python">Step 3: Install <code>rpy2</code> in Python<a class="anchor" aria-label="anchor" href="#step-3-install-rpy2-in-python"></a>
</h3>
<p>To install <code>rpy2</code>, simply run the following command in
your terminal:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" tabindex="-1"></a><span class="ex">pip</span> install rpy2</span></code></pre></div>
</div>
<div class="section level3">
<h3 id="step-4-test-rpy2-installation">Step 4: Test <code>rpy2</code> Installation<a class="anchor" aria-label="anchor" href="#step-4-test-rpy2-installation"></a>
</h3>
<p>To ensure everything is set up correctly, you can test your
installation by running the following Python script, which essentially
runs R in the background:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb5-1"><a href="#cb5-1" tabindex="-1"></a><span class="im">import</span> rpy2.robjects <span class="im">as</span> ro</span>
<span id="cb5-2"><a href="#cb5-2" tabindex="-1"></a></span>
<span id="cb5-3"><a href="#cb5-3" tabindex="-1"></a><span class="co"># Test a simple R function from Python</span></span>
<span id="cb5-4"><a href="#cb5-4" tabindex="-1"></a>ro.r(<span class="st">'1 + 1'</span>)</span></code></pre></div>
<p>If this returns <code>2</code>, youre good to go!</p>
<div class="section level4">
<h4 id="install-amr-python-package">Install <code>AMR</code> Python Package<a class="anchor" aria-label="anchor" href="#install-amr-python-package"></a>
</h4>
<p>Since the Python package is available on the official <a href="https://pypi.org/project/AMR/" class="external-link">Python Package Index</a>, you can
just run:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" tabindex="-1"></a><span class="ex">pip</span> install AMR</span></code></pre></div>
</div>
</div>
<div class="section level2">
<h2 id="working-with-amr-in-python">Working with <code>AMR</code> in Python<a class="anchor" aria-label="anchor" href="#working-with-amr-in-python"></a>
</h2>
<p>Now that we have <code>rpy2</code> set up, lets walk through some
practical examples of using the <code>AMR</code> package within
Python.</p>
<p>Now that we have everything set up, lets walk through some practical
examples of using the <code>AMR</code> package within Python.</p>
<div class="section level3">
<h3 id="example-1-converting-taxonomic-data">Example 1: Converting Taxonomic Data<a class="anchor" aria-label="anchor" href="#example-1-converting-taxonomic-data"></a>
<h3 id="example-1-calculating-amr">Example 1: Calculating AMR<a class="anchor" aria-label="anchor" href="#example-1-calculating-amr"></a>
</h3>
<p>Lets start by converting taxonomic user input to valid taxonomy
using the <code>AMR</code> package, from within Python:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb6-1"><a href="#cb6-1" tabindex="-1"></a><span class="im">import</span> pandas <span class="im">as</span> pd</span>
<span id="cb6-2"><a href="#cb6-2" tabindex="-1"></a><span class="im">import</span> rpy2.robjects <span class="im">as</span> ro</span>
<span id="cb6-3"><a href="#cb6-3" tabindex="-1"></a><span class="im">from</span> rpy2.robjects.packages <span class="im">import</span> importr</span>
<span id="cb6-4"><a href="#cb6-4" tabindex="-1"></a><span class="im">from</span> rpy2.robjects <span class="im">import</span> pandas2ri</span>
<span id="cb6-5"><a href="#cb6-5" tabindex="-1"></a></span>
<span id="cb6-6"><a href="#cb6-6" tabindex="-1"></a><span class="co"># Load the AMR package from R</span></span>
<span id="cb6-7"><a href="#cb6-7" tabindex="-1"></a>amr <span class="op">=</span> importr(<span class="st">'AMR'</span>)</span>
<span id="cb6-8"><a href="#cb6-8" tabindex="-1"></a></span>
<span id="cb6-9"><a href="#cb6-9" tabindex="-1"></a><span class="co"># Example user dataset in Python</span></span>
<span id="cb6-10"><a href="#cb6-10" tabindex="-1"></a>data <span class="op">=</span> pd.DataFrame({</span>
<span id="cb6-11"><a href="#cb6-11" tabindex="-1"></a> <span class="st">'microorganism'</span>: [<span class="st">'E. coli'</span>, <span class="st">'S. aureus'</span>, <span class="st">'P. aeruginosa'</span>, <span class="st">'K. pneumoniae'</span>]</span>
<span id="cb6-12"><a href="#cb6-12" tabindex="-1"></a>})</span>
<span id="cb6-13"><a href="#cb6-13" tabindex="-1"></a></span>
<span id="cb6-14"><a href="#cb6-14" tabindex="-1"></a><span class="co"># Apply mo_name() from the AMR package to the 'microorganism' column</span></span>
<span id="cb6-15"><a href="#cb6-15" tabindex="-1"></a>ro.globalenv[<span class="st">'r_data'</span>] <span class="op">=</span> data</span>
<span id="cb6-16"><a href="#cb6-16" tabindex="-1"></a>ro.r(<span class="st">'r_data$mo_name &lt;- mo_name(r_data$microorganism)'</span>)</span>
<span id="cb6-17"><a href="#cb6-17" tabindex="-1"></a></span>
<span id="cb6-18"><a href="#cb6-18" tabindex="-1"></a><span class="co"># Retrieve and print the modified R DataFrame in Python</span></span>
<span id="cb6-19"><a href="#cb6-19" tabindex="-1"></a>result <span class="op">=</span> ro.r(<span class="st">'r_data'</span>)</span>
<span id="cb6-20"><a href="#cb6-20" tabindex="-1"></a>result <span class="op">=</span> pandas2ri.rpy2py(result)</span>
<span id="cb6-21"><a href="#cb6-21" tabindex="-1"></a><span class="bu">print</span>(result)</span></code></pre></div>
<p>In this example, a Python dataset with microorganism names like
<em>E. coli</em> and <em>S. aureus</em> is passed to the R function
<code><a href="../reference/mo_property.html">mo_name()</a></code>. The result is an updated <code>DataFrame</code>
that includes the standardised microorganism names based on the
<code><a href="../reference/mo_property.html">mo_name()</a></code> function from the <code>AMR</code> package.</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb6-1"><a href="#cb6-1" tabindex="-1"></a><span class="im">import</span> AMR</span>
<span id="cb6-2"><a href="#cb6-2" tabindex="-1"></a><span class="im">import</span> pandas <span class="im">as</span> pd</span>
<span id="cb6-3"><a href="#cb6-3" tabindex="-1"></a></span>
<span id="cb6-4"><a href="#cb6-4" tabindex="-1"></a>df <span class="op">=</span> AMR.example_isolates</span>
<span id="cb6-5"><a href="#cb6-5" tabindex="-1"></a>result <span class="op">=</span> AMR.resistance(df[<span class="st">"AMX"</span>])</span>
<span id="cb6-6"><a href="#cb6-6" tabindex="-1"></a><span class="bu">print</span>(result)</span></code></pre></div>
<pre><code>[0.59555556]</code></pre>
</div>
<div class="section level3">
<h3 id="example-2-generating-an-antibiogram">Example 2: Generating an Antibiogram<a class="anchor" aria-label="anchor" href="#example-2-generating-an-antibiogram"></a>
<h3 id="example-2-generating-antibiograms">Example 2: Generating Antibiograms<a class="anchor" aria-label="anchor" href="#example-2-generating-antibiograms"></a>
</h3>
<p>One of the core functions of the <code>AMR</code> package is
generating an antibiogram, a table that summarises the antimicrobial
susceptibility of bacterial isolates. Heres how you can generate an
antibiogram from Python:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb7-1"><a href="#cb7-1" tabindex="-1"></a><span class="co"># Run an antibiogram in R from Python</span></span>
<span id="cb7-2"><a href="#cb7-2" tabindex="-1"></a>ro.r(<span class="st">'result &lt;- antibiogram(example_isolates, antibiotics = c(aminoglycosides(), carbapenems()))'</span>)</span>
<span id="cb7-3"><a href="#cb7-3" tabindex="-1"></a></span>
<span id="cb7-4"><a href="#cb7-4" tabindex="-1"></a><span class="co"># Retrieve the result in Python</span></span>
<span id="cb7-5"><a href="#cb7-5" tabindex="-1"></a>result <span class="op">=</span> ro.r(<span class="st">'as.data.frame(result)'</span>)</span>
<span id="cb7-6"><a href="#cb7-6" tabindex="-1"></a><span class="bu">print</span>(result)</span></code></pre></div>
<p>In this example, we generate an antibiogram by selecting
aminoglycosides and carbapenems, two classes of antibiotics, and then
convert the resulting R data frame into a Python-readable format.</p>
</div>
<div class="section level3">
<h3 id="example-3-filtering-data-based-on-gram-negative-bacteria">Example 3: Filtering Data Based on Gram-Negative Bacteria<a class="anchor" aria-label="anchor" href="#example-3-filtering-data-based-on-gram-negative-bacteria"></a>
</h3>
<p>Lets say you want to filter the dataset for Gram-negative bacteria
and display their resistance to certain antibiotics:</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb8-1"><a href="#cb8-1" tabindex="-1"></a><span class="co"># Filter for Gram-negative bacteria with intrinsic resistance to cefotaxime</span></span>
<span id="cb8-2"><a href="#cb8-2" tabindex="-1"></a>ro.r(<span class="st">'result &lt;- example_isolates[which(mo_is_gram_negative() &amp; mo_is_intrinsic_resistant(ab = "cefotax")), c("bacteria", aminoglycosides(), carbapenems())]'</span>)</span>
<span id="cb8-3"><a href="#cb8-3" tabindex="-1"></a></span>
<span id="cb8-4"><a href="#cb8-4" tabindex="-1"></a><span class="co"># Retrieve the filtered result in Python</span></span>
<span id="cb8-5"><a href="#cb8-5" tabindex="-1"></a>result <span class="op">=</span> ro.r(<span class="st">'as.data.frame(result)'</span>)</span>
<span id="cb8-6"><a href="#cb8-6" tabindex="-1"></a><span class="bu">print</span>(result)</span></code></pre></div>
<p>This example uses the AMR functions
<code><a href="../reference/mo_property.html">mo_is_gram_negative()</a></code> and
<code><a href="../reference/mo_property.html">mo_is_intrinsic_resistant()</a></code> to filter the dataset and
returns a subset of bacteria with resistance data.</p>
</div>
<div class="section level3">
<h3 id="example-4-customising-the-antibiogram">Example 4: Customising the Antibiogram<a class="anchor" aria-label="anchor" href="#example-4-customising-the-antibiogram"></a>
</h3>
<p>You can easily customise the antibiogram by passing different
antibiotics or microorganism transformations, as shown below:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb9-1"><a href="#cb9-1" tabindex="-1"></a><span class="co"># Customise the antibiogram with different settings</span></span>
<span id="cb9-2"><a href="#cb9-2" tabindex="-1"></a>ro.r(<span class="st">'result &lt;- antibiogram(example_isolates, antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"), mo_transform = "gramstain")'</span>)</span>
<span id="cb9-3"><a href="#cb9-3" tabindex="-1"></a></span>
<span id="cb9-4"><a href="#cb9-4" tabindex="-1"></a><span class="co"># Retrieve and print the result</span></span>
<span id="cb9-5"><a href="#cb9-5" tabindex="-1"></a>result <span class="op">=</span> ro.r(<span class="st">'as.data.frame(result)'</span>)</span>
<span id="cb9-6"><a href="#cb9-6" tabindex="-1"></a><span class="bu">print</span>(result)</span></code></pre></div>
<p>Here, we use piperacillin/tazobactam (TZP) in combination with
tobramycin (TOB) and gentamicin (GEN) to see how they perform against
various Gram-negative bacteria.</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb8-1"><a href="#cb8-1" tabindex="-1"></a>result2a <span class="op">=</span> AMR.antibiogram(df[[<span class="st">"mo"</span>, <span class="st">"AMX"</span>, <span class="st">"CIP"</span>, <span class="st">"TZP"</span>]])</span>
<span id="cb8-2"><a href="#cb8-2" tabindex="-1"></a><span class="bu">print</span>(result2a)</span></code></pre></div>
<table class="table">
<colgroup>
<col width="22%">
<col width="22%">
<col width="22%">
<col width="33%">
</colgroup>
<thead><tr class="header">
<th>Pathogen</th>
<th>Amoxicillin</th>
<th>Ciprofloxacin</th>
<th>Piperacillin/tazobactam</th>
</tr></thead>
<tbody>
<tr class="odd">
<td>CoNS</td>
<td>7% (10/142)</td>
<td>73% (183/252)</td>
<td>30% (10/33)</td>
</tr>
<tr class="even">
<td>E. coli</td>
<td>50% (196/392)</td>
<td>88% (399/456)</td>
<td>94% (393/416)</td>
</tr>
<tr class="odd">
<td>K. pneumoniae</td>
<td>0% (0/58)</td>
<td>96% (53/55)</td>
<td>89% (47/53)</td>
</tr>
<tr class="even">
<td>P. aeruginosa</td>
<td>0% (0/30)</td>
<td>100% (30/30)</td>
<td>None</td>
</tr>
<tr class="odd">
<td>P. mirabilis</td>
<td>None</td>
<td>94% (34/36)</td>
<td>None</td>
</tr>
<tr class="even">
<td>S. aureus</td>
<td>6% (8/131)</td>
<td>90% (171/191)</td>
<td>None</td>
</tr>
<tr class="odd">
<td>S. epidermidis</td>
<td>1% (1/91)</td>
<td>64% (87/136)</td>
<td>None</td>
</tr>
<tr class="even">
<td>S. hominis</td>
<td>None</td>
<td>80% (56/70)</td>
<td>None</td>
</tr>
<tr class="odd">
<td>S. pneumoniae</td>
<td>100% (112/112)</td>
<td>None</td>
<td>100% (112/112)</td>
</tr>
</tbody>
</table>
<div class="sourceCode" id="cb9"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb9-1"><a href="#cb9-1" tabindex="-1"></a>result2b <span class="op">=</span> AMR.antibiogram(df[[<span class="st">"mo"</span>, <span class="st">"AMX"</span>, <span class="st">"CIP"</span>, <span class="st">"TZP"</span>]], mo_transform <span class="op">=</span> <span class="st">"gramstain"</span>)</span>
<span id="cb9-2"><a href="#cb9-2" tabindex="-1"></a><span class="bu">print</span>(result2b)</span></code></pre></div>
<table class="table">
<colgroup>
<col width="20%">
<col width="22%">
<col width="23%">
<col width="33%">
</colgroup>
<thead><tr class="header">
<th>Pathogen</th>
<th>Amoxicillin</th>
<th>Ciprofloxacin</th>
<th>Piperacillin/tazobactam</th>
</tr></thead>
<tbody>
<tr class="odd">
<td>Gram-negative</td>
<td>36% (226/631)</td>
<td>91% (621/684)</td>
<td>88% (565/641)</td>
</tr>
<tr class="even">
<td>Gram-positive</td>
<td>43% (305/703)</td>
<td>77% (560/724)</td>
<td>86% (296/345)</td>
</tr>
</tbody>
</table>
<p>In this example, we generate an antibiogram by selecting various
antibiotics.</p>
</div>
</div>
<div class="section level2">
<h2 id="conclusion">Conclusion<a class="anchor" aria-label="anchor" href="#conclusion"></a>
</h2>
<p>Using <code>rpy2</code>, you can easily integrate the power of Rs
<code>AMR</code> package into your Python workflows. Whether you are
generating antibiograms, analyzing resistance data, or performing
complex filtering, <code>rpy2</code> gives you the flexibility to run R
code without leaving the Python environment. This makes it a perfect
solution for teams working across both R and Python.</p>
<p>With the <code>AMR</code> Python package, Python users can now
effortlessly call R functions from the <code>AMR</code> R package. This
eliminates the need for complex <code>rpy2</code> configurations and
provides a clean, easy-to-use interface for antimicrobial resistance
analysis. The examples provided above demonstrate how this can be
applied to typical workflows, such as standardising microorganism and
antimicrobial names or calculating resistance.</p>
<p>By using <code>import AMR</code>, you can seamlessly integrate the
robust features of the R <code>AMR</code> package into your Python
workflows. Whether youre cleaning data or analysing resistance
patterns, the <code>AMR</code> Python package makes it easy to work with
AMR data in Python.</p>
</div>
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
</nav></aside>

View File

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

View File

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

View File

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

View File

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

View File

@ -29,7 +29,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -76,7 +76,7 @@
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Data sets for download / own use</h1>
<h4 data-toc-skip class="date">10 October 2024</h4>
<h4 data-toc-skip class="date">15 October 2024</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
<div class="d-none name"><code>datasets.Rmd</code></div>

View File

@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -59,8 +59,6 @@
<dd>
</dd><dt><a href="MDR.html">How to determine multi-drug resistance (MDR)</a></dt>
<dd>
</dd><dt><a href="other_pkg.html">Using AMR with other packages: AMR &amp; dplyr/tidyverse</a></dt>
<dd>
</dd><dt><a href="PCA.html">How to conduct principal component analysis (PCA) for AMR</a></dt>
<dd>
</dd><dt><a href="resistance_predict.html">How to predict antimicrobial resistance</a></dt>

View File

@ -1,110 +0,0 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Using AMR with other packages: AMR &amp; dplyr/tidyverse • AMR (for R)</title>
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png">
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet">
<script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.9/font.css" rel="stylesheet">
<link href="../deps/Fira_Code-0.4.9/font.css" rel="stylesheet">
<link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet">
<link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet">
<script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet">
<script src="../extra.js"></script><meta property="og:title" content="Using AMR with other packages: AMR &amp; dplyr/tidyverse">
</head>
<body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar navbar-expand-lg fixed-top bg-primary" data-bs-theme="dark" aria-label="Site navigation"><div class="container">
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbar" class="collapse navbar-collapse ms-3">
<ul class="navbar-nav me-auto">
<li class="nav-item dropdown">
<button class="nav-link dropdown-toggle" type="button" id="dropdown-how-to" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true"><span class="fa fa-question-circle"></span> How to</button>
<ul class="dropdown-menu" aria-labelledby="dropdown-how-to">
<li><a class="dropdown-item" href="../articles/AMR.html"><span class="fa fa-directions"></span> Conduct AMR Analysis</a></li>
<li><a class="dropdown-item" href="../reference/antibiogram.html"><span class="fa fa-file-prescription"></span> Generate Antibiogram (Trad./Syndromic/WISCA)</a></li>
<li><a class="dropdown-item" href="../articles/resistance_predict.html"><span class="fa fa-dice"></span> Predict Antimicrobial Resistance</a></li>
<li><a class="dropdown-item" href="../articles/datasets.html"><span class="fa fa-database"></span> Download Data Sets for Own Use</a></li>
<li><a class="dropdown-item" href="../reference/AMR-options.html"><span class="fa fa-gear"></span> Set User- Or Team-specific Package Settings</a></li>
<li><a class="dropdown-item" href="../articles/PCA.html"><span class="fa fa-compress"></span> Conduct Principal Component Analysis for AMR</a></li>
<li><a class="dropdown-item" href="../articles/MDR.html"><span class="fa fa-skull-crossbones"></span> Determine Multi-Drug Resistance (MDR)</a></li>
<li><a class="dropdown-item" href="../articles/WHONET.html"><span class="fa fa-globe-americas"></span> Work with WHONET Data</a></li>
<li><a class="dropdown-item" href="../articles/EUCAST.html"><span class="fa fa-exchange-alt"></span> Apply Eucast Rules</a></li>
<li><a class="dropdown-item" href="../reference/mo_property.html"><span class="fa fa-bug"></span> Get Taxonomy of a Microorganism</a></li>
<li><a class="dropdown-item" href="../reference/ab_property.html"><span class="fa fa-capsules"></span> Get Properties of an Antibiotic Drug</a></li>
<li><a class="dropdown-item" href="../reference/av_property.html"><span class="fa fa-capsules"></span> Get Properties of an Antiviral Drug</a></li>
</ul>
</li>
<li class="nav-item"><a class="nav-link" href="../articles/AMR_for_Python.html"><span class="fa fab fa-python"></span> AMR for Python</a></li>
<li class="nav-item"><a class="nav-link" href="../reference/index.html"><span class="fa fa-book-open"></span> Manual</a></li>
<li class="nav-item"><a class="nav-link" href="../authors.html"><span class="fa fa-users"></span> Authors</a></li>
</ul>
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link" href="../news/index.html"><span class="fa far fa-newspaper"></span> Changelog</a></li>
<li class="nav-item"><a class="external-link nav-link" href="https://github.com/msberends/AMR"><span class="fa fab fa-github"></span> Source Code</a></li>
</ul>
</div>
</div>
</nav><div class="container template-article">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Using AMR with other packages: AMR &amp; dplyr/tidyverse</h1>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/other_pkg.Rmd" class="external-link"><code>vignettes/other_pkg.Rmd</code></a></small>
<div class="d-none name"><code>other_pkg.Rmd</code></div>
</div>
<p>This page will be updated shortly, to give explicit examples of how
to work ideally with the <code>AMR</code> package, for those who are
used to working in <code>dplyr</code> or other tidyverse packages.</p>
</main>
</div>
<footer><div class="pkgdown-footer-left">
<p><code>AMR</code> (for R). Free and open-source, licenced under the <a target="_blank" href="https://github.com/msberends/AMR/blob/main/LICENSE" class="external-link">GNU General Public License version 2.0 (GPL-2)</a>.<br>Developed at the <a target="_blank" href="https://www.rug.nl" class="external-link">University of Groningen</a> and <a target="_blank" href="https://www.umcg.nl" class="external-link">University Medical Center Groningen</a> in The Netherlands.</p>
</div>
<div class="pkgdown-footer-right">
<p><a target="_blank" href="https://www.rug.nl" class="external-link"><img src="https://github.com/msberends/AMR/raw/main/pkgdown/assets/logo_rug.svg" style="max-width: 150px;"></a><a target="_blank" href="https://www.umcg.nl" class="external-link"><img src="https://github.com/msberends/AMR/raw/main/pkgdown/assets/logo_umcg.svg" style="max-width: 150px;"></a></p>
</div>
</footer>
</div>
</body>
</html>

View File

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

View File

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

View File

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

View File

@ -32,7 +32,7 @@
<a class="navbar-brand me-2" href="index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -91,6 +91,9 @@
<li>100% free of costs and dependencies, highly suitable for places with <strong>limited resources</strong>
</li>
</ul>
<blockquote>
<p>Now available for Python too! <a href="./articles/AMR_for_Python.html">Click here</a> to read more.</p>
</blockquote>
<div style="display: flex; font-size: 0.8em;">
<p style="text-align:left; width: 50%;">
<small><a href="https://msberends.github.io/AMR/">https://msberends.github.io/AMR</a></small>

View File

@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -47,18 +47,18 @@
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="2.1.1.9094" id="amr-2119094">AMR 2.1.1.9094<a class="anchor" aria-label="anchor" href="#amr-2119094"></a></h2>
<h2 class="pkg-version" data-toc-text="2.1.1.9095" id="amr-2119095">AMR 2.1.1.9095<a class="anchor" aria-label="anchor" href="#amr-2119095"></a></h2>
<p><em>(this beta version will eventually become v3.0. Were happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using <a href="https://msberends.github.io/AMR/#latest-development-version">the instructions here</a>.)</em></p>
<div class="section level5">
<h5 id="a-new-milestone-amr-v30-with-one-health-support--human--veterinary--environmental-2-1-1-9094">A New Milestone: AMR v3.0 with One Health Support (= Human + Veterinary + Environmental)<a class="anchor" aria-label="anchor" href="#a-new-milestone-amr-v30-with-one-health-support--human--veterinary--environmental-2-1-1-9094"></a></h5>
<h5 id="a-new-milestone-amr-v30-with-one-health-support--human--veterinary--environmental-2-1-1-9095">A New Milestone: AMR v3.0 with One Health Support (= Human + Veterinary + Environmental)<a class="anchor" aria-label="anchor" href="#a-new-milestone-amr-v30-with-one-health-support--human--veterinary--environmental-2-1-1-9095"></a></h5>
<p>This package now supports not only tools for AMR data analysis in clinical settings, but also for veterinary and environmental microbiology. This was made possible through a collaboration with the <a href="https://www.upei.ca/avc" class="external-link">University of Prince Edward Islands Atlantic Veterinary College</a>, Canada. To celebrate this great improvement of the package, we also updated the package logo to reflect this change.</p>
</div>
<div class="section level3">
<h3 id="breaking-2-1-1-9094">Breaking<a class="anchor" aria-label="anchor" href="#breaking-2-1-1-9094"></a></h3>
<h3 id="breaking-2-1-1-9095">Breaking<a class="anchor" aria-label="anchor" href="#breaking-2-1-1-9095"></a></h3>
<ul><li>Removed all functions and references that used the deprecated <code>rsi</code> class, which were all replaced with their <code>sir</code> equivalents over a year ago</li>
</ul></div>
<div class="section level3">
<h3 id="new-2-1-1-9094">New<a class="anchor" aria-label="anchor" href="#new-2-1-1-9094"></a></h3>
<h3 id="new-2-1-1-9095">New<a class="anchor" aria-label="anchor" href="#new-2-1-1-9095"></a></h3>
<ul><li>
<strong>One Health implementation</strong>
<ul><li>Function <code><a href="../reference/as.sir.html">as.sir()</a></code> now has extensive support for veterinary breakpoints from CLSI. Use <code>breakpoint_type = "animal"</code> and set the <code>host</code> argument to a variable that contains animal species names.</li>
@ -90,12 +90,16 @@
<li>New function <code><a href="../reference/as.mic.html">rescale_mic()</a></code>, which allows users to rescale MIC values to a manually set range. This is the powerhouse behind the <code>scale_*_mic()</code> functions, but it can be used independently to, for instance, compare equality in MIC distributions by rescaling them to the same range first.</li>
</ul></li>
<li>
<strong>Support for Python</strong>
<ul><li>While using R for the heavy lifting, <a href="https://pypi.org/project/AMR/" class="external-link">our AMR Python Package</a> was developed to run the AMR R package natively in Python. The Python package will always have the same version number as the R package, as it is built automatically with every code change.</li>
</ul></li>
<li>
<strong>Other</strong>
<ul><li>New function <code><a href="../reference/mo_property.html">mo_group_members()</a></code> to retrieve the member microorganisms of a microorganism group. For example, <code>mo_group_members("Strep group C")</code> returns a vector of all microorganisms that belong to that group.</li>
</ul></li>
</ul></div>
<div class="section level3">
<h3 id="changed-2-1-1-9094">Changed<a class="anchor" aria-label="anchor" href="#changed-2-1-1-9094"></a></h3>
<h3 id="changed-2-1-1-9095">Changed<a class="anchor" aria-label="anchor" href="#changed-2-1-1-9095"></a></h3>
<ul><li>SIR interpretation
<ul><li>It is now possible to use column names for argument <code>ab</code>, <code>mo</code>, and <code>uti</code>: <code>as.sir(..., ab = "column1", mo = "column2", uti = "column3")</code>. This greatly improves the flexibility for users.</li>
<li>Users can now set their own criteria (using regular expressions) as to what should be considered S, I, R, SDD, and NI.</li>
@ -125,6 +129,7 @@
<li>Sorting of MIC values (using <code><a href="https://rdrr.io/r/base/sort.html" class="external-link">sort()</a></code>) was fixed in the same manner; <code>&lt;0.001</code> now gets sorted before <code>0.001</code>, and <code>&gt;0.001</code> gets sorted after <code>0.001</code>.</li>
<li>Intermediate log2 levels used for MIC plotting are now more common values instead of following a strict dilution range</li>
</ul></li>
<li>Disks of 0 to 5 mm are now allowed, the newly allowed range for disk diffusion (<code><a href="../reference/as.disk.html">as.disk()</a></code>) is now between 0 and 50 mm</li>
<li>Updated <code><a href="../reference/italicise_taxonomy.html">italicise_taxonomy()</a></code> to support HTML output</li>
<li>
<code><a href="../reference/custom_eucast_rules.html">custom_eucast_rules()</a></code> now supports multiple antibiotics and antibiotic groups to be affected by a single rule</li>
@ -147,14 +152,14 @@
<li>Improved algorithm of <code><a href="../reference/first_isolate.html">first_isolate()</a></code> when using the phenotype-based method, to prioritise records with the highest availability of SIR values</li>
</ul></div>
<div class="section level3">
<h3 id="other-2-1-1-9094">Other<a class="anchor" aria-label="anchor" href="#other-2-1-1-9094"></a></h3>
<h3 id="other-2-1-1-9095">Other<a class="anchor" aria-label="anchor" href="#other-2-1-1-9095"></a></h3>
<ul><li>Greatly improved <code>vctrs</code> integration, a Tidyverse package working in the background for many Tidyverse functions. For users, this means that functions such as <code>dplyr</code>s <code><a href="https://dplyr.tidyverse.org/reference/bind_rows.html" class="external-link">bind_rows()</a></code>, <code><a href="https://dplyr.tidyverse.org/reference/rowwise.html" class="external-link">rowwise()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/c_across.html" class="external-link">c_across()</a></code> are now supported for e.g. columns of class <code>mic</code>. Despite this, this <code>AMR</code> package is still zero-dependent on any other package, including <code>dplyr</code> and <code>vctrs</code>.</li>
<li>Greatly updated and expanded documentation</li>
<li>Added Larisse Bolton, Jordan Stull, Matthew Saab, and Javier Sanchez as contributors, to thank them for their valuable input</li>
<li>Stopped support for SAS (<code>.xpt</code>) files, since their file structure and extremely inefficient and requires more disk space than GitHub allows in a single commit.</li>
</ul></div>
<div class="section level3">
<h3 id="older-versions-2-1-1-9094">Older Versions<a class="anchor" aria-label="anchor" href="#older-versions-2-1-1-9094"></a></h3>
<h3 id="older-versions-2-1-1-9095">Older Versions<a class="anchor" aria-label="anchor" href="#older-versions-2-1-1-9095"></a></h3>
<p>This changelog only contains changes from AMR v3.0 (October 2024) and later.</p>
<ul><li>For prior v2 versions, please see <a href="https://github.com/msberends/AMR/blob/v2.1.1/NEWS.md" class="external-link">our v2 archive</a>.</li>
<li>For prior v1 versions, please see <a href="https://github.com/msberends/AMR/blob/v1.8.2/NEWS.md" class="external-link">our v1 archive</a>.</li>

View File

@ -7,12 +7,11 @@ articles:
datasets: datasets.html
EUCAST: EUCAST.html
MDR: MDR.html
other_pkg: other_pkg.html
PCA: PCA.html
resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html
WHONET: WHONET.html
last_built: 2024-10-10T14:41Z
last_built: 2024-10-15T15:34Z
urls:
reference: https://msberends.github.io/AMR/reference
article: https://msberends.github.io/AMR/articles

View File

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

View File

@ -21,7 +21,7 @@ The AMR package is available in English, Chinese, Czech, Danish, Dutch, Finnish,
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -110,16 +110,16 @@
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">df</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> birth_date age age_exact age_at_y2k</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1965-12-05 58 58.84699 34</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1980-03-01 44 44.60929 19</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1949-11-01 74 74.93989 50</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1947-02-14 77 77.65301 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1940-02-19 84 84.63934 59</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1988-01-10 36 36.74863 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1997-08-27 27 27.12022 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1978-01-26 46 46.70492 21</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1972-06-17 52 52.31421 27</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1986-08-10 38 38.16667 13</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1965-12-05 58 58.86066 34</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1980-03-01 44 44.62295 19</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1949-11-01 74 74.95355 50</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1947-02-14 77 77.66667 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1940-02-19 84 84.65301 59</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1988-01-10 36 36.76230 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1997-08-27 27 27.13388 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1978-01-26 46 46.71858 21</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1972-06-17 52 52.32787 27</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1986-08-10 38 38.18033 13</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>

View File

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

View File

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

View File

@ -9,7 +9,7 @@ In short, if you have a column name that resembles an antimicrobial drug, it wil
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Transform Input to Disk Diffusion Diameters — as.disk • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.9/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.9/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Transform Input to Disk Diffusion Diameters — as.disk"><meta name="description" content="This transforms a vector to a new class disk, which is a disk diffusion growth zone size (around an antibiotic disk) in millimetres between 6 and 50."><meta property="og:description" content="This transforms a vector to a new class disk, which is a disk diffusion growth zone size (around an antibiotic disk) in millimetres between 6 and 50."><meta property="og:image" content="https://msberends.github.io/AMR/logo.svg"></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Transform Input to Disk Diffusion Diameters — as.disk • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.9/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.9/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Transform Input to Disk Diffusion Diameters — as.disk"><meta name="description" content="This transforms a vector to a new class disk, which is a disk diffusion growth zone size (around an antibiotic disk) in millimetres between 0 and 50."><meta property="og:description" content="This transforms a vector to a new class disk, which is a disk diffusion growth zone size (around an antibiotic disk) in millimetres between 0 and 50."><meta property="og:image" content="https://msberends.github.io/AMR/logo.svg"></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -48,7 +48,7 @@
</div>
<div class="ref-description section level2">
<p>This transforms a vector to a new class <code>disk</code>, which is a disk diffusion growth zone size (around an antibiotic disk) in millimetres between 6 and 50.</p>
<p>This transforms a vector to a new class <code>disk</code>, which is a disk diffusion growth zone size (around an antibiotic disk) in millimetres between 0 and 50.</p>
</div>
<div class="section level2">
@ -83,7 +83,7 @@
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>Interpret disk values as SIR values with <code><a href="as.sir.html">as.sir()</a></code>. It supports guidelines from EUCAST and CLSI.</p>
<p>Disk diffusion growth zone sizes must be between 6 and 50 millimetres. Values higher than 50 but lower than 100 will be maximised to 50. All others input values outside the 6-50 range will return <code>NA</code>.</p>
<p>Disk diffusion growth zone sizes must be between 0 and 50 millimetres. Values higher than 50 but lower than 100 will be maximised to 50. All others input values outside the 0-50 range will return <code>NA</code>.</p>
<p><code>NA_disk_</code> is a missing value of the new <code>disk</code> class.</p>
</div>
<div class="section level2">

View File

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

View File

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

View File

@ -21,7 +21,7 @@ All breakpoints used for interpretation are available in our clinical_breakpoint
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -727,8 +727,8 @@ A microorganism is categorised as "Resistant" when there is a high likelihood of
<span class="r-msg co"><span class="r-pr">#&gt;</span> </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Run sir_interpretation_history() afterwards to retrieve a logbook with</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> all the details of the breakpoint interpretations.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Interpreting MIC values: column 'nitrofuratoin' (NIT, nitrofurantoin),</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2024...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Interpreting disk diffusion zones: column 'nitrofuratoin' (NIT,</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> nitrofurantoin), EUCAST 2024...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Assuming value "urine" in column 'specimen' reflects a urinary tract</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> infection.</span>
@ -736,8 +736,8 @@ A microorganism is categorised as "Resistant" when there is a high likelihood of
<span class="r-msg co"><span class="r-pr">#&gt;</span> </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Run sir_interpretation_history() afterwards to retrieve a logbook with</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> all the details of the breakpoint interpretations.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Interpreting MIC values: column 'nitrofuratoin' (NIT, nitrofurantoin),</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2024...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Interpreting disk diffusion zones: column 'nitrofuratoin' (NIT,</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> nitrofurantoin), EUCAST 2024...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Run sir_interpretation_history() afterwards to retrieve a logbook with</span>
@ -785,16 +785,16 @@ A microorganism is categorised as "Resistant" when there is a high likelihood of
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 57 × 16</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> datetime index ab_given mo_given host_given ab mo </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">*</span> <span style="color: #949494; font-style: italic;">&lt;dttm&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;ab&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2024-10-10 <span style="color: #949494;">14:42:40</span> 4 AMX B_STRPT… human AMX B_STRPT_PNMN </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2024-10-10 <span style="color: #949494;">14:42:47</span> 4 genta Escheri… human GEN B_[ORD]_ENTRBCTR</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2024-10-10 <span style="color: #949494;">14:42:47</span> 4 genta Escheri… human GEN B_[ORD]_ENTRBCTR</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2024-10-10 <span style="color: #949494;">14:42:48</span> 4 genta Escheri… cattle GEN B_ESCHR_COLI </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2024-10-10 <span style="color: #949494;">14:42:48</span> 4 genta Escheri… cattle GEN B_ESCHR_COLI </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2024-10-10 <span style="color: #949494;">14:42:40</span> 3 AMX B_STRPT… human AMX B_STRPT_PNMN </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2024-10-10 <span style="color: #949494;">14:42:47</span> 3 tobra Escheri… human TOB B_[ORD]_ENTRBCTR</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2024-10-10 <span style="color: #949494;">14:42:47</span> 3 tobra Escheri… human TOB B_[ORD]_ENTRBCTR</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2024-10-10 <span style="color: #949494;">14:42:48</span> 3 tobra Escheri… horses TOB B_ESCHR_COLI </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2024-10-10 <span style="color: #949494;">14:42:48</span> 3 tobra Escheri… horses TOB B_ESCHR_COLI </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2024-10-15 <span style="color: #949494;">15:35:01</span> 4 AMX B_STRPT… human AMX B_STRPT_PNMN </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2024-10-15 <span style="color: #949494;">15:35:08</span> 4 genta Escheri… human GEN B_[ORD]_ENTRBCTR</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2024-10-15 <span style="color: #949494;">15:35:09</span> 4 genta Escheri… human GEN B_[ORD]_ENTRBCTR</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2024-10-15 <span style="color: #949494;">15:35:09</span> 4 genta Escheri… cattle GEN B_ESCHR_COLI </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2024-10-15 <span style="color: #949494;">15:35:10</span> 4 genta Escheri… cattle GEN B_ESCHR_COLI </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2024-10-15 <span style="color: #949494;">15:35:01</span> 3 AMX B_STRPT… human AMX B_STRPT_PNMN </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2024-10-15 <span style="color: #949494;">15:35:08</span> 3 tobra Escheri… human TOB B_[ORD]_ENTRBCTR</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2024-10-15 <span style="color: #949494;">15:35:08</span> 3 tobra Escheri… human TOB B_[ORD]_ENTRBCTR</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2024-10-15 <span style="color: #949494;">15:35:09</span> 3 tobra Escheri… horses TOB B_ESCHR_COLI </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2024-10-15 <span style="color: #949494;">15:35:10</span> 3 tobra Escheri… horses TOB B_ESCHR_COLI </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 47 more rows</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 9 more variables: host &lt;chr&gt;, method &lt;chr&gt;, input &lt;dbl&gt;, outcome &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># notes &lt;chr&gt;, guideline &lt;chr&gt;, ref_table &lt;chr&gt;, uti &lt;lgl&gt;,</span></span>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -21,7 +21,7 @@ Use as.sir() to transform MICs or disks measurements to SIR values."><meta prope
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,7 +9,7 @@ This data set is carefully crafted, yet made 100% reproducible from public and a
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

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

View File

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

View File

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

View File

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

View File

@ -9,7 +9,7 @@ Especially the scale_*_mic() functions are relevant wrappers to plot MIC values
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

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

View File

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

View File

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

View File

@ -9,7 +9,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9094</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9095</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

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

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,6 @@
<url><loc>https://msberends.github.io/AMR/articles/WHONET.html</loc></url>
<url><loc>https://msberends.github.io/AMR/articles/datasets.html</loc></url>
<url><loc>https://msberends.github.io/AMR/articles/index.html</loc></url>
<url><loc>https://msberends.github.io/AMR/articles/other_pkg.html</loc></url>
<url><loc>https://msberends.github.io/AMR/articles/resistance_predict.html</loc></url>
<url><loc>https://msberends.github.io/AMR/articles/welcome_to_AMR.html</loc></url>
<url><loc>https://msberends.github.io/AMR/authors.html</loc></url>