1
0
mirror of https://github.com/msberends/AMR.git synced 2026-06-29 06:56:20 +02:00

Built site for AMR@3.0.1.9077: f7d3533

This commit is contained in:
github-actions
2026-06-26 19:49:26 +00:00
parent 108afaca6f
commit 169659837d
93 changed files with 368 additions and 239 deletions

View File

@@ -31,7 +31,7 @@
<a class="navbar-brand me-2" href="https://amr-for-r.org/index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -134,6 +134,26 @@ _pkgdown.yml # pkgdown website configuration</code></pre>
<code>ggplot_sir.R</code> / <code>ggplot_pca.R</code> / <code>plotting.R</code> — visualisation functions</li>
</ul></div>
<div class="section level2">
<h2 id="code-style">Code Style<a class="anchor" aria-label="anchor" href="#code-style"></a></h2>
<p>Follow the <a href="https://style.tidyverse.org/" class="external-link">tidyverse style guide</a> precisely. Key rules:</p>
<ul><li>2-space indentation; no tabs</li>
<li>
<code>&lt;-</code> for assignment, not <code>=</code>
</li>
<li>Spaces around all binary operators and after commas; no spaces inside parentheses</li>
<li>When a function call must break across lines, place the first argument on a new line indented by 2 spaces, and put the closing <code>)</code> on its own line — <strong>never align arguments to the opening parenthesis</strong> (no hanging/forced mid-line indentation)</li>
</ul><div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># good</span></span>
<span><span class="fu">stop_</span><span class="op">(</span></span>
<span> <span class="st">"some long message part one "</span>,</span>
<span> <span class="st">"part two"</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="co"># bad — forces indentation to match the opening parenthesis</span></span>
<span><span class="fu">stop_</span><span class="op">(</span><span class="st">"some long message part one "</span>,</span>
<span> <span class="st">"part two"</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="custom-s3-classes">Custom S3 Classes<a class="anchor" aria-label="anchor" href="#custom-s3-classes"></a></h2>
<p>The package defines five S3 classes with full print/format/plot/vctrs support:</p>
<table class="table"><thead><tr><th>Class</th>
@@ -181,7 +201,7 @@ _pkgdown.yml # pkgdown website configuration</code></pre>
<div class="section level2">
<h2 id="zero-dependency-design">Zero-Dependency Design<a class="anchor" aria-label="anchor" href="#zero-dependency-design"></a></h2>
<p>The package has <strong>no <code>Imports</code></strong> in <code>DESCRIPTION</code>. All optional integrations (ggplot2, dplyr, data.table, tidymodels, cli, crayon, etc.) are listed in <code>Suggests</code> and guarded with:</p>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/ns-load.html" class="external-link">requireNamespace</a></span><span class="op">(</span><span class="st">"pkg"</span>, quietly <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span> <span class="va">...</span> <span class="op">}</span></span></code></pre></div>
<p>Never add packages to <code>Imports</code>. If new functionality requires an external package, add it to <code>Suggests</code> and guard usage appropriately.</p>
</div>
@@ -222,18 +242,18 @@ _pkgdown.yml # pkgdown website configuration</code></pre>
<div class="section level4">
<h4 id="computing-the-correct-version-number">Computing the correct version number<a class="anchor" aria-label="anchor" href="#computing-the-correct-version-number"></a></h4>
<p><strong>First, ensure <code>git</code> and <code>gh</code> are installed</strong> — both are required for the version computation and for pushing changes. Install them if missing before doing anything else:</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="fu">which</span> git <span class="kw">||</span> <span class="ex">apt-get</span> install <span class="at">-y</span> git</span>
<span id="cb5-2"><a href="#cb5-2" tabindex="-1"></a><span class="fu">which</span> gh <span class="kw">||</span> <span class="ex">apt-get</span> install <span class="at">-y</span> gh</span>
<span id="cb5-3"><a href="#cb5-3" tabindex="-1"></a><span class="co"># Also ensure all tags are fetched so git describe works</span></span>
<span id="cb5-4"><a href="#cb5-4" tabindex="-1"></a><span class="fu">git</span> fetch <span class="at">--tags</span></span></code></pre></div>
<div class="sourceCode" id="cb6"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" tabindex="-1"></a><span class="fu">which</span> git <span class="kw">||</span> <span class="ex">apt-get</span> install <span class="at">-y</span> git</span>
<span id="cb6-2"><a href="#cb6-2" tabindex="-1"></a><span class="fu">which</span> gh <span class="kw">||</span> <span class="ex">apt-get</span> install <span class="at">-y</span> gh</span>
<span id="cb6-3"><a href="#cb6-3" tabindex="-1"></a><span class="co"># Also ensure all tags are fetched so git describe works</span></span>
<span id="cb6-4"><a href="#cb6-4" tabindex="-1"></a><span class="fu">git</span> fetch <span class="at">--tags</span></span></code></pre></div>
<p>Then run the following from the repo root to determine the version string to use:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" tabindex="-1"></a><span class="va">currenttag</span><span class="op">=</span><span class="va">$(</span><span class="fu">git</span> describe <span class="at">--tags</span> <span class="at">--abbrev</span><span class="op">=</span>0 <span class="kw">|</span> <span class="fu">sed</span> <span class="st">'s/v//'</span><span class="va">)</span></span>
<span id="cb6-2"><a href="#cb6-2" tabindex="-1"></a><span class="va">currenttagfull</span><span class="op">=</span><span class="va">$(</span><span class="fu">git</span> describe <span class="at">--tags</span> <span class="at">--abbrev</span><span class="op">=</span>0<span class="va">)</span></span>
<span id="cb6-3"><a href="#cb6-3" tabindex="-1"></a><span class="va">defaultbranch</span><span class="op">=</span><span class="va">$(</span><span class="fu">git</span> branch <span class="kw">|</span> <span class="fu">cut</span> <span class="at">-c</span> 3- <span class="kw">|</span> <span class="fu">grep</span> <span class="at">-E</span> <span class="st">'^master$|^main$'</span><span class="va">)</span></span>
<span id="cb6-4"><a href="#cb6-4" tabindex="-1"></a><span class="fu">git</span> fetch origin <span class="va">${defaultbranch}</span> <span class="at">--quiet</span></span>
<span id="cb6-5"><a href="#cb6-5" tabindex="-1"></a><span class="va">currentcommit</span><span class="op">=</span><span class="va">$(</span><span class="fu">git</span> rev-list <span class="at">--count</span> <span class="va">${currenttagfull}</span>..origin/<span class="va">${defaultbranch})</span></span>
<span id="cb6-6"><a href="#cb6-6" tabindex="-1"></a><span class="va">currentversion</span><span class="op">=</span><span class="st">"</span><span class="va">${currenttag}</span><span class="st">.</span><span class="va">$((currentcommit</span> <span class="op">+</span> <span class="dv">9001</span> <span class="op">+</span> <span class="dv">1</span><span class="va">))</span><span class="st">"</span></span>
<span id="cb6-7"><a href="#cb6-7" tabindex="-1"></a><span class="bu">echo</span> <span class="st">"</span><span class="va">$currentversion</span><span class="st">"</span></span></code></pre></div>
<div class="sourceCode" id="cb7"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" tabindex="-1"></a><span class="va">currenttag</span><span class="op">=</span><span class="va">$(</span><span class="fu">git</span> describe <span class="at">--tags</span> <span class="at">--abbrev</span><span class="op">=</span>0 <span class="kw">|</span> <span class="fu">sed</span> <span class="st">'s/v//'</span><span class="va">)</span></span>
<span id="cb7-2"><a href="#cb7-2" tabindex="-1"></a><span class="va">currenttagfull</span><span class="op">=</span><span class="va">$(</span><span class="fu">git</span> describe <span class="at">--tags</span> <span class="at">--abbrev</span><span class="op">=</span>0<span class="va">)</span></span>
<span id="cb7-3"><a href="#cb7-3" tabindex="-1"></a><span class="va">defaultbranch</span><span class="op">=</span><span class="va">$(</span><span class="fu">git</span> branch <span class="kw">|</span> <span class="fu">cut</span> <span class="at">-c</span> 3- <span class="kw">|</span> <span class="fu">grep</span> <span class="at">-E</span> <span class="st">'^master$|^main$'</span><span class="va">)</span></span>
<span id="cb7-4"><a href="#cb7-4" tabindex="-1"></a><span class="fu">git</span> fetch origin <span class="va">${defaultbranch}</span> <span class="at">--quiet</span></span>
<span id="cb7-5"><a href="#cb7-5" tabindex="-1"></a><span class="va">currentcommit</span><span class="op">=</span><span class="va">$(</span><span class="fu">git</span> rev-list <span class="at">--count</span> <span class="va">${currenttagfull}</span>..origin/<span class="va">${defaultbranch})</span></span>
<span id="cb7-6"><a href="#cb7-6" tabindex="-1"></a><span class="va">currentversion</span><span class="op">=</span><span class="st">"</span><span class="va">${currenttag}</span><span class="st">.</span><span class="va">$((currentcommit</span> <span class="op">+</span> <span class="dv">9001</span> <span class="op">+</span> <span class="dv">1</span><span class="va">))</span><span class="st">"</span></span>
<span id="cb7-7"><a href="#cb7-7" tabindex="-1"></a><span class="bu">echo</span> <span class="st">"</span><span class="va">$currentversion</span><span class="st">"</span></span></code></pre></div>
<p>The <code>+ 1</code> accounts for the fact that this PRs squash commit is not yet on the default branch. Set <strong>both</strong> of these files to the resulting version string (and only once per PR, even across multiple commits):</p>
<ol style="list-style-type: decimal"><li><p><strong><code>DESCRIPTION</code></strong> — the <code>Version:</code> field</p></li>
<li>

View File

@@ -90,6 +90,33 @@ R CMD check AMR
- `ggplot_sir.R` / `ggplot_pca.R` / `plotting.R` — visualisation
functions
## Code Style
Follow the [tidyverse style guide](https://style.tidyverse.org/)
precisely. Key rules:
- 2-space indentation; no tabs
- `<-` for assignment, not `=`
- Spaces around all binary operators and after commas; no spaces inside
parentheses
- When a function call must break across lines, place the first argument
on a new line indented by 2 spaces, and put the closing `)` on its own
line — **never align arguments to the opening parenthesis** (no
hanging/forced mid-line indentation)
``` r
# good
stop_(
"some long message part one ",
"part two"
)
# bad — forces indentation to match the opening parenthesis
stop_("some long message part one ",
"part two")
```
## Custom S3 Classes
The package defines five S3 classes with full print/format/plot/vctrs

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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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

@@ -30,7 +30,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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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

@@ -30,7 +30,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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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

@@ -30,7 +30,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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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

@@ -30,7 +30,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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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

@@ -30,7 +30,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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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

@@ -30,7 +30,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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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

@@ -30,7 +30,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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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

@@ -30,7 +30,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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -441,7 +441,7 @@ column names:<br><em>ab</em>, <em>cid</em>, <em>name</em>, <em>group</em>, <em>a
<em>iv_ddd</em>, <em>iv_units</em>, and <em>loinc</em>.</p>
<p>This data set is in R available as <code>antimicrobials</code>, after
you load the <code>AMR</code> package.</p>
<p>It was last updated on 23 June 2026 12:38:59 UTC. Find more info
<p>It was last updated on 26 June 2026 19:40:11 UTC. Find more info
about the contents, (scientific) source, and structure of this <a href="https://amr-for-r.org/reference/antimicrobials.html">data set
here</a>.</p>
<p><strong>Direct download links:</strong></p>

View File

@@ -100,7 +100,7 @@ names:
This data set is in R available as `antimicrobials`, after you load the
`AMR` package.
It was last updated on 23 June 2026 12:38:59 UTC. Find more info about
It was last updated on 26 June 2026 19:40:11 UTC. Find more info about
the contents, (scientific) source, and structure of this [data set
here](https://amr-for-r.org/reference/antimicrobials.html).

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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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

@@ -33,7 +33,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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -113,7 +113,7 @@
</h2>
<p>The <code>AMR</code> package is a peer-reviewed, <a href="#copyright">free and open-source</a> R package with <a href="https://en.wikipedia.org/wiki/Dependency_hell" class="external-link">zero dependencies</a> to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. <strong>Our aim is to provide a standard</strong> for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. We are a team of <a href="./authors.html">many different researchers</a> from around the globe to make this a successful and durable project!</p>
<p>This work was published in the Journal of Statistical Software (Volume 104(3); <a href="https://doi.org/10.18637/jss.v104.i03" class="external-link">DOI 10.18637/jss.v104.i03</a>) and formed the basis of two PhD theses (<a href="https://doi.org/10.33612/diss.177417131" class="external-link">DOI 10.33612/diss.177417131</a> and <a href="https://doi.org/10.33612/diss.192486375" class="external-link">DOI 10.33612/diss.192486375</a>).</p>
<p>After installing this package, R knows <a href="./reference/microorganisms.html"><strong>~97 000 distinct microbial species</strong></a> (updated May 2026) and all <a href="./reference/antimicrobials.html"><strong>~620 antimicrobial and antiviral drugs</strong></a> by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl" class="external-link">University of Groningen</a> and the <a href="https://www.umcg.nl" class="external-link">University Medical Center Groningen</a>.</p>
<p>After installing this package, R knows <a href="./reference/microorganisms.html"><strong>~97 000 distinct microbial species</strong></a> (updated mei 2026) and all <a href="./reference/antimicrobials.html"><strong>~620 antimicrobial and antiviral drugs</strong></a> by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl" class="external-link">University of Groningen</a> and the <a href="https://www.umcg.nl" class="external-link">University Medical Center Groningen</a>.</p>
<div class="section level3">
<h3 id="used-in-over-175-countries-available-in-28-languages">Used in over 175 countries, available in 28 languages<a class="anchor" aria-label="anchor" href="#used-in-over-175-countries-available-in-28-languages"></a>
</h3>
@@ -146,11 +146,13 @@
<span><span class="co">#&gt; Using column mo as input for `mo_fullname()`</span></span>
<span><span class="co">#&gt; Using column mo as input for `mo_is_gram_negative()`</span></span>
<span><span class="co">#&gt; Using column mo as input for `mo_is_intrinsic_resistant()`</span></span>
<span><span class="co">#&gt; Determining intrinsic resistance based on 'EUCAST Expected Resistant</span></span>
<span><span class="co">#&gt; Phenotypes' v1.2 (2023). This note will be shown once per session.</span></span>
<span><span class="co">#&gt; For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK</span></span>
<span><span class="co">#&gt; (amikacin), and KAN (kanamycin)</span></span>
<span><span class="co">#&gt; For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)</span></span>
<span><span class="co">#&gt; Determining intrinsic resistance based on 'EUCAST Expected</span></span>
<span><span class="co">#&gt; Resistant Phenotypes' v1.2 (2023). This note will be shown</span></span>
<span><span class="co">#&gt; once per session.</span></span>
<span><span class="co">#&gt; For `aminoglycosides()` using columns GEN (gentamicin), TOB</span></span>
<span><span class="co">#&gt; (tobramycin), AMK (amikacin), and KAN (kanamycin)</span></span>
<span><span class="co">#&gt; For `carbapenems()` using columns IPM (imipenem) and MEM</span></span>
<span><span class="co">#&gt; (meropenem)</span></span>
<span><span class="co">#&gt; # A tibble: 35 × 7</span></span>
<span><span class="co">#&gt; bacteria GEN TOB AMK KAN IPM MEM </span></span>
<span><span class="co">#&gt; &lt;chr&gt; &lt;sir&gt; &lt;sir&gt; &lt;sir&gt; &lt;sir&gt; &lt;sir&gt; &lt;sir&gt;</span></span>
@@ -179,9 +181,9 @@
<span><span class="co">#&gt; Warning: invalid microorganism code, NA generated</span></span></code></pre></div>
<table class="table">
<colgroup>
<col width="33%">
<col width="33%">
<col width="33%">
<col width="24%">
<col width="37%">
<col width="37%">
</colgroup>
<thead><tr>
<th align="left">Piperacillin/tazobactam</th>
@@ -189,9 +191,9 @@
<th align="left">Piperacillin/tazobactam + Tobramycin</th>
</tr></thead>
<tbody><tr>
<td align="left">69.9% (64.7-75.2%)</td>
<td align="left">93.7% (92.2-95.1%)</td>
<td align="left">89.8% (86.8-92.3%)</td>
<td align="left">70% (64.7-75.2%)</td>
<td align="left">93.6% (92.2-95.1%)</td>
<td align="left">89.8% (87-92.5%)</td>
</tr></tbody>
</table>
<p>WISCA supports stratification by any clinical variable, so you can generate syndrome-specific or ward-specific coverage estimates:</p>
@@ -203,10 +205,10 @@
<span><span class="co">#&gt; Warning: invalid microorganism code, NA generated</span></span></code></pre></div>
<table class="table">
<colgroup>
<col width="25%">
<col width="25%">
<col width="25%">
<col width="25%">
<col width="14%">
<col width="21%">
<col width="32%">
<col width="32%">
</colgroup>
<thead><tr>
<th align="left">Syndromic Group</th>
@@ -217,21 +219,21 @@
<tbody>
<tr>
<td align="left">Clinical</td>
<td align="left">74.6% (69-80.1%)</td>
<td align="left">93.6% (91.9-95.1%)</td>
<td align="left">90.5% (86.9-93%)</td>
<td align="left">74.6% (68.6-80.6%)</td>
<td align="left">93.7% (92.1-95.1%)</td>
<td align="left">90.4% (87-93.1%)</td>
</tr>
<tr>
<td align="left">ICU</td>
<td align="left">57% (48.7-65.8%)</td>
<td align="left">86.7% (83.7-89.7%)</td>
<td align="left">82.8% (77.9-87.2%)</td>
<td align="left">57% (48.6-65.7%)</td>
<td align="left">86.8% (83.6-89.8%)</td>
<td align="left">82.9% (78.1-87.3%)</td>
</tr>
<tr>
<td align="left">Outpatient</td>
<td align="left">57.5% (46.5-68.7%)</td>
<td align="left">76.7% (70.6-82.4%)</td>
<td align="left">67.5% (57.2-76.7%)</td>
<td align="left">56.9% (45.9-68.2%)</td>
<td align="left">76.7% (70.6-82.3%)</td>
<td align="left">68% (57.6-77.2%)</td>
</tr>
</tbody>
</table>
@@ -240,14 +242,15 @@
<code class="sourceCode R"><span><span class="fu"><a href="reference/antibiogram.html">antibiogram</a></span><span class="op">(</span><span class="va">example_isolates</span>,</span>
<span> mo_transform <span class="op">=</span> <span class="st">"gramstain"</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"AMC"</span>, <span class="fu"><a href="reference/antimicrobial_selectors.html">carbapenems</a></span><span class="op">(</span><span class="op">)</span>, <span class="st">"TZP"</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="co">#&gt; For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)</span></span></code></pre></div>
<span><span class="co">#&gt; For `carbapenems()` using columns IPM (imipenem) and MEM</span></span>
<span><span class="co">#&gt; (meropenem)</span></span></code></pre></div>
<table class="table">
<colgroup>
<col width="20%">
<col width="20%">
<col width="20%">
<col width="20%">
<col width="20%">
<col width="13%">
<col width="25%">
<col width="18%">
<col width="19%">
<col width="22%">
</colgroup>
<thead><tr>
<th align="left">Pathogen</th>
@@ -280,10 +283,10 @@
<span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"TZP"</span>, <span class="st">"TZP+TOB"</span>, <span class="st">"TZP+GEN"</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
<table class="table">
<colgroup>
<col width="25%">
<col width="25%">
<col width="25%">
<col width="25%">
<col width="12%">
<col width="21%">
<col width="32%">
<col width="32%">
</colgroup>
<thead><tr>
<th align="left">Pathogen</th>
@@ -388,9 +391,10 @@
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/across.html" class="external-link">across</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="va">GEN</span>, <span class="va">TOB</span><span class="op">)</span>,</span>
<span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>total_R <span class="op">=</span> <span class="va">resistance</span>,</span>
<span> conf_int <span class="op">=</span> <span class="kw">function</span><span class="op">(</span><span class="va">x</span><span class="op">)</span> <span class="fu"><a href="reference/proportion.html">sir_confidence_interval</a></span><span class="op">(</span><span class="va">x</span>, collapse <span class="op">=</span> <span class="st">"-"</span><span class="op">)</span><span class="op">)</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="co">#&gt; `resistance()` assumes the EUCAST guideline and thus considers the 'I'</span></span>
<span><span class="co">#&gt; category susceptible. Set the `guideline` argument or the `AMR_guideline`</span></span>
<span><span class="co">#&gt; option to either "CLSI" or "EUCAST", see `?AMR-options`.</span></span>
<span><span class="co">#&gt; `resistance()` assumes the EUCAST guideline and thus</span></span>
<span><span class="co">#&gt; considers the 'I' category susceptible. Set the `guideline`</span></span>
<span><span class="co">#&gt; argument or the `AMR_guideline` option to either "CLSI" or</span></span>
<span><span class="co">#&gt; "EUCAST", see `?AMR-options`.</span></span>
<span><span class="co">#&gt; This message will be shown once per session.</span></span>
<span><span class="co">#&gt; # A tibble: 3 × 5</span></span>
<span><span class="co">#&gt; ward GEN_total_R GEN_conf_int TOB_total_R TOB_conf_int</span></span>
@@ -409,15 +413,16 @@
<span> <span class="co"># calculate AMR using resistance(), over all aminoglycosides and polymyxins:</span></span>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/across.html" class="external-link">across</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="reference/antimicrobial_selectors.html">aminoglycosides</a></span><span class="op">(</span><span class="op">)</span>, <span class="fu"><a href="reference/antimicrobial_selectors.html">polymyxins</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span>,</span>
<span> <span class="va">resistance</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="co">#&gt; For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK</span></span>
<span><span class="co">#&gt; (amikacin), and KAN (kanamycin)</span></span>
<span><span class="co">#&gt; For `aminoglycosides()` using columns GEN (gentamicin), TOB</span></span>
<span><span class="co">#&gt; (tobramycin), AMK (amikacin), and KAN (kanamycin)</span></span>
<span><span class="co">#&gt; For `polymyxins()` using column COL (colistin)</span></span>
<span><span class="co">#&gt; Warning: There was 1 warning in `summarise()`.</span></span>
<span><span class="co">#&gt; In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`.</span></span>
<span><span class="co">#&gt; In argument: `across(c(aminoglycosides(), polymyxins()),</span></span>
<span><span class="co">#&gt; resistance)`.</span></span>
<span><span class="co">#&gt; In group 3: `ward = "Outpatient"`.</span></span>
<span><span class="co">#&gt; Caused by warning:</span></span>
<span><span class="co">#&gt; ! Introducing NA: only 23 results available for KAN in group: ward = "Outpatient"</span></span>
<span><span class="co">#&gt; (whilst `minimum = 30`).</span></span>
<span><span class="co">#&gt; ! Introducing NA: only 23 results available for KAN in group:</span></span>
<span><span class="co">#&gt; ward = "Outpatient" (whilst `minimum = 30`).</span></span>
<span><span class="va">out</span></span>
<span><span class="co">#&gt; # A tibble: 3 × 6</span></span>
<span><span class="co">#&gt; ward GEN TOB AMK KAN COL</span></span>

View File

@@ -52,7 +52,7 @@ formed the basis of two PhD theses ([DOI
After installing this package, R knows [**~97 000 distinct microbial
species**](https://amr-for-r.org/reference/microorganisms.md) (updated
May 2026) and all [**~620 antimicrobial and antiviral
mei 2026) and all [**~620 antimicrobial and antiviral
drugs**](https://amr-for-r.org/reference/antimicrobials.md) by name and
code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED
CT), and knows all about valid SIR and MIC values. The integral clinical
@@ -118,11 +118,13 @@ example_isolates %>%
#> Using column mo as input for `mo_fullname()`
#> Using column mo as input for `mo_is_gram_negative()`
#> Using column mo as input for `mo_is_intrinsic_resistant()`
#> Determining intrinsic resistance based on 'EUCAST Expected Resistant
#> Phenotypes' v1.2 (2023). This note will be shown once per session.
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
#> (amikacin), and KAN (kanamycin)
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
#> Determining intrinsic resistance based on 'EUCAST Expected
#> Resistant Phenotypes' v1.2 (2023). This note will be shown
#> once per session.
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB
#> (tobramycin), AMK (amikacin), and KAN (kanamycin)
#> For `carbapenems()` using columns IPM (imipenem) and MEM
#> (meropenem)
#> # A tibble: 35 × 7
#> bacteria GEN TOB AMK KAN IPM MEM
#> <chr> <sir> <sir> <sir> <sir> <sir> <sir>
@@ -181,7 +183,7 @@ wisca(example_isolates,
| Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|
| 69.9% (64.7-75.2%) | 93.7% (92.2-95.1%) | 89.8% (86.8-92.3%) |
| 70% (64.7-75.2%) | 93.6% (92.2-95.1%) | 89.8% (87-92.5%) |
WISCA supports stratification by any clinical variable, so you can
generate syndrome-specific or ward-specific coverage estimates:
@@ -197,9 +199,9 @@ wisca(example_isolates,
| Syndromic Group | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|:---|
| Clinical | 74.6% (69-80.1%) | 93.6% (91.9-95.1%) | 90.5% (86.9-93%) |
| ICU | 57% (48.7-65.8%) | 86.7% (83.7-89.7%) | 82.8% (77.9-87.2%) |
| Outpatient | 57.5% (46.5-68.7%) | 76.7% (70.6-82.4%) | 67.5% (57.2-76.7%) |
| Clinical | 74.6% (68.6-80.6%) | 93.7% (92.1-95.1%) | 90.4% (87-93.1%) |
| ICU | 57% (48.6-65.7%) | 86.8% (83.6-89.8%) | 82.9% (78.1-87.3%) |
| Outpatient | 56.9% (45.9-68.2%) | 76.7% (70.6-82.3%) | 68% (57.6-77.2%) |
**For AMR surveillance**, traditional antibiograms remain the right tool
for tracking resistance per species over time:
@@ -209,7 +211,8 @@ for tracking resistance per species over time:
antibiogram(example_isolates,
mo_transform = "gramstain",
antimicrobials = c("AMC", carbapenems(), "TZP"))
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
#> For `carbapenems()` using columns IPM (imipenem) and MEM
#> (meropenem)
```
| Pathogen | Amoxicillin/clavulanic acid | Imipenem | Meropenem | Piperacillin/tazobactam |
@@ -307,9 +310,10 @@ example_isolates %>%
summarise(across(c(GEN, TOB),
list(total_R = resistance,
conf_int = function(x) sir_confidence_interval(x, collapse = "-"))))
#> `resistance()` assumes the EUCAST guideline and thus considers the 'I'
#> category susceptible. Set the `guideline` argument or the `AMR_guideline`
#> option to either "CLSI" or "EUCAST", see `?AMR-options`.
#> `resistance()` assumes the EUCAST guideline and thus
#> considers the 'I' category susceptible. Set the `guideline`
#> argument or the `AMR_guideline` option to either "CLSI" or
#> "EUCAST", see `?AMR-options`.
#> This message will be shown once per session.
#> # A tibble: 3 × 5
#> ward GEN_total_R GEN_conf_int TOB_total_R TOB_conf_int
@@ -334,15 +338,16 @@ out <- example_isolates %>%
# calculate AMR using resistance(), over all aminoglycosides and polymyxins:
summarise(across(c(aminoglycosides(), polymyxins()),
resistance))
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
#> (amikacin), and KAN (kanamycin)
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB
#> (tobramycin), AMK (amikacin), and KAN (kanamycin)
#> For `polymyxins()` using column COL (colistin)
#> Warning: There was 1 warning in `summarise()`.
#> In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`.
#> In argument: `across(c(aminoglycosides(), polymyxins()),
#> resistance)`.
#> In group 3: `ward = "Outpatient"`.
#> Caused by warning:
#> ! Introducing NA: only 23 results available for KAN in group: ward = "Outpatient"
#> (whilst `minimum = 30`).
#> ! Introducing NA: only 23 results available for KAN in group:
#> ward = "Outpatient" (whilst `minimum = 30`).
out
#> # A tibble: 3 × 6
#> ward GEN TOB AMK KAN COL

View File

@@ -52,7 +52,7 @@ formed the basis of two PhD theses ([DOI
After installing this package, R knows [**~97 000 distinct microbial
species**](https://amr-for-r.org/reference/microorganisms.md) (updated
May 2026) and all [**~620 antimicrobial and antiviral
mei 2026) and all [**~620 antimicrobial and antiviral
drugs**](https://amr-for-r.org/reference/antimicrobials.md) by name and
code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED
CT), and knows all about valid SIR and MIC values. The integral clinical
@@ -118,11 +118,13 @@ example_isolates %>%
#> Using column mo as input for `mo_fullname()`
#> Using column mo as input for `mo_is_gram_negative()`
#> Using column mo as input for `mo_is_intrinsic_resistant()`
#> Determining intrinsic resistance based on 'EUCAST Expected Resistant
#> Phenotypes' v1.2 (2023). This note will be shown once per session.
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
#> (amikacin), and KAN (kanamycin)
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
#> Determining intrinsic resistance based on 'EUCAST Expected
#> Resistant Phenotypes' v1.2 (2023). This note will be shown
#> once per session.
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB
#> (tobramycin), AMK (amikacin), and KAN (kanamycin)
#> For `carbapenems()` using columns IPM (imipenem) and MEM
#> (meropenem)
#> # A tibble: 35 × 7
#> bacteria GEN TOB AMK KAN IPM MEM
#> <chr> <sir> <sir> <sir> <sir> <sir> <sir>
@@ -181,7 +183,7 @@ wisca(example_isolates,
| Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|
| 69.9% (64.7-75.2%) | 93.7% (92.2-95.1%) | 89.8% (86.8-92.3%) |
| 70% (64.7-75.2%) | 93.6% (92.2-95.1%) | 89.8% (87-92.5%) |
WISCA supports stratification by any clinical variable, so you can
generate syndrome-specific or ward-specific coverage estimates:
@@ -197,9 +199,9 @@ wisca(example_isolates,
| Syndromic Group | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|:---|
| Clinical | 74.6% (69-80.1%) | 93.6% (91.9-95.1%) | 90.5% (86.9-93%) |
| ICU | 57% (48.7-65.8%) | 86.7% (83.7-89.7%) | 82.8% (77.9-87.2%) |
| Outpatient | 57.5% (46.5-68.7%) | 76.7% (70.6-82.4%) | 67.5% (57.2-76.7%) |
| Clinical | 74.6% (68.6-80.6%) | 93.7% (92.1-95.1%) | 90.4% (87-93.1%) |
| ICU | 57% (48.6-65.7%) | 86.8% (83.6-89.8%) | 82.9% (78.1-87.3%) |
| Outpatient | 56.9% (45.9-68.2%) | 76.7% (70.6-82.3%) | 68% (57.6-77.2%) |
**For AMR surveillance**, traditional antibiograms remain the right tool
for tracking resistance per species over time:
@@ -209,7 +211,8 @@ for tracking resistance per species over time:
antibiogram(example_isolates,
mo_transform = "gramstain",
antimicrobials = c("AMC", carbapenems(), "TZP"))
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
#> For `carbapenems()` using columns IPM (imipenem) and MEM
#> (meropenem)
```
| Pathogen | Amoxicillin/clavulanic acid | Imipenem | Meropenem | Piperacillin/tazobactam |
@@ -307,9 +310,10 @@ example_isolates %>%
summarise(across(c(GEN, TOB),
list(total_R = resistance,
conf_int = function(x) sir_confidence_interval(x, collapse = "-"))))
#> `resistance()` assumes the EUCAST guideline and thus considers the 'I'
#> category susceptible. Set the `guideline` argument or the `AMR_guideline`
#> option to either "CLSI" or "EUCAST", see `?AMR-options`.
#> `resistance()` assumes the EUCAST guideline and thus
#> considers the 'I' category susceptible. Set the `guideline`
#> argument or the `AMR_guideline` option to either "CLSI" or
#> "EUCAST", see `?AMR-options`.
#> This message will be shown once per session.
#> # A tibble: 3 × 5
#> ward GEN_total_R GEN_conf_int TOB_total_R TOB_conf_int
@@ -334,15 +338,16 @@ out <- example_isolates %>%
# calculate AMR using resistance(), over all aminoglycosides and polymyxins:
summarise(across(c(aminoglycosides(), polymyxins()),
resistance))
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
#> (amikacin), and KAN (kanamycin)
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB
#> (tobramycin), AMK (amikacin), and KAN (kanamycin)
#> For `polymyxins()` using column COL (colistin)
#> Warning: There was 1 warning in `summarise()`.
#> In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`.
#> In argument: `across(c(aminoglycosides(), polymyxins()),
#> resistance)`.
#> In group 3: `ward = "Outpatient"`.
#> Caused by warning:
#> ! Introducing NA: only 23 results available for KAN in group: ward = "Outpatient"
#> (whilst `minimum = 30`).
#> ! Introducing NA: only 23 results available for KAN in group:
#> ward = "Outpatient" (whilst `minimum = 30`).
out
#> # A tibble: 3 × 6
#> ward GEN TOB AMK KAN COL

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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -49,15 +49,15 @@
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="3.0.1.9076" id="amr-3019076">AMR 3.0.1.9076<a class="anchor" aria-label="anchor" href="#amr-3019076"></a></h2>
<h2 class="pkg-version" data-toc-text="3.0.1.9077" id="amr-3019077">AMR 3.0.1.9077<a class="anchor" aria-label="anchor" href="#amr-3019077"></a></h2>
<p>Planned as v3.1.0, end of June 2026.</p>
<div class="section level4">
<h4 id="breaking-changes-3-0-1-9076">Breaking Changes<a class="anchor" aria-label="anchor" href="#breaking-changes-3-0-1-9076"></a></h4>
<h4 id="breaking-changes-3-0-1-9077">Breaking Changes<a class="anchor" aria-label="anchor" href="#breaking-changes-3-0-1-9077"></a></h4>
<ul><li>The former <em>kingdoms</em> Bacteria and Archaea are now each divided into four kingdoms with new top-level <em>domains</em> Bacteria and Archaea (Göker and Oren, 2024, DOI: 10.1099/ijsem.0.006242). Following this, a new <code>domain</code> column in the <code>microorganisms</code> data set was added, and more importantly, <code><a href="../reference/mo_property.html">mo_kingdom()</a></code> now returns the formal kingdom (e.g. <code>"Pseudomonadati"</code> instead of <code>"Bacteria"</code>). Use <code><a href="../reference/mo_property.html">mo_domain()</a></code> for the old behaviour. For non-prokaryotic kingdoms (Fungi, Protozoa, etc.), <code>kingdom</code> and <code>domain</code> are identical.</li>
<li>Faster parallel computing via the <code>future</code> package for <code><a href="../reference/as.sir.html">as.sir()</a></code> and <code><a href="../reference/antibiogram.html">wisca()</a></code>: a non-sequential plan (e.g. <code>future::plan(future::multisession)</code>) must be active before using <code>parallel = TRUE</code>.</li>
</ul></div>
<div class="section level4">
<h4 id="new-3-0-1-9076">New<a class="anchor" aria-label="anchor" href="#new-3-0-1-9076"></a></h4>
<h4 id="new-3-0-1-9077">New<a class="anchor" aria-label="anchor" href="#new-3-0-1-9077"></a></h4>
<ul><li>EUCAST 2026 and CLSI 2026 breakpoints: over 5,700 new breakpoints added to the <code>clinical_breakpoints</code> data set; EUCAST 2026 is now the default for all MIC and disk diffusion interpretations</li>
<li>Wildtype/Non-wildtype (WT/NWT) output when using ECOFF-based interpretation, by setting <code>breakpoint_type = "ECOFF"</code> in <code><a href="../reference/as.sir.html">as.sir()</a></code>; WT/NWT results are fully supported in all resistance/susceptibility functions and plots (<a href="https://github.com/msberends/AMR/issues/254" class="external-link">#254</a>)</li>
<li>
@@ -74,7 +74,7 @@
<li>New <code><a href="../reference/antibiogram.html">wisca_plot()</a></code> to assess the susceptibility and incidence distributions from the Monte Carlo simulations</li>
</ul></div>
<div class="section level4">
<h4 id="fixed-3-0-1-9076">Fixed<a class="anchor" aria-label="anchor" href="#fixed-3-0-1-9076"></a></h4>
<h4 id="fixed-3-0-1-9077">Fixed<a class="anchor" aria-label="anchor" href="#fixed-3-0-1-9077"></a></h4>
<ul><li>
<code><a href="../reference/as.sir.html">as.sir()</a></code>
<ul><li>On data frames: already-converted SIR columns no longer dropped on re-run (<a href="https://github.com/msberends/AMR/issues/278" class="external-link">#278</a>)</li>
@@ -101,8 +101,10 @@
</li>
</ul></div>
<div class="section level4">
<h4 id="updated-3-0-1-9076">Updated<a class="anchor" aria-label="anchor" href="#updated-3-0-1-9076"></a></h4>
<ul><li>Taxonomic update for all microorganisms, now updated to June 2026</li>
<h4 id="updated-3-0-1-9077">Updated<a class="anchor" aria-label="anchor" href="#updated-3-0-1-9077"></a></h4>
<ul><li>
<code><a href="../reference/top_n_microorganisms.html">top_n_microorganisms()</a></code>: new <code>property_for_each</code> argument for sub-grouping within top <em>n</em> groups; rank ordering enforced (only lower taxonomic ranks allowed); fixed <code>property = NULL</code> not being accepted; inner filter now tracks original row indices to prevent cross-group contamination</li>
<li>Taxonomic update for all microorganisms, now updated to June 2026</li>
<li>
<code><a href="../reference/mo_property.html">mo_kingdom()</a></code> now returns the formal taxonomic kingdom; a one-time note per session explains the change when querying bacterial or archaeal records.</li>
<li>

View File

@@ -1,6 +1,6 @@
# Changelog
## AMR 3.0.1.9076
## AMR 3.0.1.9077
Planned as v3.1.0, end of June 2026.
@@ -125,6 +125,11 @@ Planned as v3.1.0, end of June 2026.
#### Updated
- [`top_n_microorganisms()`](https://amr-for-r.org/reference/top_n_microorganisms.md):
new `property_for_each` argument for sub-grouping within top *n*
groups; rank ordering enforced (only lower taxonomic ranks allowed);
fixed `property = NULL` not being accepted; inner filter now tracks
original row indices to prevent cross-group contamination
- Taxonomic update for all microorganisms, now updated to June 2026
- [`mo_kingdom()`](https://amr-for-r.org/reference/mo_property.md) now
returns the formal taxonomic kingdom; a one-time note per session

View File

@@ -10,7 +10,7 @@ articles:
PCA: PCA.html
WHONET: WHONET.html
WISCA: WISCA.html
last_built: 2026-06-26T13:07Z
last_built: 2026-06-26T19:42Z
urls:
reference: https://amr-for-r.org/reference
article: https://amr-for-r.org/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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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 @@ options(AMR_guideline = "CLSI")'><meta property="og:image" content="https://amr-
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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

@@ -5,14 +5,14 @@ This work was published in the Journal of Statistical Software (Volume 104(3); d
) and formed the basis of two PhD theses (doi:10.33612/diss.177417131
and doi:10.33612/diss.192486375
).
After installing this package, R knows ~97 000 distinct microbial species (updated May 2026) and all ~620 antimicrobial and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen and the University Medical Center Groningen.
After installing this package, R knows ~97 000 distinct microbial species (updated mei 2026) and all ~620 antimicrobial and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen and the University Medical Center Groningen.
The AMR package is available in English, Arabic, Bengali, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Hindi, Indonesian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swahili, Swedish, Turkish, Ukrainian, Urdu, and Vietnamese. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages."><meta property="og:description" content="Welcome to the AMR package.
The AMR package is a peer-reviewed, free and open-source R package with zero dependencies to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. Our aim is to provide a standard for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. We are a team of many different researchers from around the globe to make this a successful and durable project!
This work was published in the Journal of Statistical Software (Volume 104(3); doi:10.18637/jss.v104.i03
) and formed the basis of two PhD theses (doi:10.33612/diss.177417131
and doi:10.33612/diss.192486375
).
After installing this package, R knows ~97 000 distinct microbial species (updated May 2026) and all ~620 antimicrobial and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen and the University Medical Center Groningen.
After installing this package, R knows ~97 000 distinct microbial species (updated mei 2026) and all ~620 antimicrobial and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen and the University Medical Center Groningen.
The AMR package is available in English, Arabic, Bengali, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Hindi, Indonesian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swahili, Swedish, Turkish, Ukrainian, Urdu, and Vietnamese. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js" integrity="sha384-7zkQWkzuo3B5mTepMUcHkMB5jZaolc2xDwL6VFqjFALcbeS9Ggm/Yr2r3Dy4lfFg" crossorigin="anonymous"></script><script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/contrib/auto-render.min.js" integrity="sha384-43gviWU0YVjaDtb/GhzOouOXtZMP/7XUzwPTstBeZFe/+rCMvRwr4yROQP43s0Xk" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -21,7 +21,7 @@ The AMR package is available in English, Arabic, Bengali, Chinese, Czech, Danish
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -70,7 +70,7 @@ The AMR package is available in English, Arabic, Bengali, Chinese, Czech, Danish
) and formed the basis of two PhD theses (<a href="https://doi.org/10.33612/diss.177417131" class="external-link">doi:10.33612/diss.177417131</a>
and <a href="https://doi.org/10.33612/diss.192486375" class="external-link">doi:10.33612/diss.192486375</a>
).</p>
<p>After installing this package, R knows <a href="https://amr-for-r.org/reference/microorganisms.html"><strong>~97 000 distinct microbial species</strong></a> (updated May 2026) and all <a href="https://amr-for-r.org/reference/antimicrobials.html"><strong>~620 antimicrobial and antiviral drugs</strong></a> by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl" class="external-link">University of Groningen</a> and the <a href="https://www.umcg.nl" class="external-link">University Medical Center Groningen</a>.</p>
<p>After installing this package, R knows <a href="https://amr-for-r.org/reference/microorganisms.html"><strong>~97 000 distinct microbial species</strong></a> (updated mei 2026) and all <a href="https://amr-for-r.org/reference/antimicrobials.html"><strong>~620 antimicrobial and antiviral drugs</strong></a> by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl" class="external-link">University of Groningen</a> and the <a href="https://www.umcg.nl" class="external-link">University Medical Center Groningen</a>.</p>
<p>The <code>AMR</code> package is available in English, Arabic, Bengali, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Hindi, Indonesian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swahili, Swedish, Turkish, Ukrainian, Urdu, and Vietnamese. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.</p>
</div>

View File

@@ -25,7 +25,7 @@ and
After installing this package, R knows [**~97 000 distinct microbial
species**](https://amr-for-r.org/reference/microorganisms.html) (updated
May 2026) and all [**~620 antimicrobial and antiviral
mei 2026) and all [**~620 antimicrobial and antiviral
drugs**](https://amr-for-r.org/reference/antimicrobials.html) by name
and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED
CT), and knows all about valid SIR and MIC values. The integral clinical

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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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

@@ -13,7 +13,7 @@ All antibiogram types adhere to previously described approaches (see Source), an
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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

@@ -17,7 +17,7 @@ my_data_with_all_these_columns %&amp;gt;%
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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 @@ The antibiotics data set has been renamed to antimicrobials. The old name will b
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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 @@ Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026,
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -462,10 +462,10 @@ Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026,
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 4 × 18</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> datetime index method ab_given mo_given host_given input_given</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dttm&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;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>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2026-06-26 <span style="color: #949494;">13:09:56</span> 1 MIC amoxicillin Escherich… human 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2026-06-26 <span style="color: #949494;">13:09:56</span> 1 MIC cipro Escherich… human 0.256 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2026-06-26 <span style="color: #949494;">13:09:56</span> 1 DISK tobra Escherich… human 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> 2026-06-26 <span style="color: #949494;">13:09:56</span> 1 DISK genta Escherich… human 18 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2026-06-26 <span style="color: #949494;">19:45:06</span> 1 MIC amoxicillin Escherich… human 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2026-06-26 <span style="color: #949494;">19:45:07</span> 1 MIC cipro Escherich… human 0.256 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2026-06-26 <span style="color: #949494;">19:45:07</span> 1 DISK tobra Escherich… human 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> 2026-06-26 <span style="color: #949494;">19:45:07</span> 1 DISK genta Escherich… human 18 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 11 more variables: ab &lt;ab&gt;, mo &lt;mo&gt;, host &lt;chr&gt;, input &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># outcome &lt;sir&gt;, notes &lt;chr&gt;, guideline &lt;chr&gt;, ref_table &lt;chr&gt;, uti &lt;lgl&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># breakpoint_S_R &lt;chr&gt;, site &lt;chr&gt;</span></span>

View File

@@ -712,10 +712,10 @@ sir_interpretation_history()
#> # A tibble: 4 × 18
#> datetime index method ab_given mo_given host_given input_given
#> <dttm> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 2026-06-26 13:09:56 1 MIC amoxicillin Escherich… human 8
#> 2 2026-06-26 13:09:56 1 MIC cipro Escherich… human 0.256
#> 3 2026-06-26 13:09:56 1 DISK tobra Escherich… human 16
#> 4 2026-06-26 13:09:56 1 DISK genta Escherich… human 18
#> 1 2026-06-26 19:45:06 1 MIC amoxicillin Escherich… human 8
#> 2 2026-06-26 19:45:07 1 MIC cipro Escherich… human 0.256
#> 3 2026-06-26 19:45:07 1 DISK tobra Escherich… human 16
#> 4 2026-06-26 19:45:07 1 DISK genta Escherich… human 18
#> # 11 more variables: ab <ab>, mo <mo>, host <chr>, input <chr>,
#> # outcome <sir>, notes <chr>, guideline <chr>, ref_table <chr>, uti <lgl>,
#> # breakpoint_S_R <chr>, site <chr>

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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -125,7 +125,7 @@
<dt>stdres</dt>
<dd><p>standardized residuals,
<code>(observed - expected) / sqrt(V)</code>, where <code>V</code> is the
residual cell variance (Agresti, 2007, section 2.4.5
residual cell variance (<a href="#reference+chisq.test.Rd+R+3AAgresti+3A2007" class="citation">Agresti 2007</a>, section 2.4.5)
for the case where <code>x</code> is a matrix, <code>n * p * (1 - p)</code> otherwise).</p></dd>
</dl></div>

View File

@@ -93,8 +93,9 @@ A list with class `"htest"` containing the following components:
- stdres:
standardized residuals, `(observed - expected) / sqrt(V)`, where `V`
is the residual cell variance (Agresti, 2007, section 2.4.5 for the
case where `x` is a matrix, `n * p * (1 - p)` otherwise).
is the residual cell variance ([Agresti
2007](#reference+chisq.test.Rd+R+3AAgresti+3A2007), section 2.4.5) for
the case where `x` is a matrix, `n * p * (1 - p)` otherwise).
## Details

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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -113,8 +113,9 @@
<dt id="arg-pc-biplot">pc.biplot<a class="anchor" aria-label="anchor" href="#arg-pc-biplot"></a></dt>
<dd><p>If true, use what Gabriel (1971) refers to as a "principal component
biplot", with <code>lambda = 1</code> and observations scaled up by sqrt(n) and
<dd><p>If true, use what <cite></cite><a href="#reference+biplot.princomp.Rd+R+3AGabriel+3A1971" class="citation">Gabriel (1971)</a> refers to as a
“principal component biplot”,
with <code>lambda = 1</code> and observations scaled up by sqrt(n) and
variables scaled down by sqrt(n). Then inner products between
variables approximate covariances and distances between observations
approximate Mahalanobis distance.</p></dd>

View File

@@ -85,11 +85,12 @@ the changes made based on the source code were:
- pc.biplot:
If true, use what Gabriel (1971) refers to as a "principal component
biplot", with `lambda = 1` and observations scaled up by sqrt(n) and
variables scaled down by sqrt(n). Then inner products between
variables approximate covariances and distances between observations
approximate Mahalanobis distance.
If true, use what [Gabriel
(1971)](#reference+biplot.princomp.Rd+R+3AGabriel+3A1971) refers to as
a “principal component biplot”, with `lambda = 1` and observations
scaled up by sqrt(n) and variables scaled down by sqrt(n). Then inner
products between variables approximate covariances and distances
between observations approximate Mahalanobis distance.
- labels:

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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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 CLSI/EUCAST interpretive
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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 @@ NOTE: These functions are deprecated and will be removed in a future version. Us
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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>Filter Top n Microorganisms — top_n_microorganisms • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><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.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.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="Filter Top n Microorganisms — top_n_microorganisms"><meta name="description" content="This function filters a data set to include only the top n microorganisms based on a specified property, such as taxonomic family or genus. For example, it can filter a data set to the top 3 species, or to any species in the top 5 genera, or to the top 3 species in each of the top 5 genera."><meta property="og:description" content="This function filters a data set to include only the top n microorganisms based on a specified property, such as taxonomic family or genus. For example, it can filter a data set to the top 3 species, or to any species in the top 5 genera, or to the top 3 species in each of the top 5 genera."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js" integrity="sha384-7zkQWkzuo3B5mTepMUcHkMB5jZaolc2xDwL6VFqjFALcbeS9Ggm/Yr2r3Dy4lfFg" crossorigin="anonymous"></script><script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/contrib/auto-render.min.js" integrity="sha384-43gviWU0YVjaDtb/GhzOouOXtZMP/7XUzwPTstBeZFe/+rCMvRwr4yROQP43s0Xk" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script></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>Filter Top n Microorganisms — top_n_microorganisms • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><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.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.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="Filter Top n Microorganisms — top_n_microorganisms"><meta name="description" content="Filters a data set to include only the top n microorganisms based on a specified property, such as taxonomic family or genus. For example, it can filter a data set to the top 3 species, to any species in the top 5 genera, or to the top 3 species in each of the top 5 genera."><meta property="og:description" content="Filters a data set to include only the top n microorganisms based on a specified property, such as taxonomic family or genus. For example, it can filter a data set to the top 3 species, to any species in the top 5 genera, or to the top 3 species in each of the top 5 genera."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js" integrity="sha384-7zkQWkzuo3B5mTepMUcHkMB5jZaolc2xDwL6VFqjFALcbeS9Ggm/Yr2r3Dy4lfFg" crossorigin="anonymous"></script><script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/contrib/auto-render.min.js" integrity="sha384-43gviWU0YVjaDtb/GhzOouOXtZMP/7XUzwPTstBeZFe/+rCMvRwr4yROQP43s0Xk" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script></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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -50,7 +50,7 @@
</div>
<div class="ref-description section level2">
<p>This function filters a data set to include only the top <em>n</em> microorganisms based on a specified property, such as taxonomic family or genus. For example, it can filter a data set to the top 3 species, or to any species in the top 5 genera, or to the top 3 species in each of the top 5 genera.</p>
<p>Filters a data set to include only the top <em>n</em> microorganisms based on a specified property, such as taxonomic family or genus. For example, it can filter a data set to the top 3 species, to any species in the top 5 genera, or to the top 3 species in each of the top 5 genera.</p>
</div>
<div class="section level2">
@@ -60,6 +60,7 @@
<span> <span class="va">n</span>,</span>
<span> property <span class="op">=</span> <span class="st">"species"</span>,</span>
<span> n_for_each <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> property_for_each <span class="op">=</span> <span class="st">"species"</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span></code></pre></div>
@@ -74,15 +75,19 @@
<dt id="arg-n">n<a class="anchor" aria-label="anchor" href="#arg-n"></a></dt>
<dd><p>An integer specifying the maximum number of unique values of the <code>property</code> to include in the output.</p></dd>
<dd><p>A positive whole number specifying the maximum number of unique values of <code>property</code> to include in the output.</p></dd>
<dt id="arg-property">property<a class="anchor" aria-label="anchor" href="#arg-property"></a></dt>
<dd><p>A character string indicating the microorganism property to use for filtering. Must be one of the column names of the <a href="microorganisms.html">microorganisms</a> data set: <code>"mo"</code>, <code>"fullname"</code>, <code>"status"</code>, <code>"domain"</code>, <code>"kingdom"</code>, <code>"phylum"</code>, <code>"class"</code>, <code>"order"</code>, <code>"family"</code>, <code>"genus"</code>, <code>"species"</code>, <code>"subspecies"</code>, <code>"rank"</code>, <code>"ref"</code>, <code>"oxygen_tolerance"</code>, <code>"morphology"</code>, <code>"source"</code>, <code>"lpsn"</code>, <code>"lpsn_parent"</code>, <code>"lpsn_renamed_to"</code>, <code>"mycobank"</code>, <code>"mycobank_parent"</code>, <code>"mycobank_renamed_to"</code>, <code>"gbif"</code>, <code>"gbif_parent"</code>, <code>"gbif_renamed_to"</code>, <code>"prevalence"</code>, or <code>"snomed"</code>. If <code>NULL</code>, the raw values from <code>col_mo</code> will be used without transformation. When using <code>"species"</code> (default) or <code>"subpecies"</code>, the genus will be added to make sure each (sub)species still belongs to the right genus.</p></dd>
<dd><p>A character string indicating the microorganism property to use for filtering. Must be one of the column names of the <a href="microorganisms.html">microorganisms</a> data set: <code>"mo"</code>, <code>"fullname"</code>, <code>"status"</code>, <code>"domain"</code>, <code>"kingdom"</code>, <code>"phylum"</code>, <code>"class"</code>, <code>"order"</code>, <code>"family"</code>, <code>"genus"</code>, <code>"species"</code>, <code>"subspecies"</code>, <code>"rank"</code>, <code>"ref"</code>, <code>"oxygen_tolerance"</code>, <code>"morphology"</code>, <code>"source"</code>, <code>"lpsn"</code>, <code>"lpsn_parent"</code>, <code>"lpsn_renamed_to"</code>, <code>"mycobank"</code>, <code>"mycobank_parent"</code>, <code>"mycobank_renamed_to"</code>, <code>"gbif"</code>, <code>"gbif_parent"</code>, <code>"gbif_renamed_to"</code>, <code>"prevalence"</code>, or <code>"snomed"</code>. If <code>NULL</code>, the raw values from <code>col_mo</code> will be used without transformation. When using <code>"species"</code> (default) or <code>"subspecies"</code>, the genus is prepended to ensure each name is unambiguous.</p></dd>
<dt id="arg-n-for-each">n_for_each<a class="anchor" aria-label="anchor" href="#arg-n-for-each"></a></dt>
<dd><p>An optional integer specifying the maximum number of rows to retain for each value of the selected property. If <code>NULL</code>, all rows within the top <em>n</em> groups will be included.</p></dd>
<dd><p>An optional positive whole number specifying the maximum number of distinct microorganism groups at the level of <code>property_for_each</code> to retain within each of the top <em>n</em> groups. Only used when <code>property_for_each</code> is also set.</p></dd>
<dt id="arg-property-for-each">property_for_each<a class="anchor" aria-label="anchor" href="#arg-property-for-each"></a></dt>
<dd><p>The microorganism property to use for sub-grouping within each top <em>n</em> group. Must be one of the column names of the <a href="microorganisms.html">microorganisms</a> data set and at a strictly lower taxonomic rank than <code>property</code> (allowed order: domain &gt; kingdom &gt; phylum &gt; class &gt; order &gt; family &gt; genus &gt; species &gt; subspecies). Defaults to <code>"species"</code>. Only relevant when <code>n_for_each</code> is set.</p></dd>
<dt id="arg-col-mo">col_mo<a class="anchor" aria-label="anchor" href="#arg-col-mo"></a></dt>
@@ -95,7 +100,7 @@
</dl></div>
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>This function is useful for preprocessing data before creating <a href="antibiogram.html">antibiograms</a> or other analyses that require focused subsets of microbial data. For example, it can filter a data set to only include isolates from the top 10 species.</p>
<p>This function is useful for preprocessing data before creating <a href="antibiogram.html">antibiograms</a> or other analyses that require focused subsets of microbial data.</p>
</div>
<div class="section level2">
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
@@ -105,9 +110,7 @@
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># filter to the top 3 species:</span></span></span>
<span class="r-in"><span><span class="fu">top_n_microorganisms</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> n <span class="op">=</span> <span class="fl">3</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">top_n_microorganisms</span><span class="op">(</span><span class="va">example_isolates</span>, n <span class="op">=</span> <span class="fl">3</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1,015 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender ward mo PEN OXA FLC AMX </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span></span>
@@ -130,9 +133,7 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># IPM &lt;sir&gt;, MEM &lt;sir&gt;, MTR &lt;sir&gt;, CHL &lt;sir&gt;, COL &lt;sir&gt;, MUP &lt;sir&gt;, …</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># filter to any species in the top 5 genera:</span></span></span>
<span class="r-in"><span><span class="fu">top_n_microorganisms</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> n <span class="op">=</span> <span class="fl">5</span>, property <span class="op">=</span> <span class="st">"genus"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">top_n_microorganisms</span><span class="op">(</span><span class="va">example_isolates</span>, n <span class="op">=</span> <span class="fl">5</span>, property <span class="op">=</span> <span class="st">"genus"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1,742 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender ward mo PEN OXA FLC AMX </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span></span>
@@ -178,6 +179,31 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># FOS &lt;sir&gt;, LNZ &lt;sir&gt;, CIP &lt;sir&gt;, MFX &lt;sir&gt;, VAN &lt;sir&gt;, TEC &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># TCY &lt;sir&gt;, TGC &lt;sir&gt;, DOX &lt;sir&gt;, ERY &lt;sir&gt;, CLI &lt;sir&gt;, AZM &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># IPM &lt;sir&gt;, MEM &lt;sir&gt;, MTR &lt;sir&gt;, CHL &lt;sir&gt;, COL &lt;sir&gt;, MUP &lt;sir&gt;, …</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># filter to the top 2 genera in each of the top 3 families:</span></span></span>
<span class="r-in"><span><span class="fu">top_n_microorganisms</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> n <span class="op">=</span> <span class="fl">3</span>, property <span class="op">=</span> <span class="st">"family"</span>, n_for_each <span class="op">=</span> <span class="fl">2</span>, property_for_each <span class="op">=</span> <span class="st">"genus"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1,659 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender ward mo PEN OXA FLC AMX </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2002-01-02 A77334 65 F Clinical <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI <span style="color: #080808; background-color: #FF5F5F;"> R </span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2002-01-03 A77334 65 F Clinical <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI <span style="color: #080808; background-color: #FF5F5F;"> R </span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2002-01-19 738003 71 M Clinical <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI <span style="color: #080808; background-color: #FF5F5F;"> R </span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2002-01-19 738003 71 M Clinical <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI <span style="color: #080808; background-color: #FF5F5F;"> R </span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2002-02-27 066895 85 F Clinical <span style="color: #949494;">B_</span>KLBSL<span style="color: #949494;">_</span>PNMN <span style="color: #080808; background-color: #FF5F5F;"> R </span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> <span style="color: #080808; background-color: #FF5F5F;"> R </span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2002-02-27 066895 85 F Clinical <span style="color: #949494;">B_</span>KLBSL<span style="color: #949494;">_</span>PNMN <span style="color: #080808; background-color: #FF5F5F;"> R </span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> <span style="color: #080808; background-color: #FF5F5F;"> R </span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2002-03-08 4FC193 69 M Clinical <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI <span style="color: #080808; background-color: #FF5F5F;"> R </span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> <span style="color: #080808; background-color: #FF5F5F;"> R </span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2002-04-01 496896 46 F ICU <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI <span style="color: #080808; background-color: #FF5F5F;"> R </span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2002-04-01 496896 46 F ICU <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI <span style="color: #080808; background-color: #FF5F5F;"> R </span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2002-04-23 EE2510 69 F ICU <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI <span style="color: #080808; background-color: #FF5F5F;"> R </span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 1,649 more rows</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 36 more variables: AMC &lt;sir&gt;, AMP &lt;sir&gt;, TZP &lt;sir&gt;, CZO &lt;sir&gt;, FEP &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># CXM &lt;sir&gt;, FOX &lt;sir&gt;, CTX &lt;sir&gt;, CAZ &lt;sir&gt;, CRO &lt;sir&gt;, GEN &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># TOB &lt;sir&gt;, AMK &lt;sir&gt;, KAN &lt;sir&gt;, TMP &lt;sir&gt;, SXT &lt;sir&gt;, NIT &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># FOS &lt;sir&gt;, LNZ &lt;sir&gt;, CIP &lt;sir&gt;, MFX &lt;sir&gt;, VAN &lt;sir&gt;, TEC &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># TCY &lt;sir&gt;, TGC &lt;sir&gt;, DOX &lt;sir&gt;, ERY &lt;sir&gt;, CLI &lt;sir&gt;, AZM &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># IPM &lt;sir&gt;, MEM &lt;sir&gt;, MTR &lt;sir&gt;, CHL &lt;sir&gt;, COL &lt;sir&gt;, MUP &lt;sir&gt;, …</span></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

@@ -1,10 +1,9 @@
# Filter Top *n* Microorganisms
This function filters a data set to include only the top *n*
microorganisms based on a specified property, such as taxonomic family
or genus. For example, it can filter a data set to the top 3 species, or
to any species in the top 5 genera, or to the top 3 species in each of
the top 5 genera.
Filters a data set to include only the top *n* microorganisms based on a
specified property, such as taxonomic family or genus. For example, it
can filter a data set to the top 3 species, to any species in the top 5
genera, or to the top 3 species in each of the top 5 genera.
## Usage
@@ -14,6 +13,7 @@ top_n_microorganisms(
n,
property = "species",
n_for_each = NULL,
property_for_each = "species",
col_mo = NULL,
...
)
@@ -27,8 +27,8 @@ top_n_microorganisms(
- n:
An integer specifying the maximum number of unique values of the
`property` to include in the output.
A positive whole number specifying the maximum number of unique values
of `property` to include in the output.
- property:
@@ -43,14 +43,25 @@ top_n_microorganisms(
`"mycobank_renamed_to"`, `"gbif"`, `"gbif_parent"`,
`"gbif_renamed_to"`, `"prevalence"`, or `"snomed"`. If `NULL`, the raw
values from `col_mo` will be used without transformation. When using
`"species"` (default) or `"subpecies"`, the genus will be added to
make sure each (sub)species still belongs to the right genus.
`"species"` (default) or `"subspecies"`, the genus is prepended to
ensure each name is unambiguous.
- n_for_each:
An optional integer specifying the maximum number of rows to retain
for each value of the selected property. If `NULL`, all rows within
the top *n* groups will be included.
An optional positive whole number specifying the maximum number of
distinct microorganism groups at the level of `property_for_each` to
retain within each of the top *n* groups. Only used when
`property_for_each` is also set.
- property_for_each:
The microorganism property to use for sub-grouping within each top *n*
group. Must be one of the column names of the
[microorganisms](https://amr-for-r.org/reference/microorganisms.md)
data set and at a strictly lower taxonomic rank than `property`
(allowed order: domain \> kingdom \> phylum \> class \> order \>
family \> genus \> species \> subspecies). Defaults to `"species"`.
Only relevant when `n_for_each` is set.
- col_mo:
@@ -69,8 +80,7 @@ top_n_microorganisms(
This function is useful for preprocessing data before creating
[antibiograms](https://amr-for-r.org/reference/antibiogram.md) or other
analyses that require focused subsets of microbial data. For example, it
can filter a data set to only include isolates from the top 10 species.
analyses that require focused subsets of microbial data.
## See also
@@ -82,9 +92,7 @@ can filter a data set to only include isolates from the top 10 species.
``` r
# filter to the top 3 species:
top_n_microorganisms(example_isolates,
n = 3
)
top_n_microorganisms(example_isolates, n = 3)
#> # A tibble: 1,015 × 46
#> date patient age gender ward mo PEN OXA FLC AMX
#> <date> <chr> <dbl> <chr> <chr> <mo> <sir> <sir> <sir> <sir>
@@ -107,9 +115,7 @@ top_n_microorganisms(example_isolates,
#> # IPM <sir>, MEM <sir>, MTR <sir>, CHL <sir>, COL <sir>, MUP <sir>, …
# filter to any species in the top 5 genera:
top_n_microorganisms(example_isolates,
n = 5, property = "genus"
)
top_n_microorganisms(example_isolates, n = 5, property = "genus")
#> # A tibble: 1,742 × 46
#> date patient age gender ward mo PEN OXA FLC AMX
#> <date> <chr> <dbl> <chr> <chr> <mo> <sir> <sir> <sir> <sir>
@@ -155,4 +161,29 @@ top_n_microorganisms(example_isolates,
#> # FOS <sir>, LNZ <sir>, CIP <sir>, MFX <sir>, VAN <sir>, TEC <sir>,
#> # TCY <sir>, TGC <sir>, DOX <sir>, ERY <sir>, CLI <sir>, AZM <sir>,
#> # IPM <sir>, MEM <sir>, MTR <sir>, CHL <sir>, COL <sir>, MUP <sir>, …
# filter to the top 2 genera in each of the top 3 families:
top_n_microorganisms(example_isolates,
n = 3, property = "family", n_for_each = 2, property_for_each = "genus"
)
#> # A tibble: 1,659 × 46
#> date patient age gender ward mo PEN OXA FLC AMX
#> <date> <chr> <dbl> <chr> <chr> <mo> <sir> <sir> <sir> <sir>
#> 1 2002-01-02 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA
#> 2 2002-01-03 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA
#> 3 2002-01-19 738003 71 M Clinical B_ESCHR_COLI R NA NA NA
#> 4 2002-01-19 738003 71 M Clinical B_ESCHR_COLI R NA NA NA
#> 5 2002-02-27 066895 85 F Clinical B_KLBSL_PNMN R NA NA R
#> 6 2002-02-27 066895 85 F Clinical B_KLBSL_PNMN R NA NA R
#> 7 2002-03-08 4FC193 69 M Clinical B_ESCHR_COLI R NA NA R
#> 8 2002-04-01 496896 46 F ICU B_ESCHR_COLI R NA NA NA
#> 9 2002-04-01 496896 46 F ICU B_ESCHR_COLI R NA NA NA
#> 10 2002-04-23 EE2510 69 F ICU B_ESCHR_COLI R NA NA NA
#> # 1,649 more rows
#> # 36 more variables: AMC <sir>, AMP <sir>, TZP <sir>, CZO <sir>, FEP <sir>,
#> # CXM <sir>, FOX <sir>, CTX <sir>, CAZ <sir>, CRO <sir>, GEN <sir>,
#> # TOB <sir>, AMK <sir>, KAN <sir>, TMP <sir>, SXT <sir>, NIT <sir>,
#> # FOS <sir>, LNZ <sir>, CIP <sir>, MFX <sir>, VAN <sir>, TEC <sir>,
#> # TCY <sir>, TGC <sir>, DOX <sir>, ERY <sir>, CLI <sir>, AZM <sir>,
#> # IPM <sir>, MEM <sir>, MTR <sir>, CHL <sir>, COL <sir>, MUP <sir>, …
```

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="">3.0.1.9076</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9077</small>
<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