mirror of
https://github.com/msberends/AMR.git
synced 2026-11-28 21:26:15 +01:00
Built site for AMR@3.0.1.9116: 53d0704
This commit is contained in:
1 parent
b4272847be
commit
53b2dad6a5
96 files changed
+892
-364
No files matched your search
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -724,6 +724,9 @@ or determine multi-drug resistant microorganisms (MDRO,
|
||||
[`count_df()`](https://amr-for-r.org/reference/count.md) : Count
|
||||
Available Isolates
|
||||
|
||||
- [`sir_combine()`](https://amr-for-r.org/reference/sir_combine.md) :
|
||||
Combine SIR Results of Multiple Antimicrobials
|
||||
|
||||
- [`get_episode()`](https://amr-for-r.org/reference/get_episode.md)
|
||||
[`is_new_episode()`](https://amr-for-r.org/reference/get_episode.md) :
|
||||
Determine Clinical or Epidemic Episodes
|
||||
|
||||
+15
-6
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<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,10 +49,10 @@
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
<h2 class="pkg-version" data-toc-text="3.0.1.9115" id="amr-3019115">AMR 3.0.1.9115<a class="anchor" aria-label="anchor" href="#amr-3019115"></a></h2>
|
||||
<h2 class="pkg-version" data-toc-text="3.0.1.9116" id="amr-3019116">AMR 3.0.1.9116<a class="anchor" aria-label="anchor" href="#amr-3019116"></a></h2>
|
||||
<p>Planned as v3.1.0, mid October 2026.</p>
|
||||
<div class="section level4">
|
||||
<h4 id="breaking-changes-3-0-1-9115">Breaking Changes<a class="anchor" aria-label="anchor" href="#breaking-changes-3-0-1-9115"></a></h4>
|
||||
<h4 id="breaking-changes-3-0-1-9116">Breaking Changes<a class="anchor" aria-label="anchor" href="#breaking-changes-3-0-1-9116"></a></h4>
|
||||
<ul><li>
|
||||
<p>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.</p>
|
||||
<table class="table"><colgroup><col width="33%"><col width="29%"><col width="37%"></colgroup><thead><tr><th>
|
||||
@@ -104,9 +104,10 @@
|
||||
</li>
|
||||
<li><p>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>.</p></li>
|
||||
<li><p><code><a href="../reference/as.mo.html">as.mo()</a></code> no longer guesses unknown MO codes (these become <code>NA</code> with a warning), and MO codes from versions before v2.0.0 are no longer supported</p></li>
|
||||
<li><p>With multiple antimicrobials, <code>count_*()</code> and <code>proportion_*()</code> now follow the documented combination therapy rules: <code><a href="../reference/proportion.html">resistance()</a></code> returns the proportion of failing combinations instead of resistance to any of the antimicrobials, and <code><a href="../reference/count.html">count_all()</a></code> excludes isolates of which the combination result is unknown (<a href="https://github.com/msberends/AMR/issues/321" class="external-link">#321</a>)</p></li>
|
||||
</ul></div>
|
||||
<div class="section level4">
|
||||
<h4 id="new-3-0-1-9115">New<a class="anchor" aria-label="anchor" href="#new-3-0-1-9115"></a></h4>
|
||||
<h4 id="new-3-0-1-9116">New<a class="anchor" aria-label="anchor" href="#new-3-0-1-9116"></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>Human EUCAST breakpoints from 2019 (v9.0) on, are now retrieved directly from EUCAST Excel files instead of relying on the WHONET repository.
|
||||
<ul><li>
|
||||
@@ -131,9 +132,11 @@
|
||||
<li>
|
||||
<code><a href="../reference/add_custom_antimicrobials.html">add_custom_antimicrobial_synonyms()</a></code> to add local names, such as trade names, to existing antimicrobials (<a href="https://github.com/msberends/AMR/issues/307" class="external-link">#307</a>)</li>
|
||||
<li>Sulbactam/durlobactam (<code>SUD1</code>) added to the <code>antimicrobials</code> data set (<a href="https://github.com/msberends/AMR/issues/308" class="external-link">#308</a>)</li>
|
||||
<li>
|
||||
<code><a href="../reference/sir_combine.html">sir_combine()</a></code> to combine SIR results of multiple antimicrobials into one variable for combination therapy, using the same rules as <code><a href="../reference/antibiogram.html">antibiogram()</a></code> (<a href="https://github.com/msberends/AMR/issues/321" class="external-link">#321</a>)</li>
|
||||
</ul></div>
|
||||
<div class="section level4">
|
||||
<h4 id="fixed-3-0-1-9115">Fixed<a class="anchor" aria-label="anchor" href="#fixed-3-0-1-9115"></a></h4>
|
||||
<h4 id="fixed-3-0-1-9116">Fixed<a class="anchor" aria-label="anchor" href="#fixed-3-0-1-9116"></a></h4>
|
||||
<ul><li>
|
||||
<code><a href="../reference/as.mo.html">as.mo()</a></code> returned <em>Salmonella bongori</em> or another subspecies for <em>Salmonella</em> serovars written with the species, such as “Salmonella enterica serovar Typhi”</li>
|
||||
<li>EUCAST breakpoint rules for <em>Aerococcus</em> (v12 onwards) were never applied, and <em>Pasteurella</em> rules were partly filed under <em>Neisseria meningitidis</em> (<a href="https://github.com/msberends/AMR/issues/290" class="external-link">#290</a>)</li>
|
||||
@@ -190,9 +193,15 @@
|
||||
<li>Taxonomy: consistent higher taxonomy and parent records, and data sets refer only to current names (except <code>intrinsic_resistant</code>)</li>
|
||||
<li>
|
||||
<code>antimicrobials</code>: trade names of combinations (Tazocin, Timentin, Recarbrio, Exblifep) were listed under a single component, and names of screening libraries and suppliers (e.g. Prestwick, Spectrum) as synonyms (<a href="https://github.com/msberends/AMR/issues/315" class="external-link">#315</a>)</li>
|
||||
<li>WT, NWT, NS and NI results were handled incorrectly in <code>count_*()</code> and <code>proportion_*()</code> with multiple antimicrobials (<a href="https://github.com/msberends/AMR/issues/321" class="external-link">#321</a>)</li>
|
||||
<li>
|
||||
<code><a href="../reference/g.test.html">g.test()</a></code> returned the degrees of freedom as <code>argument</code> instead of <code>parameter</code>, so they were not printed</li>
|
||||
<li>
|
||||
<code><a href="../reference/antibiogram.html">antibiogram()</a></code> and <code><a href="../reference/antibiogram.html">wisca()</a></code> failed without the <code>antimicrobials</code> argument if tidyselect was not available, e.g. for binary installations without dplyr</li>
|
||||
<li>R could crash after unloading data.table, and suggested packages available on the machine that built the package were used even if not available to the user</li>
|
||||
</ul></div>
|
||||
<div class="section level4">
|
||||
<h4 id="updated-3-0-1-9115">Updated<a class="anchor" aria-label="anchor" href="#updated-3-0-1-9115"></a></h4>
|
||||
<h4 id="updated-3-0-1-9116">Updated<a class="anchor" aria-label="anchor" href="#updated-3-0-1-9116"></a></h4>
|
||||
<ul><li>Faster <code><a href="../reference/as.ab.html">as.ab()</a></code>, <code><a href="../reference/as.mo.html">as.mo()</a></code> and all <code>mo_*()</code> functions through one consistent session cache design, which is cleared when lookup tables change, e.g. after <code><a href="../reference/add_custom_microorganisms.html">add_custom_microorganisms()</a></code> (<a href="https://github.com/msberends/AMR/issues/313" class="external-link">#313</a>)
|
||||
<ul><li>
|
||||
<code>mo_*()</code> functions retrieve properties of valid <code><mo></code> input directly, and only for unique values</li>
|
||||
|
||||
+28
-1
@@ -1,6 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## AMR 3.0.1.9115
|
||||
## AMR 3.0.1.9116
|
||||
|
||||
Planned as v3.1.0, mid October 2026.
|
||||
|
||||
@@ -53,6 +53,15 @@ Planned as v3.1.0, mid October 2026.
|
||||
guesses unknown MO codes (these become `NA` with a warning), and MO
|
||||
codes from versions before v2.0.0 are no longer supported
|
||||
|
||||
- With multiple antimicrobials, `count_*()` and `proportion_*()` now
|
||||
follow the documented combination therapy rules:
|
||||
[`resistance()`](https://amr-for-r.org/reference/proportion.md)
|
||||
returns the proportion of failing combinations instead of resistance
|
||||
to any of the antimicrobials, and
|
||||
[`count_all()`](https://amr-for-r.org/reference/count.md) excludes
|
||||
isolates of which the combination result is unknown
|
||||
([\#321](https://github.com/msberends/AMR/issues/321))
|
||||
|
||||
#### New
|
||||
|
||||
- EUCAST 2026 and CLSI 2026 breakpoints: over 5,700 new breakpoints
|
||||
@@ -123,6 +132,11 @@ Planned as v3.1.0, mid October 2026.
|
||||
([\#307](https://github.com/msberends/AMR/issues/307))
|
||||
- Sulbactam/durlobactam (`SUD1`) added to the `antimicrobials` data set
|
||||
([\#308](https://github.com/msberends/AMR/issues/308))
|
||||
- [`sir_combine()`](https://amr-for-r.org/reference/sir_combine.md) to
|
||||
combine SIR results of multiple antimicrobials into one variable for
|
||||
combination therapy, using the same rules as
|
||||
[`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md)
|
||||
([\#321](https://github.com/msberends/AMR/issues/321))
|
||||
|
||||
#### Fixed
|
||||
|
||||
@@ -244,6 +258,19 @@ Planned as v3.1.0, mid October 2026.
|
||||
Recarbrio, Exblifep) were listed under a single component, and names
|
||||
of screening libraries and suppliers (e.g. Prestwick, Spectrum) as
|
||||
synonyms ([\#315](https://github.com/msberends/AMR/issues/315))
|
||||
- WT, NWT, NS and NI results were handled incorrectly in `count_*()` and
|
||||
`proportion_*()` with multiple antimicrobials
|
||||
([\#321](https://github.com/msberends/AMR/issues/321))
|
||||
- [`g.test()`](https://amr-for-r.org/reference/g.test.md) returned the
|
||||
degrees of freedom as `argument` instead of `parameter`, so they were
|
||||
not printed
|
||||
- [`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md) and
|
||||
[`wisca()`](https://amr-for-r.org/reference/antibiogram.md) failed
|
||||
without the `antimicrobials` argument if tidyselect was not available,
|
||||
e.g. for binary installations without dplyr
|
||||
- R could crash after unloading data.table, and suggested packages
|
||||
available on the machine that built the package were used even if not
|
||||
available to the user
|
||||
|
||||
#### Updated
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ articles:
|
||||
PCA: PCA.html
|
||||
WHONET: WHONET.html
|
||||
WISCA: WISCA.html
|
||||
last_built: 2026-10-11T13:44Z
|
||||
last_built: 2026-10-11T18:44Z
|
||||
urls:
|
||||
reference: https://amr-for-r.org/reference
|
||||
article: https://amr-for-r.org/articles
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+28
-18
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -350,23 +350,7 @@ All antibiogram types adhere to previously described approaches (see Source), an
|
||||
<h3 id="inclusion-in-combination-antibiograms">Inclusion in Combination Antibiograms<a class="anchor" aria-label="anchor" href="#inclusion-in-combination-antibiograms"></a></h3>
|
||||
|
||||
|
||||
<p>Note that for combination antibiograms, it is important to realise that susceptibility can be calculated in two ways, which can be set with the <code>only_all_tested</code> argument (default is <code>FALSE</code>). See this example for two antimicrobials, Drug A and Drug B, about how <code>antibiogram()</code> works to calculate the %SI:</p>
|
||||
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span>
|
||||
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
|
||||
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="sc">-----------------------</span> <span class="sc">-----------------------</span></span>
|
||||
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> Drug A Drug B considered considered considered considered</span>
|
||||
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a> susceptible tested susceptible tested</span>
|
||||
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">-----------</span> <span class="sc">----------</span> <span class="sc">-----------</span> <span class="sc">----------</span></span>
|
||||
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> S or I S or I X X X X</span>
|
||||
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> R S or I X X X X</span>
|
||||
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> S or I X X <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> S or I R X X X X</span>
|
||||
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> R R <span class="sc">-</span> X <span class="sc">-</span> X</span>
|
||||
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> R <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a> S or I <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> X X <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-14"><a href="#cb1-14" tabindex="-1"></a> R <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-15"><a href="#cb1-15" tabindex="-1"></a> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-16"><a href="#cb1-16" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span></code></pre><p></p></div>
|
||||
<p>For combination antibiograms, the results of the antimicrobials are combined using the same rules as <code><a href="sir_combine.html">sir_combine()</a></code>, see the section <em>Combination Therapy</em> below. Whether isolates must be tested for all antimicrobials can be set with the <code>only_all_tested</code> argument (default is <code>FALSE</code>). The 'I' and 'SDD' categories are considered susceptible if <code>combine_SI = TRUE</code> (default), which also determines whether a missing result can be ignored. To use a combination in other analyses as well, create a new variable with <code><a href="sir_combine.html">sir_combine()</a></code>.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
@@ -389,6 +373,32 @@ All antibiogram types adhere to previously described approaches (see Source), an
|
||||
<p><strong>Prior distributions:</strong> Pathogen incidence uses a non-informative \(Dirichlet(1, 1, \ldots, 1)\) prior. Susceptibility proportions use the Jeffreys prior, \(\beta(0.5, 0.5)\), except for pathogen-drug combinations with known intrinsic resistance, which use a strongly informative \(\beta(1, 9999)\) prior that forces near-zero susceptibility regardless of observed data. Intrinsic resistance is determined using the <a href="intrinsic_resistant.html">intrinsic_resistant</a> data set, which is based on <a href="https://www.eucast.org/bacteria/important-additional-information/expert-rules/" class="external-link">'EUCAST Expected Resistant Phenotypes' v1.2</a> (2023).</p>
|
||||
<p><strong>Interpreting the output:</strong> Overlapping credible intervals between regimens indicate no significant difference in coverage; if a narrower-spectrum regimen overlaps with a broader one, the narrower-spectrum option may be preferred on stewardship grounds. Non-overlapping intervals indicate a clinically meaningful difference. For small sample sizes, consider pooling data from multiple sites to improve precision, provided pathogen distributions are sufficiently similar (Bielicki <em>et al.</em>, 2016).</p>
|
||||
<p>For the full mathematical derivation and worked examples, see the <a href="https://amr-for-r.org/articles/WISCA.html">WISCA vignette</a>.</p>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="combination-therapy">Combination Therapy<a class="anchor" aria-label="anchor" href="#combination-therapy"></a></h2>
|
||||
|
||||
|
||||
<p>A combination of antimicrobials is considered as good as its most active antimicrobial. Results are ranked as follows, from best to worst:</p><ol><li><p><code>"S"</code> and <code>"WT"</code></p></li>
|
||||
<li><p><code>"SDD"</code></p></li>
|
||||
<li><p><code>"I"</code></p></li>
|
||||
<li><p><code>"R"</code>, <code>"NWT"</code>, and <code>"NS"</code></p></li>
|
||||
</ol><p>The result of the combination is the best result of the antimicrobials, i.e., the result keeps its original category instead of being reduced to only S or R. If antimicrobials have an equally ranked result, <code>"S"</code> is preferred over <code>"WT"</code>, and <code>"R"</code> over <code>"NWT"</code> and <code>"NS"</code>. The value <code>"NI"</code> (non-interpretable) is considered a missing result.</p>
|
||||
<p>A missing result can only be ignored if the result of the combination is susceptible regardless of the missing result, which depends on the <code>only_all_tested</code> argument and on the guideline: under EUCAST, the 'I' category is considered susceptible (<em>susceptible, increased exposure</em>), and under CLSI, it is not. This is an example for two antimicrobials, Drug A and Drug B (the order of the antimicrobials does not matter):</p>
|
||||
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="sc">-------------------------------------------------------------------------</span></span>
|
||||
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> Result of the combination</span>
|
||||
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="sc">-----------------------------------------------------</span></span>
|
||||
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> Drug A Drug B only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
|
||||
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">----------------------------</span> <span class="sc">----------------------</span></span>
|
||||
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a> S S, I, R S S</span>
|
||||
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> I I, R I I</span>
|
||||
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> R R R R</span>
|
||||
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> S <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> S <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> I <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> <span class="fu">I</span> (EUCAST), <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> (CLSI) <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> R <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a><span class="sc">-------------------------------------------------------------------------</span></span></code></pre><p></p></div>
|
||||
<p>The <code><a href="count.html">count_*()</a></code> and <code><a href="proportion.html">proportion_*()</a></code> functions, such as <code><a href="proportion.html">susceptibility()</a></code> and <code><a href="proportion.html">resistance()</a></code>, apply exactly these rules when more than one variable is used: an isolate is considered tested if the result of the combination is not <code>NA</code>, and is then counted by the result of the combination. Consequently, <code><a href="count.html">count_susceptible()</a></code> <code>+</code> <code><a href="count.html">count_resistant()</a></code> <code>=</code> <code><a href="count.html">count_all()</a></code>, and <code><a href="proportion.html">susceptibility()</a></code> <code>+</code> <code><a href="proportion.html">resistance()</a></code> <code>= 1</code>, for both values of <code>only_all_tested</code>. The guideline is taken from their <code>guideline</code> argument if they have one, and otherwise from the <code>AMR_guideline</code> option.</p>
|
||||
<p>In <code>antibiogram()</code> and <code>wisca()</code>, the 'I' and 'SDD' categories are considered susceptible if <code>combine_SI = TRUE</code> (default), and the result of the combination is then reduced to S or R.</p>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2>
|
||||
|
||||
+71
-22
@@ -494,28 +494,16 @@ Code example:
|
||||
|
||||
### Inclusion in Combination Antibiograms
|
||||
|
||||
Note that for combination antibiograms, it is important to realise that
|
||||
susceptibility can be calculated in two ways, which can be set with the
|
||||
`only_all_tested` argument (default is `FALSE`). See this example for
|
||||
two antimicrobials, Drug A and Drug B, about how `antibiogram()` works
|
||||
to calculate the %SI:
|
||||
|
||||
--------------------------------------------------------------------
|
||||
only_all_tested = FALSE only_all_tested = TRUE
|
||||
----------------------- -----------------------
|
||||
Drug A Drug B considered considered considered considered
|
||||
susceptible tested susceptible tested
|
||||
-------- -------- ----------- ---------- ----------- ----------
|
||||
S or I S or I X X X X
|
||||
R S or I X X X X
|
||||
<NA> S or I X X - -
|
||||
S or I R X X X X
|
||||
R R - X - X
|
||||
<NA> R - - - -
|
||||
S or I <NA> X X - -
|
||||
R <NA> - - - -
|
||||
<NA> <NA> - - - -
|
||||
--------------------------------------------------------------------
|
||||
For combination antibiograms, the results of the antimicrobials are
|
||||
combined using the same rules as
|
||||
[`sir_combine()`](https://amr-for-r.org/reference/sir_combine.md), see
|
||||
the section *Combination Therapy* below. Whether isolates must be tested
|
||||
for all antimicrobials can be set with the `only_all_tested` argument
|
||||
(default is `FALSE`). The 'I' and 'SDD' categories are considered
|
||||
susceptible if `combine_SI = TRUE` (default), which also determines
|
||||
whether a missing result can be ignored. To use a combination in other
|
||||
analyses as well, create a new variable with
|
||||
[`sir_combine()`](https://amr-for-r.org/reference/sir_combine.md).
|
||||
|
||||
### Plotting
|
||||
|
||||
@@ -576,6 +564,67 @@ similar (Bielicki *et al.*, 2016).
|
||||
For the full mathematical derivation and worked examples, see the [WISCA
|
||||
vignette](https://amr-for-r.org/articles/WISCA.html).
|
||||
|
||||
## Combination Therapy
|
||||
|
||||
A combination of antimicrobials is considered as good as its most active
|
||||
antimicrobial. Results are ranked as follows, from best to worst:
|
||||
|
||||
1. `"S"` and `"WT"`
|
||||
|
||||
2. `"SDD"`
|
||||
|
||||
3. `"I"`
|
||||
|
||||
4. `"R"`, `"NWT"`, and `"NS"`
|
||||
|
||||
The result of the combination is the best result of the antimicrobials,
|
||||
i.e., the result keeps its original category instead of being reduced to
|
||||
only S or R. If antimicrobials have an equally ranked result, `"S"` is
|
||||
preferred over `"WT"`, and `"R"` over `"NWT"` and `"NS"`. The value
|
||||
`"NI"` (non-interpretable) is considered a missing result.
|
||||
|
||||
A missing result can only be ignored if the result of the combination is
|
||||
susceptible regardless of the missing result, which depends on the
|
||||
`only_all_tested` argument and on the guideline: under EUCAST, the 'I'
|
||||
category is considered susceptible (*susceptible, increased exposure*),
|
||||
and under CLSI, it is not. This is an example for two antimicrobials,
|
||||
Drug A and Drug B (the order of the antimicrobials does not matter):
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Result of the combination
|
||||
-----------------------------------------------------
|
||||
Drug A Drug B only_all_tested = FALSE only_all_tested = TRUE
|
||||
-------- -------- ---------------------------- ----------------------
|
||||
S S, I, R S S
|
||||
I I, R I I
|
||||
R R R R
|
||||
S <NA> S <NA>
|
||||
I <NA> I (EUCAST), <NA> (CLSI) <NA>
|
||||
R <NA> <NA> <NA>
|
||||
<NA> <NA> <NA> <NA>
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
The [`count_*()`](https://amr-for-r.org/reference/count.md) and
|
||||
[`proportion_*()`](https://amr-for-r.org/reference/proportion.md)
|
||||
functions, such as
|
||||
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md) and
|
||||
[`resistance()`](https://amr-for-r.org/reference/proportion.md), apply
|
||||
exactly these rules when more than one variable is used: an isolate is
|
||||
considered tested if the result of the combination is not `NA`, and is
|
||||
then counted by the result of the combination. Consequently,
|
||||
[`count_susceptible()`](https://amr-for-r.org/reference/count.md) `+`
|
||||
[`count_resistant()`](https://amr-for-r.org/reference/count.md) `=`
|
||||
[`count_all()`](https://amr-for-r.org/reference/count.md), and
|
||||
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md) `+`
|
||||
[`resistance()`](https://amr-for-r.org/reference/proportion.md) `= 1`,
|
||||
for both values of `only_all_tested`. The guideline is taken from their
|
||||
`guideline` argument if they have one, and otherwise from the
|
||||
`AMR_guideline` option.
|
||||
|
||||
In `antibiogram()` and `wisca()`, the 'I' and 'SDD' categories are
|
||||
considered susceptible if `combine_SI = TRUE` (default), and the result
|
||||
of the combination is then reduced to S or R.
|
||||
|
||||
## References
|
||||
|
||||
- Hebert C *et al.* (2012). **Demonstration of the weighted-incidence
|
||||
|
||||
@@ -17,7 +17,7 @@ my_data_with_all_these_columns %&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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -463,10 +463,10 @@ Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026,
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># A tibble: 4 × 18</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> datetime index method ab_given mo_given host_given input_given</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494; font-style: italic;"><dttm></span> <span style="color: #949494; font-style: italic;"><int></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">1</span> 2026-10-11 <span style="color: #949494;">13:46:14</span> 1 MIC amoxicillin Escherich… human 8 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">2</span> 2026-10-11 <span style="color: #949494;">13:46:14</span> 1 MIC cipro Escherich… human 0.256 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">3</span> 2026-10-11 <span style="color: #949494;">13:46:14</span> 1 DISK tobra Escherich… human 16 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">4</span> 2026-10-11 <span style="color: #949494;">13:46:14</span> 1 DISK genta Escherich… human 18 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">1</span> 2026-10-11 <span style="color: #949494;">18:46:28</span> 1 MIC amoxicillin Escherich… human 8 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">2</span> 2026-10-11 <span style="color: #949494;">18:46:29</span> 1 MIC cipro Escherich… human 0.256 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">3</span> 2026-10-11 <span style="color: #949494;">18:46:29</span> 1 DISK tobra Escherich… human 16 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">4</span> 2026-10-11 <span style="color: #949494;">18:46:29</span> 1 DISK genta Escherich… human 18 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ℹ 11 more variables: ab <ab>, mo <mo>, host <chr>, input <chr>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># outcome <sir>, notes <chr>, guideline <chr>, ref_table <chr>, uti <lgl>,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># breakpoint_S_R <chr>, site <chr></span></span>
|
||||
|
||||
+4
-4
@@ -722,10 +722,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-10-11 13:46:14 1 MIC amoxicillin Escherich… human 8
|
||||
#> 2 2026-10-11 13:46:14 1 MIC cipro Escherich… human 0.256
|
||||
#> 3 2026-10-11 13:46:14 1 DISK tobra Escherich… human 16
|
||||
#> 4 2026-10-11 13:46:14 1 DISK genta Escherich… human 18
|
||||
#> 1 2026-10-11 18:46:28 1 MIC amoxicillin Escherich… human 8
|
||||
#> 2 2026-10-11 18:46:29 1 MIC cipro Escherich… human 0.256
|
||||
#> 3 2026-10-11 18:46:29 1 DISK tobra Escherich… human 16
|
||||
#> 4 2026-10-11 18:46:29 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>
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+24
-27
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -101,7 +101,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
|
||||
|
||||
|
||||
<dt id="arg-only-all-tested">only_all_tested<a class="anchor" aria-label="anchor" href="#arg-only-all-tested"></a></dt>
|
||||
<dd><p>(for combination therapies, i.e. using more than one variable for <code>...</code>): a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate that isolates must be tested for all antimicrobials, see section <em>Combination Therapy</em> below.</p></dd>
|
||||
<dd><p>(for combination therapies, i.e. using more than one variable for <code>...</code>): a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate that isolates must be tested for all antimicrobials, see section <em>Combination Therapy</em> below. Use <code><a href="sir_combine.html">sir_combine()</a></code> to create a new variable for a combination therapy.</p></dd>
|
||||
|
||||
|
||||
<dt id="arg-guideline">guideline<a class="anchor" aria-label="anchor" href="#arg-guideline"></a></dt>
|
||||
@@ -133,7 +133,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
|
||||
<div class="section level2">
|
||||
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
|
||||
<p>These functions are meant to count isolates. Use the <code><a href="proportion.html">resistance()</a></code>/<code><a href="proportion.html">susceptibility()</a></code> functions to calculate microbial resistance/susceptibility.</p>
|
||||
<p>The function <code>n_sir()</code> is an alias of <code>count_all()</code>. They can be used to count all available isolates, i.e. where all input antimicrobials have an available result (S, I or R). Their use is equal to <code>dplyr</code>'s <code><a href="https://dplyr.tidyverse.org/reference/n_distinct.html" class="external-link">n_distinct()</a></code>. Their function is equal to <code>count_susceptible(...) + count_resistant(...)</code>.</p>
|
||||
<p>The function <code>n_sir()</code> is an alias of <code>count_all()</code>. They can be used to count all available isolates, i.e. where the input antimicrobial has an available result (S, I or R), or for multiple antimicrobials, where the result of the combination is available (see <em>Combination Therapy</em> below). Their use is equal to <code>dplyr</code>'s <code><a href="https://dplyr.tidyverse.org/reference/n_distinct.html" class="external-link">n_distinct()</a></code>. Their function is equal to <code>count_susceptible(...) + count_resistant(...)</code>.</p>
|
||||
<p>The function <code>count_df()</code> takes any variable from <code>data</code> that has an <code><a href="as.sir.html">sir</a></code> class (created with <code><a href="as.sir.html">as.sir()</a></code>) and counts the number of S's, I's and R's. It also supports grouped variables. The function <code><a href="proportion.html">sir_df()</a></code> works exactly like <code>count_df()</code>, but adds the percentage of S, I and R.</p>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
@@ -147,30 +147,27 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
|
||||
<h2 id="combination-therapy">Combination Therapy<a class="anchor" aria-label="anchor" href="#combination-therapy"></a></h2>
|
||||
|
||||
|
||||
<p>When using more than one variable for <code>...</code> (= combination therapy), use <code>only_all_tested</code> to only count isolates that are tested for all antimicrobials/variables that you test them for. See this example for two antimicrobials, Drug A and Drug B, about how <code><a href="proportion.html">susceptibility()</a></code> works to calculate the %SI:</p>
|
||||
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span>
|
||||
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
|
||||
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="sc">-----------------------</span> <span class="sc">-----------------------</span></span>
|
||||
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> Drug A Drug B considered considered considered considered</span>
|
||||
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a> susceptible tested susceptible tested</span>
|
||||
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">-----------</span> <span class="sc">----------</span> <span class="sc">-----------</span> <span class="sc">----------</span></span>
|
||||
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> S or I S or I X X X X</span>
|
||||
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> R S or I X X X X</span>
|
||||
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> S or I X X <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> S or I R X X X X</span>
|
||||
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> R R <span class="sc">-</span> X <span class="sc">-</span> X</span>
|
||||
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> R <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a> S or I <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> X X <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-14"><a href="#cb1-14" tabindex="-1"></a> R <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-15"><a href="#cb1-15" tabindex="-1"></a> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-16"><a href="#cb1-16" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span></code></pre><p></p></div>
|
||||
<p>Please note that, in combination therapies, for <code>only_all_tested = TRUE</code> applies that:</p>
|
||||
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="fu">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="ot">=</span> <span class="fu">count_all</span>()</span>
|
||||
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="ot">=</span> <span class="dv">1</span></span></code></pre><p></p></div>
|
||||
<p>and that, in combination therapies, for <code>only_all_tested = FALSE</code> applies that:</p>
|
||||
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="fu">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="sc">>=</span> <span class="fu">count_all</span>()</span>
|
||||
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="sc">>=</span> <span class="dv">1</span></span></code></pre><p></p></div>
|
||||
<p>Using <code>only_all_tested</code> has no impact when only using one antibiotic as input.</p>
|
||||
<p>A combination of antimicrobials is considered as good as its most active antimicrobial. Results are ranked as follows, from best to worst:</p><ol><li><p><code>"S"</code> and <code>"WT"</code></p></li>
|
||||
<li><p><code>"SDD"</code></p></li>
|
||||
<li><p><code>"I"</code></p></li>
|
||||
<li><p><code>"R"</code>, <code>"NWT"</code>, and <code>"NS"</code></p></li>
|
||||
</ol><p>The result of the combination is the best result of the antimicrobials, i.e., the result keeps its original category instead of being reduced to only S or R. If antimicrobials have an equally ranked result, <code>"S"</code> is preferred over <code>"WT"</code>, and <code>"R"</code> over <code>"NWT"</code> and <code>"NS"</code>. The value <code>"NI"</code> (non-interpretable) is considered a missing result.</p>
|
||||
<p>A missing result can only be ignored if the result of the combination is susceptible regardless of the missing result, which depends on the <code>only_all_tested</code> argument and on the guideline: under EUCAST, the 'I' category is considered susceptible (<em>susceptible, increased exposure</em>), and under CLSI, it is not. This is an example for two antimicrobials, Drug A and Drug B (the order of the antimicrobials does not matter):</p>
|
||||
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="sc">-------------------------------------------------------------------------</span></span>
|
||||
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> Result of the combination</span>
|
||||
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="sc">-----------------------------------------------------</span></span>
|
||||
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> Drug A Drug B only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
|
||||
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">----------------------------</span> <span class="sc">----------------------</span></span>
|
||||
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a> S S, I, R S S</span>
|
||||
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> I I, R I I</span>
|
||||
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> R R R R</span>
|
||||
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> S <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> S <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> I <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> <span class="fu">I</span> (EUCAST), <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> (CLSI) <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> R <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a><span class="sc">-------------------------------------------------------------------------</span></span></code></pre><p></p></div>
|
||||
<p>The <code>count_*()</code> and <code><a href="proportion.html">proportion_*()</a></code> functions, such as <code><a href="proportion.html">susceptibility()</a></code> and <code><a href="proportion.html">resistance()</a></code>, apply exactly these rules when more than one variable is used: an isolate is considered tested if the result of the combination is not <code>NA</code>, and is then counted by the result of the combination. Consequently, <code>count_susceptible()</code> <code>+</code> <code>count_resistant()</code> <code>=</code> <code>count_all()</code>, and <code><a href="proportion.html">susceptibility()</a></code> <code>+</code> <code><a href="proportion.html">resistance()</a></code> <code>= 1</code>, for both values of <code>only_all_tested</code>. The guideline is taken from their <code>guideline</code> argument if they have one, and otherwise from the <code>AMR_guideline</code> option.</p>
|
||||
<p>In <code><a href="antibiogram.html">antibiogram()</a></code> and <code><a href="antibiogram.html">wisca()</a></code>, the 'I' and 'SDD' categories are considered susceptible if <code>combine_SI = TRUE</code> (default), and the result of the combination is then reduced to S or R.</p>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
|
||||
|
||||
+58
-35
@@ -59,7 +59,9 @@ count_df(
|
||||
(for combination therapies, i.e. using more than one variable for
|
||||
`...`): a [logical](https://rdrr.io/r/base/logical.html) to indicate
|
||||
that isolates must be tested for all antimicrobials, see section
|
||||
*Combination Therapy* below.
|
||||
*Combination Therapy* below. Use
|
||||
[`sir_combine()`](https://amr-for-r.org/reference/sir_combine.md) to
|
||||
create a new variable for a combination therapy.
|
||||
|
||||
- guideline:
|
||||
|
||||
@@ -117,8 +119,10 @@ These functions are meant to count isolates. Use the
|
||||
functions to calculate microbial resistance/susceptibility.
|
||||
|
||||
The function `n_sir()` is an alias of `count_all()`. They can be used to
|
||||
count all available isolates, i.e. where all input antimicrobials have
|
||||
an available result (S, I or R). Their use is equal to `dplyr`'s
|
||||
count all available isolates, i.e. where the input antimicrobial has an
|
||||
available result (S, I or R), or for multiple antimicrobials, where the
|
||||
result of the combination is available (see *Combination Therapy*
|
||||
below). Their use is equal to `dplyr`'s
|
||||
[`n_distinct()`](https://dplyr.tidyverse.org/reference/n_distinct.html).
|
||||
Their function is equal to
|
||||
`count_susceptible(...) + count_resistant(...)`.
|
||||
@@ -146,44 +150,63 @@ to `count_SI()`) to count susceptible isolates.
|
||||
|
||||
## Combination Therapy
|
||||
|
||||
When using more than one variable for `...` (= combination therapy), use
|
||||
`only_all_tested` to only count isolates that are tested for all
|
||||
antimicrobials/variables that you test them for. See this example for
|
||||
two antimicrobials, Drug A and Drug B, about how
|
||||
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md)
|
||||
works to calculate the %SI:
|
||||
A combination of antimicrobials is considered as good as its most active
|
||||
antimicrobial. Results are ranked as follows, from best to worst:
|
||||
|
||||
--------------------------------------------------------------------
|
||||
only_all_tested = FALSE only_all_tested = TRUE
|
||||
----------------------- -----------------------
|
||||
Drug A Drug B considered considered considered considered
|
||||
susceptible tested susceptible tested
|
||||
-------- -------- ----------- ---------- ----------- ----------
|
||||
S or I S or I X X X X
|
||||
R S or I X X X X
|
||||
<NA> S or I X X - -
|
||||
S or I R X X X X
|
||||
R R - X - X
|
||||
<NA> R - - - -
|
||||
S or I <NA> X X - -
|
||||
R <NA> - - - -
|
||||
<NA> <NA> - - - -
|
||||
--------------------------------------------------------------------
|
||||
1. `"S"` and `"WT"`
|
||||
|
||||
Please note that, in combination therapies, for `only_all_tested = TRUE`
|
||||
applies that:
|
||||
2. `"SDD"`
|
||||
|
||||
count_S() + count_I() + count_R() = count_all()
|
||||
proportion_S() + proportion_I() + proportion_R() = 1
|
||||
3. `"I"`
|
||||
|
||||
and that, in combination therapies, for `only_all_tested = FALSE`
|
||||
applies that:
|
||||
4. `"R"`, `"NWT"`, and `"NS"`
|
||||
|
||||
count_S() + count_I() + count_R() >= count_all()
|
||||
proportion_S() + proportion_I() + proportion_R() >= 1
|
||||
The result of the combination is the best result of the antimicrobials,
|
||||
i.e., the result keeps its original category instead of being reduced to
|
||||
only S or R. If antimicrobials have an equally ranked result, `"S"` is
|
||||
preferred over `"WT"`, and `"R"` over `"NWT"` and `"NS"`. The value
|
||||
`"NI"` (non-interpretable) is considered a missing result.
|
||||
|
||||
Using `only_all_tested` has no impact when only using one antibiotic as
|
||||
input.
|
||||
A missing result can only be ignored if the result of the combination is
|
||||
susceptible regardless of the missing result, which depends on the
|
||||
`only_all_tested` argument and on the guideline: under EUCAST, the 'I'
|
||||
category is considered susceptible (*susceptible, increased exposure*),
|
||||
and under CLSI, it is not. This is an example for two antimicrobials,
|
||||
Drug A and Drug B (the order of the antimicrobials does not matter):
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Result of the combination
|
||||
-----------------------------------------------------
|
||||
Drug A Drug B only_all_tested = FALSE only_all_tested = TRUE
|
||||
-------- -------- ---------------------------- ----------------------
|
||||
S S, I, R S S
|
||||
I I, R I I
|
||||
R R R R
|
||||
S <NA> S <NA>
|
||||
I <NA> I (EUCAST), <NA> (CLSI) <NA>
|
||||
R <NA> <NA> <NA>
|
||||
<NA> <NA> <NA> <NA>
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
The `count_*()` and
|
||||
[`proportion_*()`](https://amr-for-r.org/reference/proportion.md)
|
||||
functions, such as
|
||||
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md) and
|
||||
[`resistance()`](https://amr-for-r.org/reference/proportion.md), apply
|
||||
exactly these rules when more than one variable is used: an isolate is
|
||||
considered tested if the result of the combination is not `NA`, and is
|
||||
then counted by the result of the combination. Consequently,
|
||||
`count_susceptible()` `+` `count_resistant()` `=` `count_all()`, and
|
||||
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md) `+`
|
||||
[`resistance()`](https://amr-for-r.org/reference/proportion.md) `= 1`,
|
||||
for both values of `only_all_tested`. The guideline is taken from their
|
||||
`guideline` argument if they have one, and otherwise from the
|
||||
`AMR_guideline` option.
|
||||
|
||||
In [`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md) and
|
||||
[`wisca()`](https://amr-for-r.org/reference/antibiogram.md), the 'I' and
|
||||
'SDD' categories are considered susceptible if `combine_SI = TRUE`
|
||||
(default), and the result of the combination is then reduced to S or R.
|
||||
|
||||
## See also
|
||||
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+14
-41
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -91,44 +91,16 @@
|
||||
</dl></div>
|
||||
<div class="section level2">
|
||||
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||
<p>A list with class <code>"htest"</code> containing the following
|
||||
components:</p>
|
||||
<dl><dt>statistic</dt>
|
||||
<dd><p>the value the chi-squared test statistic.</p></dd>
|
||||
|
||||
<dt>parameter</dt>
|
||||
<dd><p>the degrees of freedom of the approximate
|
||||
chi-squared distribution of the test statistic, <code>NA</code> if the
|
||||
p-value is computed by Monte Carlo simulation.</p></dd>
|
||||
|
||||
<dt>p.value</dt>
|
||||
<dd><p>the p-value for the test.</p></dd>
|
||||
|
||||
<dt>method</dt>
|
||||
<dd><p>a character string indicating the type of test
|
||||
performed, and whether Monte Carlo simulation or continuity
|
||||
correction was used.</p></dd>
|
||||
|
||||
<dt>data.name</dt>
|
||||
<dd><p>a character string giving the name(s) of the data.</p></dd>
|
||||
|
||||
<dt>observed</dt>
|
||||
<dd><p>the observed counts.</p></dd>
|
||||
|
||||
<dt>expected</dt>
|
||||
<dd><p>the expected counts under the null hypothesis.</p></dd>
|
||||
|
||||
<dt>residuals</dt>
|
||||
<dd><p>the Pearson residuals,
|
||||
<code>(observed - expected) / sqrt(expected)</code>.</p></dd>
|
||||
|
||||
<dt>stdres</dt>
|
||||
<dd><p>standardized residuals,
|
||||
<code>(observed - expected) / sqrt(V)</code>, where <code>V</code> is the
|
||||
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>
|
||||
<p>A <a href="https://rdrr.io/r/base/list.html" class="external-link">list</a> with class <code>"htest"</code> containing the following components:</p><ul><li><p><code>statistic</code>: the value of the test statistic</p></li>
|
||||
<li><p><code>parameter</code>: the degrees of freedom of the approximate chi-squared distribution of the test statistic, <code>NA</code> if the p-value is computed by Monte Carlo simulation</p></li>
|
||||
<li><p><code>p.value</code>: the p-value for the test</p></li>
|
||||
<li><p><code>method</code>: a character string indicating the type of test performed, and whether Monte Carlo simulation was used</p></li>
|
||||
<li><p><code>data.name</code>: a character string giving the name(s) of the data</p></li>
|
||||
<li><p><code>observed</code>: the observed counts</p></li>
|
||||
<li><p><code>expected</code>: the expected counts under the null hypothesis</p></li>
|
||||
<li><p><code>residuals</code>: the Pearson residuals, <code>(observed - expected) / sqrt(expected)</code></p></li>
|
||||
<li><p><code>stdres</code>: standardised residuals, <code>(observed - expected) / sqrt(V)</code>, where <code>V</code> is the residual cell variance (Agresti 2007, section 2.4.5) for the case where <code>x</code> is a matrix, <code>n * p * (1 - p)</code> otherwise</p></li>
|
||||
</ul></div>
|
||||
<div class="section level2">
|
||||
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
|
||||
<p>If <code>x</code> is a <a href="https://rdrr.io/r/base/matrix.html" class="external-link">matrix</a> with one row or column, or if <code>x</code> is a vector and <code>y</code> is not given, then a <em>goodness-of-fit test</em> is performed (<code>x</code> is treated as a one-dimensional contingency table). The entries of <code>x</code> must be non-negative integers. In this case, the hypothesis tested is whether the population probabilities equal those in <code>p</code>, or are all equal if <code>p</code> is not given.</p>
|
||||
@@ -172,6 +144,7 @@
|
||||
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2>
|
||||
|
||||
<ol><li><p>McDonald, J.H. 2014. <strong>Handbook of Biological Statistics (3rd ed.)</strong>. Sparky House Publishing, Baltimore, Maryland.</p></li>
|
||||
<li><p>Agresti, A. 2007. <strong>An Introduction to Categorical Data Analysis (2nd ed.)</strong>. Wiley, New York.</p></li>
|
||||
</ol></div>
|
||||
<div class="section level2">
|
||||
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
|
||||
@@ -195,7 +168,7 @@
|
||||
<span class="r-out co"><span class="r-pr">#></span> G-test of goodness-of-fit (likelihood ratio test)</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> data: x</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> X-squared = 4.1471, p-value = 0.1257</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> X-squared = 4.1471, df = 2, p-value = 0.1257</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co"># There is no significant difference from a 1:2:1 ratio.</span></span></span>
|
||||
@@ -216,7 +189,7 @@
|
||||
<span class="r-out co"><span class="r-pr">#></span> G-test of goodness-of-fit (likelihood ratio test)</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> data: x</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> X-squared = 5.6085, p-value = 0.01787</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> X-squared = 5.6085, df = 1, p-value = 0.01787</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co"># There is a significant difference from a 1:1 ratio.</span></span></span>
|
||||
|
||||
+22
-36
@@ -53,49 +53,32 @@ The code for this function is identical to that of
|
||||
|
||||
## Value
|
||||
|
||||
A list with class `"htest"` containing the following components:
|
||||
A [list](https://rdrr.io/r/base/list.html) with class `"htest"`
|
||||
containing the following components:
|
||||
|
||||
- statistic:
|
||||
- `statistic`: the value of the test statistic
|
||||
|
||||
the value the chi-squared test statistic.
|
||||
- `parameter`: the degrees of freedom of the approximate chi-squared
|
||||
distribution of the test statistic, `NA` if the p-value is computed by
|
||||
Monte Carlo simulation
|
||||
|
||||
- parameter:
|
||||
- `p.value`: the p-value for the test
|
||||
|
||||
the degrees of freedom of the approximate chi-squared distribution of
|
||||
the test statistic, `NA` if the p-value is computed by Monte Carlo
|
||||
simulation.
|
||||
- `method`: a character string indicating the type of test performed,
|
||||
and whether Monte Carlo simulation was used
|
||||
|
||||
- p.value:
|
||||
- `data.name`: a character string giving the name(s) of the data
|
||||
|
||||
the p-value for the test.
|
||||
- `observed`: the observed counts
|
||||
|
||||
- method:
|
||||
- `expected`: the expected counts under the null hypothesis
|
||||
|
||||
a character string indicating the type of test performed, and whether
|
||||
Monte Carlo simulation or continuity correction was used.
|
||||
- `residuals`: the Pearson residuals,
|
||||
`(observed - expected) / sqrt(expected)`
|
||||
|
||||
- data.name:
|
||||
|
||||
a character string giving the name(s) of the data.
|
||||
|
||||
- observed:
|
||||
|
||||
the observed counts.
|
||||
|
||||
- expected:
|
||||
|
||||
the expected counts under the null hypothesis.
|
||||
|
||||
- residuals:
|
||||
|
||||
the Pearson residuals, `(observed - expected) / sqrt(expected)`.
|
||||
|
||||
- stdres:
|
||||
|
||||
standardized residuals, `(observed - expected) / sqrt(V)`, where `V`
|
||||
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).
|
||||
- `stdres`: standardised 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
|
||||
|
||||
## Details
|
||||
|
||||
@@ -207,6 +190,9 @@ category, of course.
|
||||
1. McDonald, J.H. 2014. **Handbook of Biological Statistics (3rd
|
||||
ed.)**. Sparky House Publishing, Baltimore, Maryland.
|
||||
|
||||
2. Agresti, A. 2007. **An Introduction to Categorical Data Analysis
|
||||
(2nd ed.)**. Wiley, New York.
|
||||
|
||||
## See also
|
||||
|
||||
[`chisq.test()`](https://rdrr.io/r/stats/chisq.test.html)
|
||||
@@ -229,7 +215,7 @@ g.test(x, p = c(1, 2, 1) / 4)
|
||||
#> G-test of goodness-of-fit (likelihood ratio test)
|
||||
#>
|
||||
#> data: x
|
||||
#> X-squared = 4.1471, p-value = 0.1257
|
||||
#> X-squared = 4.1471, df = 2, p-value = 0.1257
|
||||
#>
|
||||
|
||||
# There is no significant difference from a 1:2:1 ratio.
|
||||
@@ -250,7 +236,7 @@ g.test(x)
|
||||
#> G-test of goodness-of-fit (likelihood ratio test)
|
||||
#>
|
||||
#> data: x
|
||||
#> X-squared = 5.6085, p-value = 0.01787
|
||||
#> X-squared = 5.6085, df = 1, p-value = 0.01787
|
||||
#>
|
||||
|
||||
# There is a significant difference from a 1:1 ratio.
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<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,12 +113,7 @@
|
||||
|
||||
|
||||
<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 <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>
|
||||
<dd><p>If <code>TRUE</code>, use what Gabriel (1971) refers to as a 'principal component biplot', with <code>lambda = 1</code> and observations scaled up by <code>sqrt(n)</code> and variables scaled down by <code>sqrt(n)</code>. Then inner products between variables approximate covariances and distances between observations approximate Mahalanobis distance.</p></dd>
|
||||
|
||||
|
||||
<dt id="arg-labels">labels<a class="anchor" aria-label="anchor" href="#arg-labels"></a></dt>
|
||||
@@ -197,6 +192,10 @@
|
||||
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
|
||||
<p>The colours for labels and points can be changed by adding another scale layer for colour, such as <code><a href="https://ggplot2.tidyverse.org/reference/scale_viridis.html" class="external-link">scale_colour_viridis_d()</a></code> and <code><a href="https://ggplot2.tidyverse.org/reference/scale_brewer.html" class="external-link">scale_colour_brewer()</a></code>.</p>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2>
|
||||
<p>Gabriel, K.R. 1971. <strong>The biplot graphical display of matrices with application to principal component analysis</strong>. <em>Biometrika</em> 58(3):453-467. <a href="https://doi.org/10.1093/biomet/58.3.453" class="external-link">doi:10.1093/biomet/58.3.453</a></p>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
|
||||
|
||||
+12
-6
@@ -85,12 +85,11 @@ the changes made based on the source code were:
|
||||
|
||||
- pc.biplot:
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
- labels:
|
||||
|
||||
@@ -188,6 +187,13 @@ layer for colour, such as
|
||||
and
|
||||
[`scale_colour_brewer()`](https://ggplot2.tidyverse.org/reference/scale_brewer.html).
|
||||
|
||||
## References
|
||||
|
||||
Gabriel, K.R. 1971. **The biplot graphical display of matrices with
|
||||
application to principal component analysis**. *Biometrika*
|
||||
58(3):453-467.
|
||||
[doi:10.1093/biomet/58.3.453](https://doi.org/10.1093/biomet/58.3.453)
|
||||
|
||||
## Examples
|
||||
|
||||
``` r
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -219,6 +219,13 @@
|
||||
</dt>
|
||||
<dd>Count Available Isolates</dd>
|
||||
|
||||
<dt>
|
||||
|
||||
<code><a href="sir_combine.html">sir_combine()</a></code>
|
||||
|
||||
</dt>
|
||||
<dd>Combine SIR Results of Multiple Antimicrobials</dd>
|
||||
|
||||
<dt>
|
||||
|
||||
<code><a href="get_episode.html">get_episode()</a></code> <code><a href="get_episode.html">is_new_episode()</a></code>
|
||||
|
||||
@@ -212,6 +212,9 @@ or determine multi-drug resistant microorganisms (MDRO,
|
||||
[`count_df()`](https://amr-for-r.org/reference/count.md) : Count
|
||||
Available Isolates
|
||||
|
||||
- [`sir_combine()`](https://amr-for-r.org/reference/sir_combine.md) :
|
||||
Combine SIR Results of Multiple Antimicrobials
|
||||
|
||||
- [`get_episode()`](https://amr-for-r.org/reference/get_episode.md)
|
||||
[`is_new_episode()`](https://amr-for-r.org/reference/get_episode.md) :
|
||||
Determine Clinical or Epidemic Episodes
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+3
-5
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -105,10 +105,8 @@
|
||||
|
||||
<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"># data.table has a more limited version of %like%, so unload it:</span></span></span>
|
||||
<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/try.html" class="external-link">try</a></span><span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/detach.html" class="external-link">detach</a></span><span class="op">(</span><span class="st">"package:data.table"</span>, unload <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span>, silent <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
|
||||
<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>‘data.table’ namespace cannot be unloaded:</span>
|
||||
<span class="r-wrn co"><span class="r-pr">#></span> namespace ‘data.table’ is imported by ‘prodlim’ so cannot be unloaded</span>
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># data.table has a more limited version of %like%, so detach it (without unloading it, as data.table does not support being unloaded):</span></span></span>
|
||||
<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/try.html" class="external-link">try</a></span><span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/detach.html" class="external-link">detach</a></span><span class="op">(</span><span class="st">"package:data.table"</span><span class="op">)</span>, silent <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="va">a</span> <span class="op"><-</span> <span class="st">"This is a test"</span></span></span>
|
||||
<span class="r-in"><span><span class="va">b</span> <span class="op"><-</span> <span class="st">"TEST"</span></span></span>
|
||||
|
||||
+2
-4
@@ -86,10 +86,8 @@ inserted text will be iterated over `%like%` -\> `%unlike%` -\>
|
||||
## Examples
|
||||
|
||||
``` r
|
||||
# data.table has a more limited version of %like%, so unload it:
|
||||
try(detach("package:data.table", unload = TRUE), silent = TRUE)
|
||||
#> Warning: ‘data.table’ namespace cannot be unloaded:
|
||||
#> namespace ‘data.table’ is imported by ‘prodlim’ so cannot be unloaded
|
||||
# data.table has a more limited version of %like%, so detach it (without unloading it, as data.table does not support being unloaded):
|
||||
try(detach("package:data.table"), silent = TRUE)
|
||||
|
||||
a <- "This is a test"
|
||||
b <- "TEST"
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+28
-31
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -133,7 +133,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
|
||||
|
||||
<dt id="arg-only-all-tested">only_all_tested<a class="anchor" aria-label="anchor" href="#arg-only-all-tested"></a></dt>
|
||||
<dd><p>(for combination therapies, i.e. using more than one variable for <code>...</code>): a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate that isolates must be tested for all antimicrobials, see section <em>Combination Therapy</em> below.</p></dd>
|
||||
<dd><p>(for combination therapies, i.e. using more than one variable for <code>...</code>): a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate that isolates must be tested for all antimicrobials, see section <em>Combination Therapy</em> below. Use <code><a href="sir_combine.html">sir_combine()</a></code> to create a new variable for a combination therapy.</p></dd>
|
||||
|
||||
|
||||
<dt id="arg-guideline">guideline<a class="anchor" aria-label="anchor" href="#arg-guideline"></a></dt>
|
||||
@@ -186,35 +186,6 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
<p>Use <code>sir_confidence_interval()</code> to calculate the confidence interval, which relies on <code><a href="https://rdrr.io/r/stats/binom.test.html" class="external-link">binom.test()</a></code>, i.e., the Clopper-Pearson method. This function returns a vector of length 2 at default for antimicrobial <em>resistance</em>. Change the <code>side</code> argument to "left"/"min" or "right"/"max" to return a single value, and change the <code>ab_result</code> argument to e.g. <code>c("S", "I")</code> to test for antimicrobial <em>susceptibility</em>, see Examples.</p>
|
||||
<p>These functions are not meant to count isolates, but to calculate the proportion of resistance/susceptibility. Use the <code><a href="count.html">count_*()</a></code> functions to count isolates. The function <code>susceptibility()</code> is essentially equal to <code><a href="count.html">count_susceptible()</a></code><code>/</code><code><a href="count.html">count_all()</a></code>. <em>Low counts can influence the outcome - the <code>proportion_*()</code> functions may camouflage this, since they only return the proportion (albeit dependent on the <code>minimum</code> argument).</em></p>
|
||||
<p>The function <code>proportion_df()</code> takes any variable from <code>data</code> that has an <code><a href="as.sir.html">sir</a></code> class (created with <code><a href="as.sir.html">as.sir()</a></code>) and calculates the proportions S, I, and R. It also supports grouped variables. The function <code>sir_df()</code> works exactly like <code>proportion_df()</code>, but adds the number of isolates.</p>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="combination-therapy">Combination Therapy<a class="anchor" aria-label="anchor" href="#combination-therapy"></a></h2>
|
||||
|
||||
|
||||
<p>When using more than one variable for <code>...</code> (= combination therapy), use <code>only_all_tested</code> to only count isolates that are tested for all antimicrobials/variables that you test them for. See this example for two antimicrobials, Drug A and Drug B, about how <code>susceptibility()</code> works to calculate the %SI:</p>
|
||||
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span>
|
||||
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
|
||||
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="sc">-----------------------</span> <span class="sc">-----------------------</span></span>
|
||||
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> Drug A Drug B considered considered considered considered</span>
|
||||
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a> susceptible tested susceptible tested</span>
|
||||
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">-----------</span> <span class="sc">----------</span> <span class="sc">-----------</span> <span class="sc">----------</span></span>
|
||||
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> S or I S or I X X X X</span>
|
||||
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> R S or I X X X X</span>
|
||||
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> S or I X X <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> S or I R X X X X</span>
|
||||
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> R R <span class="sc">-</span> X <span class="sc">-</span> X</span>
|
||||
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> R <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a> S or I <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> X X <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-14"><a href="#cb1-14" tabindex="-1"></a> R <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-15"><a href="#cb1-15" tabindex="-1"></a> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span> <span class="sc">-</span></span>
|
||||
<span id="cb1-16"><a href="#cb1-16" tabindex="-1"></a><span class="sc">--------------------------------------------------------------------</span></span></code></pre><p></p></div>
|
||||
<p>Please note that, in combination therapies, for <code>only_all_tested = TRUE</code> applies that:</p>
|
||||
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="fu">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="ot">=</span> <span class="fu">count_all</span>()</span>
|
||||
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="ot">=</span> <span class="dv">1</span></span></code></pre><p></p></div>
|
||||
<p>and that, in combination therapies, for <code>only_all_tested = FALSE</code> applies that:</p>
|
||||
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a> <span class="fu">count_S</span>() <span class="sc">+</span> <span class="fu">count_I</span>() <span class="sc">+</span> <span class="fu">count_R</span>() <span class="sc">>=</span> <span class="fu">count_all</span>()</span>
|
||||
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> <span class="fu">proportion_S</span>() <span class="sc">+</span> <span class="fu">proportion_I</span>() <span class="sc">+</span> <span class="fu">proportion_R</span>() <span class="sc">>=</span> <span class="dv">1</span></span></code></pre><p></p></div>
|
||||
<p>Using <code>only_all_tested</code> has no impact when only using one antibiotic as input.</p>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="interpretation-of-sir">Interpretation of SIR<a class="anchor" aria-label="anchor" href="#interpretation-of-sir"></a></h2>
|
||||
@@ -222,6 +193,32 @@ resistance() should be used to calculate resistance, susceptibility() should be
|
||||
|
||||
<p>In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST) has decided to change the definitions of susceptibility testing categories S, I, and R (<a href="https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/definition-of-s-i-and-r/" class="external-link">https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/definition-of-s-i-and-r/</a>).</p>
|
||||
<p>This AMR package follows insight; use <code>susceptibility()</code> (equal to <code>proportion_SI()</code>) to determine antimicrobial susceptibility and <code><a href="count.html">count_susceptible()</a></code> (equal to <code><a href="count.html">count_SI()</a></code>) to count susceptible isolates.</p>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="combination-therapy">Combination Therapy<a class="anchor" aria-label="anchor" href="#combination-therapy"></a></h2>
|
||||
|
||||
|
||||
<p>A combination of antimicrobials is considered as good as its most active antimicrobial. Results are ranked as follows, from best to worst:</p><ol><li><p><code>"S"</code> and <code>"WT"</code></p></li>
|
||||
<li><p><code>"SDD"</code></p></li>
|
||||
<li><p><code>"I"</code></p></li>
|
||||
<li><p><code>"R"</code>, <code>"NWT"</code>, and <code>"NS"</code></p></li>
|
||||
</ol><p>The result of the combination is the best result of the antimicrobials, i.e., the result keeps its original category instead of being reduced to only S or R. If antimicrobials have an equally ranked result, <code>"S"</code> is preferred over <code>"WT"</code>, and <code>"R"</code> over <code>"NWT"</code> and <code>"NS"</code>. The value <code>"NI"</code> (non-interpretable) is considered a missing result.</p>
|
||||
<p>A missing result can only be ignored if the result of the combination is susceptible regardless of the missing result, which depends on the <code>only_all_tested</code> argument and on the guideline: under EUCAST, the 'I' category is considered susceptible (<em>susceptible, increased exposure</em>), and under CLSI, it is not. This is an example for two antimicrobials, Drug A and Drug B (the order of the antimicrobials does not matter):</p>
|
||||
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="sc">-------------------------------------------------------------------------</span></span>
|
||||
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> Result of the combination</span>
|
||||
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="sc">-----------------------------------------------------</span></span>
|
||||
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> Drug A Drug B only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
|
||||
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">----------------------------</span> <span class="sc">----------------------</span></span>
|
||||
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a> S S, I, R S S</span>
|
||||
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> I I, R I I</span>
|
||||
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> R R R R</span>
|
||||
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> S <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> S <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> I <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> <span class="fu">I</span> (EUCAST), <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> (CLSI) <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> R <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a><span class="sc">-------------------------------------------------------------------------</span></span></code></pre><p></p></div>
|
||||
<p>The <code><a href="count.html">count_*()</a></code> and <code>proportion_*()</code> functions, such as <code>susceptibility()</code> and <code>resistance()</code>, apply exactly these rules when more than one variable is used: an isolate is considered tested if the result of the combination is not <code>NA</code>, and is then counted by the result of the combination. Consequently, <code><a href="count.html">count_susceptible()</a></code> <code>+</code> <code><a href="count.html">count_resistant()</a></code> <code>=</code> <code><a href="count.html">count_all()</a></code>, and <code>susceptibility()</code> <code>+</code> <code>resistance()</code> <code>= 1</code>, for both values of <code>only_all_tested</code>. The guideline is taken from their <code>guideline</code> argument if they have one, and otherwise from the <code>AMR_guideline</code> option.</p>
|
||||
<p>In <code><a href="antibiogram.html">antibiogram()</a></code> and <code><a href="antibiogram.html">wisca()</a></code>, the 'I' and 'SDD' categories are considered susceptible if <code>combine_SI = TRUE</code> (default), and the result of the combination is then reduced to S or R.</p>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2>
|
||||
|
||||
+62
-41
@@ -100,7 +100,9 @@ sir_df(
|
||||
(for combination therapies, i.e. using more than one variable for
|
||||
`...`): a [logical](https://rdrr.io/r/base/logical.html) to indicate
|
||||
that isolates must be tested for all antimicrobials, see section
|
||||
*Combination Therapy* below.
|
||||
*Combination Therapy* below. Use
|
||||
[`sir_combine()`](https://amr-for-r.org/reference/sir_combine.md) to
|
||||
create a new variable for a combination therapy.
|
||||
|
||||
- guideline:
|
||||
|
||||
@@ -224,46 +226,6 @@ calculates the proportions S, I, and R. It also supports grouped
|
||||
variables. The function `sir_df()` works exactly like `proportion_df()`,
|
||||
but adds the number of isolates.
|
||||
|
||||
## Combination Therapy
|
||||
|
||||
When using more than one variable for `...` (= combination therapy), use
|
||||
`only_all_tested` to only count isolates that are tested for all
|
||||
antimicrobials/variables that you test them for. See this example for
|
||||
two antimicrobials, Drug A and Drug B, about how `susceptibility()`
|
||||
works to calculate the %SI:
|
||||
|
||||
--------------------------------------------------------------------
|
||||
only_all_tested = FALSE only_all_tested = TRUE
|
||||
----------------------- -----------------------
|
||||
Drug A Drug B considered considered considered considered
|
||||
susceptible tested susceptible tested
|
||||
-------- -------- ----------- ---------- ----------- ----------
|
||||
S or I S or I X X X X
|
||||
R S or I X X X X
|
||||
<NA> S or I X X - -
|
||||
S or I R X X X X
|
||||
R R - X - X
|
||||
<NA> R - - - -
|
||||
S or I <NA> X X - -
|
||||
R <NA> - - - -
|
||||
<NA> <NA> - - - -
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Please note that, in combination therapies, for `only_all_tested = TRUE`
|
||||
applies that:
|
||||
|
||||
count_S() + count_I() + count_R() = count_all()
|
||||
proportion_S() + proportion_I() + proportion_R() = 1
|
||||
|
||||
and that, in combination therapies, for `only_all_tested = FALSE`
|
||||
applies that:
|
||||
|
||||
count_S() + count_I() + count_R() >= count_all()
|
||||
proportion_S() + proportion_I() + proportion_R() >= 1
|
||||
|
||||
Using `only_all_tested` has no impact when only using one antibiotic as
|
||||
input.
|
||||
|
||||
## Interpretation of SIR
|
||||
|
||||
In 2019, the European Committee on Antimicrobial Susceptibility Testing
|
||||
@@ -277,6 +239,65 @@ This AMR package follows insight; use `susceptibility()` (equal to
|
||||
to [`count_SI()`](https://amr-for-r.org/reference/count.md)) to count
|
||||
susceptible isolates.
|
||||
|
||||
## Combination Therapy
|
||||
|
||||
A combination of antimicrobials is considered as good as its most active
|
||||
antimicrobial. Results are ranked as follows, from best to worst:
|
||||
|
||||
1. `"S"` and `"WT"`
|
||||
|
||||
2. `"SDD"`
|
||||
|
||||
3. `"I"`
|
||||
|
||||
4. `"R"`, `"NWT"`, and `"NS"`
|
||||
|
||||
The result of the combination is the best result of the antimicrobials,
|
||||
i.e., the result keeps its original category instead of being reduced to
|
||||
only S or R. If antimicrobials have an equally ranked result, `"S"` is
|
||||
preferred over `"WT"`, and `"R"` over `"NWT"` and `"NS"`. The value
|
||||
`"NI"` (non-interpretable) is considered a missing result.
|
||||
|
||||
A missing result can only be ignored if the result of the combination is
|
||||
susceptible regardless of the missing result, which depends on the
|
||||
`only_all_tested` argument and on the guideline: under EUCAST, the 'I'
|
||||
category is considered susceptible (*susceptible, increased exposure*),
|
||||
and under CLSI, it is not. This is an example for two antimicrobials,
|
||||
Drug A and Drug B (the order of the antimicrobials does not matter):
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Result of the combination
|
||||
-----------------------------------------------------
|
||||
Drug A Drug B only_all_tested = FALSE only_all_tested = TRUE
|
||||
-------- -------- ---------------------------- ----------------------
|
||||
S S, I, R S S
|
||||
I I, R I I
|
||||
R R R R
|
||||
S <NA> S <NA>
|
||||
I <NA> I (EUCAST), <NA> (CLSI) <NA>
|
||||
R <NA> <NA> <NA>
|
||||
<NA> <NA> <NA> <NA>
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
The [`count_*()`](https://amr-for-r.org/reference/count.md) and
|
||||
`proportion_*()` functions, such as `susceptibility()` and
|
||||
`resistance()`, apply exactly these rules when more than one variable is
|
||||
used: an isolate is considered tested if the result of the combination
|
||||
is not `NA`, and is then counted by the result of the combination.
|
||||
Consequently,
|
||||
[`count_susceptible()`](https://amr-for-r.org/reference/count.md) `+`
|
||||
[`count_resistant()`](https://amr-for-r.org/reference/count.md) `=`
|
||||
[`count_all()`](https://amr-for-r.org/reference/count.md), and
|
||||
`susceptibility()` `+` `resistance()` `= 1`, for both values of
|
||||
`only_all_tested`. The guideline is taken from their `guideline`
|
||||
argument if they have one, and otherwise from the `AMR_guideline`
|
||||
option.
|
||||
|
||||
In [`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md) and
|
||||
[`wisca()`](https://amr-for-r.org/reference/antibiogram.md), the 'I' and
|
||||
'SDD' categories are considered susceptible if `combine_SI = TRUE`
|
||||
(default), and the result of the combination is then reduced to S or R.
|
||||
|
||||
## References
|
||||
|
||||
**M39 Analysis and Presentation of Cumulative Antimicrobial
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
<!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>Combine SIR Results of Multiple Antimicrobials — sir_combine • 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="Combine SIR Results of Multiple Antimicrobials — sir_combine"><meta name="description" content="Combine the SIR results of two or more antimicrobials into one SIR result per isolate, e.g. to create a variable TZP_GEN for the combination therapy of piperacillin/tazobactam with gentamicin. The result is the best result of the antimicrobials, as a combination therapy covers the isolate if any of its antimicrobials is active. See Combination Therapy below for the exact rules.
|
||||
The same rules are used by antibiogram() and wisca() for combination antibiograms, and by the count_*() and proportion_*() functions when more than one variable is used, so the result of sir_combine() can be used in any further analysis."><meta property="og:description" content="Combine the SIR results of two or more antimicrobials into one SIR result per isolate, e.g. to create a variable TZP_GEN for the combination therapy of piperacillin/tazobactam with gentamicin. The result is the best result of the antimicrobials, as a combination therapy covers the isolate if any of its antimicrobials is active. See Combination Therapy below for the exact rules.
|
||||
The same rules are used by antibiogram() and wisca() for combination antibiograms, and by the count_*() and proportion_*() functions when more than one variable is used, so the result of sir_combine() can be used in any further analysis."><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>
|
||||
|
||||
|
||||
<nav class="navbar navbar-expand-lg fixed-top bg-primary" data-bs-theme="dark" aria-label="Site navigation"><div class="container">
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||
<ul class="navbar-nav me-auto"><li class="nav-item dropdown">
|
||||
<button class="nav-link dropdown-toggle" type="button" id="dropdown-how-to" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true"><span class="fa fa-question-circle"></span> How to</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdown-how-to"><li><a class="dropdown-item" href="../articles/AMR.html"><span class="fa fa-directions"></span> Conduct AMR Analysis</a></li>
|
||||
<li><a class="dropdown-item" href="../reference/antibiogram.html"><span class="fa fa-file-prescription"></span> Generate Antibiogram (Trad./Syndromic/WISCA)</a></li>
|
||||
<li><a class="dropdown-item" href="../articles/AMR_with_tidymodels.html"><span class="fa fa-square-root-variable"></span> Use AMR for Predictive Modelling (tidymodels)</a></li>
|
||||
<li><a class="dropdown-item" href="../articles/datasets.html"><span class="fa fa-database"></span> Download Data Sets for Own Use</a></li>
|
||||
<li><a class="dropdown-item" href="../reference/AMR-options.html"><span class="fa fa-gear"></span> Set User- Or Team-specific Package Settings</a></li>
|
||||
<li><a class="dropdown-item" href="../articles/PCA.html"><span class="fa fa-compress"></span> Conduct Principal Component Analysis for AMR</a></li>
|
||||
<li><a class="dropdown-item" href="../reference/mdro.html"><span class="fa fa-skull-crossbones"></span> Determine Multi-Drug Resistance (MDR)</a></li>
|
||||
<li><a class="dropdown-item" href="../articles/WHONET.html"><span class="fa fa-globe-americas"></span> Work with WHONET Data</a></li>
|
||||
<li><a class="dropdown-item" href="../articles/EUCAST.html"><span class="fa fa-exchange-alt"></span> Apply EUCAST Rules</a></li>
|
||||
<li><a class="dropdown-item" href="../reference/mo_property.html"><span class="fa fa-bug"></span> Get Taxonomy of a Microorganism</a></li>
|
||||
<li><a class="dropdown-item" href="../reference/ab_property.html"><span class="fa fa-capsules"></span> Get Properties of an Antibiotic Drug</a></li>
|
||||
<li><a class="dropdown-item" href="../reference/av_property.html"><span class="fa fa-capsules"></span> Get Properties of an Antiviral Drug</a></li>
|
||||
</ul></li>
|
||||
<li class="nav-item"><a class="nav-link" href="../articles/AMR_for_Python.html"><span class="fa fab fa-python"></span> AMR for Python</a></li>
|
||||
<li class="active nav-item"><a class="nav-link" href="../reference/index.html"><span class="fa fa-book-open"></span> Manual</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="../authors.html"><span class="fa fa-users"></span> Authors</a></li>
|
||||
</ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search">
|
||||
<input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li>
|
||||
<li class="nav-item"><a class="nav-link" href="../news/index.html"><span class="fa fa-newspaper"></span> Changelog</a></li>
|
||||
<li class="nav-item"><a class="external-link nav-link" href="https://github.com/msberends/AMR"><span class="fa fa-github"></span> Source Code</a></li>
|
||||
</ul></div>
|
||||
|
||||
|
||||
</div>
|
||||
</nav><div class="container template-reference-topic">
|
||||
<div class="row">
|
||||
<main id="main" class="col-md-9"><div class="page-header">
|
||||
<img src="../logo.svg" class="logo" alt=""><h1>Combine SIR Results of Multiple Antimicrobials</h1>
|
||||
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/R/sir_combine.R" class="external-link"><code>R/sir_combine.R</code></a></small>
|
||||
<div class="d-none name"><code>sir_combine.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description section level2">
|
||||
<p>Combine the SIR results of two or more antimicrobials into one SIR result per isolate, e.g. to create a variable <code>TZP_GEN</code> for the combination therapy of piperacillin/tazobactam with gentamicin. The result is the best result of the antimicrobials, as a combination therapy covers the isolate if any of its antimicrobials is active. See <em>Combination Therapy</em> below for the exact rules.</p>
|
||||
<p>The same rules are used by <code><a href="antibiogram.html">antibiogram()</a></code> and <code><a href="antibiogram.html">wisca()</a></code> for combination antibiograms, and by the <code><a href="count.html">count_*()</a></code> and <code><a href="proportion.html">proportion_*()</a></code> functions when more than one variable is used, so the result of <code>sir_combine()</code> can be used in any further analysis.</p>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">sir_combine</span><span class="op">(</span></span>
|
||||
<span> <span class="va">...</span>,</span>
|
||||
<span> only_all_tested <span class="op">=</span> <span class="cn">FALSE</span>,</span>
|
||||
<span> guideline <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_guideline"</span>, <span class="st">"EUCAST"</span><span class="op">)</span></span>
|
||||
<span><span class="op">)</span></span></code></pre></div>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||
|
||||
|
||||
<dl><dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt>
|
||||
<dd><p>Two or more vectors (or columns) with antimicrobial interpretations, or a data frame with such columns. They will be transformed internally with <code><a href="as.sir.html">as.sir()</a></code> if needed. All vectors must be of the same length.</p></dd>
|
||||
|
||||
|
||||
<dt id="arg-only-all-tested">only_all_tested<a class="anchor" aria-label="anchor" href="#arg-only-all-tested"></a></dt>
|
||||
<dd><p>A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate that isolates must be tested for all antimicrobials. If <code>TRUE</code>, the result is <code>NA</code> for isolates with a missing result for any of the antimicrobials. If <code>FALSE</code> (default), a missing result only leads to <code>NA</code> if a result for the missing antimicrobial could have changed the result of the combination, see <em>Combination Therapy</em> below.</p></dd>
|
||||
|
||||
|
||||
<dt id="arg-guideline">guideline<a class="anchor" aria-label="anchor" href="#arg-guideline"></a></dt>
|
||||
<dd><p>Either <code>"EUCAST"</code> (default) or <code>"CLSI"</code>, to determine whether the 'I' category is considered susceptible. This only affects isolates with a missing result for any of the antimicrobials when <code>only_all_tested = FALSE</code>, see <em>Combination Therapy</em> below. The default can be changed with the <code>AMR_guideline</code> option, see <a href="AMR-options.html">AMR-options</a>.</p></dd>
|
||||
|
||||
</dl></div>
|
||||
<div class="section level2">
|
||||
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||
<p>A <code><a href="as.sir.html">sir</a></code> vector with the same length as the input.</p>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="combination-therapy">Combination Therapy<a class="anchor" aria-label="anchor" href="#combination-therapy"></a></h2>
|
||||
|
||||
|
||||
<p>A combination of antimicrobials is considered as good as its most active antimicrobial. Results are ranked as follows, from best to worst:</p><ol><li><p><code>"S"</code> and <code>"WT"</code></p></li>
|
||||
<li><p><code>"SDD"</code></p></li>
|
||||
<li><p><code>"I"</code></p></li>
|
||||
<li><p><code>"R"</code>, <code>"NWT"</code>, and <code>"NS"</code></p></li>
|
||||
</ol><p>The result of the combination is the best result of the antimicrobials, i.e., the result keeps its original category instead of being reduced to only S or R. If antimicrobials have an equally ranked result, <code>"S"</code> is preferred over <code>"WT"</code>, and <code>"R"</code> over <code>"NWT"</code> and <code>"NS"</code>. The value <code>"NI"</code> (non-interpretable) is considered a missing result.</p>
|
||||
<p>A missing result can only be ignored if the result of the combination is susceptible regardless of the missing result, which depends on the <code>only_all_tested</code> argument and on the guideline: under EUCAST, the 'I' category is considered susceptible (<em>susceptible, increased exposure</em>), and under CLSI, it is not. This is an example for two antimicrobials, Drug A and Drug B (the order of the antimicrobials does not matter):</p>
|
||||
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="sc">-------------------------------------------------------------------------</span></span>
|
||||
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a> Result of the combination</span>
|
||||
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a> <span class="sc">-----------------------------------------------------</span></span>
|
||||
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a> Drug A Drug B only_all_tested <span class="ot">=</span> <span class="cn">FALSE</span> only_all_tested <span class="ot">=</span> <span class="cn">TRUE</span></span>
|
||||
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a><span class="sc">--------</span> <span class="sc">--------</span> <span class="sc">----------------------------</span> <span class="sc">----------------------</span></span>
|
||||
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a> S S, I, R S S</span>
|
||||
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a> I I, R I I</span>
|
||||
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> R R R R</span>
|
||||
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> S <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> S <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> I <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> <span class="fu">I</span> (EUCAST), <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> (CLSI) <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> R <span class="sc"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span> <span class="er"><</span><span class="cn">NA</span><span class="sc">></span></span>
|
||||
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a><span class="sc">-------------------------------------------------------------------------</span></span></code></pre><p></p></div>
|
||||
<p>The <code><a href="count.html">count_*()</a></code> and <code><a href="proportion.html">proportion_*()</a></code> functions, such as <code><a href="proportion.html">susceptibility()</a></code> and <code><a href="proportion.html">resistance()</a></code>, apply exactly these rules when more than one variable is used: an isolate is considered tested if the result of the combination is not <code>NA</code>, and is then counted by the result of the combination. Consequently, <code><a href="count.html">count_susceptible()</a></code> <code>+</code> <code><a href="count.html">count_resistant()</a></code> <code>=</code> <code><a href="count.html">count_all()</a></code>, and <code><a href="proportion.html">susceptibility()</a></code> <code>+</code> <code><a href="proportion.html">resistance()</a></code> <code>= 1</code>, for both values of <code>only_all_tested</code>. The guideline is taken from their <code>guideline</code> argument if they have one, and otherwise from the <code>AMR_guideline</code> option.</p>
|
||||
<p>In <code><a href="antibiogram.html">antibiogram()</a></code> and <code><a href="antibiogram.html">wisca()</a></code>, the 'I' and 'SDD' categories are considered susceptible if <code>combine_SI = TRUE</code> (default), and the result of the combination is then reduced to S or R.</p>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
|
||||
<div class="dont-index"><p><code><a href="count.html">count()</a></code> and <code><a href="proportion.html">proportion()</a></code> for counting and calculating susceptibility of (combinations of) antimicrobials, and <code><a href="antibiogram.html">antibiogram()</a></code> for combination antibiograms.</p></div>
|
||||
</div>
|
||||
|
||||
<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="va">drug_a</span> <span class="op"><-</span> <span class="fu"><a href="as.sir.html">as.sir</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="st">"S"</span>, <span class="st">"R"</span>, <span class="st">"R"</span>, <span class="st">"I"</span>, <span class="st">"I"</span>, <span class="cn">NA</span>, <span class="st">"R"</span>, <span class="st">"SDD"</span><span class="op">)</span><span class="op">)</span></span></span>
|
||||
<span class="r-in"><span><span class="va">drug_b</span> <span class="op"><-</span> <span class="fu"><a href="as.sir.html">as.sir</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="st">"R"</span>, <span class="st">"S"</span>, <span class="st">"R"</span>, <span class="st">"R"</span>, <span class="cn">NA</span>, <span class="cn">NA</span>, <span class="cn">NA</span>, <span class="st">"I"</span><span class="op">)</span><span class="op">)</span></span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="fu">sir_combine</span><span class="op">(</span><span class="va">drug_a</span>, <span class="va">drug_b</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> Class <span style="color: #0000BB;"><sir></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] S S R I I <NA> <NA> SDD </span>
|
||||
<span class="r-in"><span><span class="fu">sir_combine</span><span class="op">(</span><span class="va">drug_a</span>, <span class="va">drug_b</span>, guideline <span class="op">=</span> <span class="st">"CLSI"</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> Class <span style="color: #0000BB;"><sir></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] S S R I <NA> <NA> <NA> SDD </span>
|
||||
<span class="r-in"><span><span class="fu">sir_combine</span><span class="op">(</span><span class="va">drug_a</span>, <span class="va">drug_b</span>, only_all_tested <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> Class <span style="color: #0000BB;"><sir></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] S S R I <NA> <NA> <NA> SDD </span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co"># the count and proportion functions use the same rules</span></span></span>
|
||||
<span class="r-in"><span><span class="fu"><a href="proportion.html">susceptibility</a></span><span class="op">(</span><span class="va">drug_a</span>, <span class="va">drug_b</span>, minimum <span class="op">=</span> <span class="fl">0</span><span class="op">)</span></span></span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> Note that `proportion_SI()` will also include dose-dependent susceptibility,</span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> <span style="color: #0000BB;">"SDD"</span>. This note will be shown once for this session.</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] 0.8333333</span>
|
||||
<span class="r-in"><span><span class="fu"><a href="proportion.html">susceptibility</a></span><span class="op">(</span><span class="fu">sir_combine</span><span class="op">(</span><span class="va">drug_a</span>, <span class="va">drug_b</span><span class="op">)</span>, minimum <span class="op">=</span> <span class="fl">0</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] 0.8333333</span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co"># \donttest{</span></span></span>
|
||||
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
|
||||
<span class="r-in"><span> <span class="co"># create a new variable for piperacillin/tazobactam + gentamicin</span></span></span>
|
||||
<span class="r-in"><span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span></span></span>
|
||||
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html" class="external-link">mutate</a></span><span class="op">(</span>TZP_GEN <span class="op">=</span> <span class="fu">sir_combine</span><span class="op">(</span><span class="va">TZP</span>, <span class="va">GEN</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span></span></span>
|
||||
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">select</a></span><span class="op">(</span><span class="va">mo</span>, <span class="va">TZP</span>, <span class="va">GEN</span>, <span class="va">TZP_GEN</span><span class="op">)</span></span></span>
|
||||
<span class="r-in"><span><span class="op">}</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># A tibble: 2,000 × 4</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> mo TZP GEN TZP_GEN</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494; font-style: italic;"><mo></span> <span style="color: #949494; font-style: italic;"><sir></span> <span style="color: #949494; font-style: italic;"><sir></span> <span style="color: #949494; font-style: italic;"><sir></span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 1</span> <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI <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">#></span> <span style="color: #BCBCBC;"> 2</span> <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI <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">#></span> <span style="color: #BCBCBC;"> 3</span> <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>EPDR <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">#></span> <span style="color: #BCBCBC;"> 4</span> <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>EPDR <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">#></span> <span style="color: #BCBCBC;"> 5</span> <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>EPDR <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">#></span> <span style="color: #BCBCBC;"> 6</span> <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>EPDR <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">#></span> <span style="color: #BCBCBC;"> 7</span> <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>AURS <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">#></span> <span style="color: #BCBCBC;"> 8</span> <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>AURS <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">#></span> <span style="color: #BCBCBC;"> 9</span> <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>EPDR <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">#></span> <span style="color: #BCBCBC;">10</span> <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>EPDR <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">#></span> <span style="color: #949494;"># ℹ 1,990 more rows</span></span>
|
||||
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
|
||||
<span class="r-in"><span> <span class="co"># combine any number of antimicrobials</span></span></span>
|
||||
<span class="r-in"><span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span></span></span>
|
||||
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html" class="external-link">mutate</a></span><span class="op">(</span>any_aminoglycoside <span class="op">=</span> <span class="fu">sir_combine</span><span class="op">(</span><span class="va">GEN</span>, <span class="va">TOB</span>, <span class="va">AMK</span>, <span class="va">KAN</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span></span></span>
|
||||
<span class="r-in"><span> <span class="fu"><a href="count.html">count</a></span><span class="op">(</span><span class="va">any_aminoglycoside</span><span class="op">)</span></span></span>
|
||||
<span class="r-in"><span><span class="op">}</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># A tibble: 4 × 2</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> any_aminoglycoside n</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494; font-style: italic;"><sir></span> <span style="color: #949494; font-style: italic;"><int></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">1</span> <span style="color: #080808; background-color: #5FD7AF;"> S </span> <span style="text-decoration: underline;">1</span>383</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">2</span> <span style="color: #080808; background-color: #AFFFD7;"> I </span> 24</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">3</span> <span style="color: #080808; background-color: #FF5F5F;"> R </span> 427</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">4</span> <span style="color: #949494;"> NA</span> 166</span>
|
||||
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
|
||||
<span class="r-in"><span> <span class="co"># use the new variable in further analyses</span></span></span>
|
||||
<span class="r-in"><span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span></span></span>
|
||||
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html" class="external-link">mutate</a></span><span class="op">(</span>TZP_GEN <span class="op">=</span> <span class="fu">sir_combine</span><span class="op">(</span><span class="va">TZP</span>, <span class="va">GEN</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span></span></span>
|
||||
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">ward</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span></span></span>
|
||||
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise</a></span><span class="op">(</span></span></span>
|
||||
<span class="r-in"><span> TZP <span class="op">=</span> <span class="fu"><a href="proportion.html">susceptibility</a></span><span class="op">(</span><span class="va">TZP</span><span class="op">)</span>,</span></span>
|
||||
<span class="r-in"><span> TZP_GEN <span class="op">=</span> <span class="fu"><a href="proportion.html">susceptibility</a></span><span class="op">(</span><span class="va">TZP_GEN</span><span class="op">)</span></span></span>
|
||||
<span class="r-in"><span> <span class="op">)</span></span></span>
|
||||
<span class="r-in"><span><span class="op">}</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># A tibble: 3 × 3</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> ward TZP TZP_GEN</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><dbl></span> <span style="color: #949494; font-style: italic;"><dbl></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">1</span> Clinical 0.898 0.986</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">2</span> ICU 0.819 0.962</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">3</span> Outpatient 0.894 0.991</span>
|
||||
<span class="r-in"><span><span class="co"># }</span></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>
|
||||
</nav></aside></div>
|
||||
|
||||
|
||||
<footer><div class="pkgdown-footer-left">
|
||||
<p><code>AMR</code> (for R). Free and open-source, licenced under the <a target="_blank" href="https://github.com/msberends/AMR/blob/main/LICENSE" class="external-link">GNU GPL 2.0</a>. Developed at the <a target="_blank" href="https://www.rug.nl" class="external-link">University of Groningen</a> and <a target="_blank" href="https://www.umcg.nl" class="external-link">University Medical Center Groningen</a> in the Netherlands, in collaboration with <a href="https://amr-for-r.org/authors.html">many colleagues from around the world</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown-footer-right">
|
||||
<p><a target="_blank" href="https://www.rug.nl" class="external-link"><img src="https://amr-for-r.org/logo_rug.svg" style="max-width: 150px;"></a><a target="_blank" href="https://www.umcg.nl" class="external-link"><img src="https://amr-for-r.org/logo_umcg.svg" style="max-width: 150px;"></a></p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
# Combine SIR Results of Multiple Antimicrobials
|
||||
|
||||
Combine the SIR results of two or more antimicrobials into one SIR
|
||||
result per isolate, e.g. to create a variable `TZP_GEN` for the
|
||||
combination therapy of piperacillin/tazobactam with gentamicin. The
|
||||
result is the best result of the antimicrobials, as a combination
|
||||
therapy covers the isolate if any of its antimicrobials is active. See
|
||||
*Combination Therapy* below for the exact rules.
|
||||
|
||||
The same rules are used by
|
||||
[`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md) and
|
||||
[`wisca()`](https://amr-for-r.org/reference/antibiogram.md) for
|
||||
combination antibiograms, and by the
|
||||
[`count_*()`](https://amr-for-r.org/reference/count.md) and
|
||||
[`proportion_*()`](https://amr-for-r.org/reference/proportion.md)
|
||||
functions when more than one variable is used, so the result of
|
||||
`sir_combine()` can be used in any further analysis.
|
||||
|
||||
## Usage
|
||||
|
||||
``` r
|
||||
sir_combine(
|
||||
...,
|
||||
only_all_tested = FALSE,
|
||||
guideline = getOption("AMR_guideline", "EUCAST")
|
||||
)
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- ...:
|
||||
|
||||
Two or more vectors (or columns) with antimicrobial interpretations,
|
||||
or a data frame with such columns. They will be transformed internally
|
||||
with [`as.sir()`](https://amr-for-r.org/reference/as.sir.md) if
|
||||
needed. All vectors must be of the same length.
|
||||
|
||||
- only_all_tested:
|
||||
|
||||
A [logical](https://rdrr.io/r/base/logical.html) to indicate that
|
||||
isolates must be tested for all antimicrobials. If `TRUE`, the result
|
||||
is `NA` for isolates with a missing result for any of the
|
||||
antimicrobials. If `FALSE` (default), a missing result only leads to
|
||||
`NA` if a result for the missing antimicrobial could have changed the
|
||||
result of the combination, see *Combination Therapy* below.
|
||||
|
||||
- guideline:
|
||||
|
||||
Either `"EUCAST"` (default) or `"CLSI"`, to determine whether the 'I'
|
||||
category is considered susceptible. This only affects isolates with a
|
||||
missing result for any of the antimicrobials when
|
||||
`only_all_tested = FALSE`, see *Combination Therapy* below. The
|
||||
default can be changed with the `AMR_guideline` option, see
|
||||
[AMR-options](https://amr-for-r.org/reference/AMR-options.md).
|
||||
|
||||
## Value
|
||||
|
||||
A [`sir`](https://amr-for-r.org/reference/as.sir.md) vector with the
|
||||
same length as the input.
|
||||
|
||||
## Combination Therapy
|
||||
|
||||
A combination of antimicrobials is considered as good as its most active
|
||||
antimicrobial. Results are ranked as follows, from best to worst:
|
||||
|
||||
1. `"S"` and `"WT"`
|
||||
|
||||
2. `"SDD"`
|
||||
|
||||
3. `"I"`
|
||||
|
||||
4. `"R"`, `"NWT"`, and `"NS"`
|
||||
|
||||
The result of the combination is the best result of the antimicrobials,
|
||||
i.e., the result keeps its original category instead of being reduced to
|
||||
only S or R. If antimicrobials have an equally ranked result, `"S"` is
|
||||
preferred over `"WT"`, and `"R"` over `"NWT"` and `"NS"`. The value
|
||||
`"NI"` (non-interpretable) is considered a missing result.
|
||||
|
||||
A missing result can only be ignored if the result of the combination is
|
||||
susceptible regardless of the missing result, which depends on the
|
||||
`only_all_tested` argument and on the guideline: under EUCAST, the 'I'
|
||||
category is considered susceptible (*susceptible, increased exposure*),
|
||||
and under CLSI, it is not. This is an example for two antimicrobials,
|
||||
Drug A and Drug B (the order of the antimicrobials does not matter):
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Result of the combination
|
||||
-----------------------------------------------------
|
||||
Drug A Drug B only_all_tested = FALSE only_all_tested = TRUE
|
||||
-------- -------- ---------------------------- ----------------------
|
||||
S S, I, R S S
|
||||
I I, R I I
|
||||
R R R R
|
||||
S <NA> S <NA>
|
||||
I <NA> I (EUCAST), <NA> (CLSI) <NA>
|
||||
R <NA> <NA> <NA>
|
||||
<NA> <NA> <NA> <NA>
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
The [`count_*()`](https://amr-for-r.org/reference/count.md) and
|
||||
[`proportion_*()`](https://amr-for-r.org/reference/proportion.md)
|
||||
functions, such as
|
||||
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md) and
|
||||
[`resistance()`](https://amr-for-r.org/reference/proportion.md), apply
|
||||
exactly these rules when more than one variable is used: an isolate is
|
||||
considered tested if the result of the combination is not `NA`, and is
|
||||
then counted by the result of the combination. Consequently,
|
||||
[`count_susceptible()`](https://amr-for-r.org/reference/count.md) `+`
|
||||
[`count_resistant()`](https://amr-for-r.org/reference/count.md) `=`
|
||||
[`count_all()`](https://amr-for-r.org/reference/count.md), and
|
||||
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md) `+`
|
||||
[`resistance()`](https://amr-for-r.org/reference/proportion.md) `= 1`,
|
||||
for both values of `only_all_tested`. The guideline is taken from their
|
||||
`guideline` argument if they have one, and otherwise from the
|
||||
`AMR_guideline` option.
|
||||
|
||||
In [`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md) and
|
||||
[`wisca()`](https://amr-for-r.org/reference/antibiogram.md), the 'I' and
|
||||
'SDD' categories are considered susceptible if `combine_SI = TRUE`
|
||||
(default), and the result of the combination is then reduced to S or R.
|
||||
|
||||
## See also
|
||||
|
||||
[`count()`](https://amr-for-r.org/reference/count.md) and
|
||||
[`proportion()`](https://amr-for-r.org/reference/proportion.md) for
|
||||
counting and calculating susceptibility of (combinations of)
|
||||
antimicrobials, and
|
||||
[`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md) for
|
||||
combination antibiograms.
|
||||
|
||||
## Examples
|
||||
|
||||
``` r
|
||||
drug_a <- as.sir(c("S", "R", "R", "I", "I", NA, "R", "SDD"))
|
||||
drug_b <- as.sir(c("R", "S", "R", "R", NA, NA, NA, "I"))
|
||||
|
||||
sir_combine(drug_a, drug_b)
|
||||
#> Class <sir>
|
||||
#> [1] S S R I I <NA> <NA> SDD
|
||||
sir_combine(drug_a, drug_b, guideline = "CLSI")
|
||||
#> Class <sir>
|
||||
#> [1] S S R I <NA> <NA> <NA> SDD
|
||||
sir_combine(drug_a, drug_b, only_all_tested = TRUE)
|
||||
#> Class <sir>
|
||||
#> [1] S S R I <NA> <NA> <NA> SDD
|
||||
|
||||
# the count and proportion functions use the same rules
|
||||
susceptibility(drug_a, drug_b, minimum = 0)
|
||||
#> Note that `proportion_SI()` will also include dose-dependent susceptibility,
|
||||
#> "SDD". This note will be shown once for this session.
|
||||
#> [1] 0.8333333
|
||||
susceptibility(sir_combine(drug_a, drug_b), minimum = 0)
|
||||
#> [1] 0.8333333
|
||||
|
||||
# \donttest{
|
||||
if (require("dplyr")) {
|
||||
# create a new variable for piperacillin/tazobactam + gentamicin
|
||||
example_isolates %>%
|
||||
mutate(TZP_GEN = sir_combine(TZP, GEN)) %>%
|
||||
select(mo, TZP, GEN, TZP_GEN)
|
||||
}
|
||||
#> # A tibble: 2,000 × 4
|
||||
#> mo TZP GEN TZP_GEN
|
||||
#> <mo> <sir> <sir> <sir>
|
||||
#> 1 B_ESCHR_COLI NA NA NA
|
||||
#> 2 B_ESCHR_COLI NA NA NA
|
||||
#> 3 B_STPHY_EPDR NA NA NA
|
||||
#> 4 B_STPHY_EPDR NA NA NA
|
||||
#> 5 B_STPHY_EPDR NA NA NA
|
||||
#> 6 B_STPHY_EPDR NA NA NA
|
||||
#> 7 B_STPHY_AURS NA NA NA
|
||||
#> 8 B_STPHY_AURS NA NA NA
|
||||
#> 9 B_STPHY_EPDR NA NA NA
|
||||
#> 10 B_STPHY_EPDR NA NA NA
|
||||
#> # ℹ 1,990 more rows
|
||||
if (require("dplyr")) {
|
||||
# combine any number of antimicrobials
|
||||
example_isolates %>%
|
||||
mutate(any_aminoglycoside = sir_combine(GEN, TOB, AMK, KAN)) %>%
|
||||
count(any_aminoglycoside)
|
||||
}
|
||||
#> # A tibble: 4 × 2
|
||||
#> any_aminoglycoside n
|
||||
#> <sir> <int>
|
||||
#> 1 S 1383
|
||||
#> 2 I 24
|
||||
#> 3 R 427
|
||||
#> 4 NA 166
|
||||
if (require("dplyr")) {
|
||||
# use the new variable in further analyses
|
||||
example_isolates %>%
|
||||
mutate(TZP_GEN = sir_combine(TZP, GEN)) %>%
|
||||
group_by(ward) %>%
|
||||
summarise(
|
||||
TZP = susceptibility(TZP),
|
||||
TZP_GEN = susceptibility(TZP_GEN)
|
||||
)
|
||||
}
|
||||
#> # A tibble: 3 × 3
|
||||
#> ward TZP TZP_GEN
|
||||
#> <chr> <dbl> <dbl>
|
||||
#> 1 Clinical 0.898 0.986
|
||||
#> 2 ICU 0.819 0.962
|
||||
#> 3 Outpatient 0.894 0.991
|
||||
# }
|
||||
```
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -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.9115</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9116</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
[{"path":"https://amr-for-r.org/CLAUDE.html","id":null,"dir":"","previous_headings":"","what":"CLAUDE.md — AMR R Package","title":"CLAUDE.md — AMR R Package","text":"file provides context Claude Code working repository.","code":""},{"path":"https://amr-for-r.org/CLAUDE.html","id":"project-overview","dir":"","previous_headings":"","what":"Project Overview","title":"CLAUDE.md — AMR R Package","text":"AMR zero-dependency R package antimicrobial resistance (AMR) data analysis using One Health approach. peer-reviewed, used 175+ countries, supports 28 languages. Key capabilities: - SIR (Susceptible/Intermediate/Resistant) classification using EUCAST 2011–2025 CLSI 2011–2025 breakpoints - Antibiogram generation: traditional, combined, syndromic, WISCA - Microorganism taxonomy database (~79,000 species) - Antimicrobial drug database (~620 drugs) - Multi-drug resistant organism (MDRO) classification - First-isolate identification - Minimum Inhibitory Concentration (MIC) disk diffusion handling - Multilingual output (28 languages)","code":""},{"path":"https://amr-for-r.org/CLAUDE.html","id":"common-commands","dir":"","previous_headings":"","what":"Common Commands","title":"CLAUDE.md — AMR R Package","text":"commands run inside R session: shell:","code":"# Rebuild documentation (roxygen2 → .Rd files + NAMESPACE) devtools::document() # Run all tests devtools::test() # Full package check (CRAN-level: docs + tests + checks) devtools::check() # Build pkgdown website locally pkgdown::build_site() # Code coverage report covr::package_coverage() # CRAN check from parent directory R CMD check AMR"},{"path":"https://amr-for-r.org/CLAUDE.html","id":"repository-structure","dir":"","previous_headings":"","what":"Repository Structure","title":"CLAUDE.md — AMR R Package","text":"","code":"R/ # All R source files (62 files, ~28,000 lines) man/ # Auto-generated .Rd documentation (do not edit manually) tests/testthat/ # testthat test files (test-*.R) and helper-functions.R data/ # Pre-compiled .rda datasets data-raw/ # Scripts used to generate data/ files vignettes/ # Rmd vignette articles inst/ # Installed files (translations, etc.) _pkgdown.yml # pkgdown website configuration"},{"path":"https://amr-for-r.org/CLAUDE.html","id":"r-source-file-conventions","dir":"","previous_headings":"","what":"R Source File Conventions","title":"CLAUDE.md — AMR R Package","text":"Naming conventions R/: Key source files: aa_helper_functions.R / aa_helper_pm_functions.R — internal utility functions (large; ~63 KB ~37 KB) aa_globals.R — global constants breakpoint lookup structures aa_options.R — amr_options() / get_AMR_option() system mo.R / mo_property.R — microorganism lookup properties ab.R / ab_property.R — antimicrobial drug functions av.R / av_property.R — antiviral drug functions sir.R / sir_calc.R / sir_df.R — SIR classification engine mic.R / disk.R — MIC disk diffusion classes antibiogram.R — antibiogram generation (traditional, combined, syndromic, WISCA) first_isolate.R — first-isolate identification algorithms mdro.R — MDRO classification (EUCAST, CLSI, CDC, custom guidelines) amr_selectors.R — tidyselect helpers selecting AMR columns interpretive_rules.R / custom_eucast_rules.R — clinical interpretation rules translate.R — 28-language translation system ggplot_sir.R / ggplot_pca.R / plotting.R — visualisation functions","code":""},{"path":"https://amr-for-r.org/CLAUDE.html","id":"code-style","dir":"","previous_headings":"","what":"Code Style","title":"CLAUDE.md — AMR R Package","text":"Follow tidyverse style guide precisely. Key rules: 2-space indentation; tabs <- assignment, = Spaces around binary operators commas; spaces inside parentheses function call must break across lines, place first argument new line indented 2 spaces, put closing ) line — never align arguments opening parenthesis (hanging/forced mid-line indentation)","code":"# 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\")"},{"path":"https://amr-for-r.org/CLAUDE.html","id":"custom-s3-classes","dir":"","previous_headings":"","what":"Custom S3 Classes","title":"CLAUDE.md — AMR R Package","text":"package defines five S3 classes full print/format/plot/vctrs support:","code":""},{"path":"https://amr-for-r.org/CLAUDE.html","id":"data-files","dir":"","previous_headings":"","what":"Data Files","title":"CLAUDE.md — AMR R Package","text":"Pre-compiled data/ (edit directly; regenerate via data-raw/ scripts):","code":""},{"path":"https://amr-for-r.org/CLAUDE.html","id":"zero-dependency-design","dir":"","previous_headings":"","what":"Zero-Dependency Design","title":"CLAUDE.md — AMR R Package","text":"package Imports DESCRIPTION. optional integrations (ggplot2, dplyr, data.table, tidymodels, cli, crayon, etc.) listed Suggests guarded : Line truncated
|
||||
[{"path":"https://amr-for-r.org/CLAUDE.html","id":null,"dir":"","previous_headings":"","what":"CLAUDE.md — AMR R Package","title":"CLAUDE.md — AMR R Package","text":"file provides context Claude Code working repository.","code":""},{"path":"https://amr-for-r.org/CLAUDE.html","id":"project-overview","dir":"","previous_headings":"","what":"Project Overview","title":"CLAUDE.md — AMR R Package","text":"AMR zero-dependency R package antimicrobial resistance (AMR) data analysis using One Health approach. peer-reviewed, used 175+ countries, supports 28 languages. Key capabilities: - SIR (Susceptible/Intermediate/Resistant) classification using EUCAST 2011–2025 CLSI 2011–2025 breakpoints - Antibiogram generation: traditional, combined, syndromic, WISCA - Microorganism taxonomy database (~79,000 species) - Antimicrobial drug database (~620 drugs) - Multi-drug resistant organism (MDRO) classification - First-isolate identification - Minimum Inhibitory Concentration (MIC) disk diffusion handling - Multilingual output (28 languages)","code":""},{"path":"https://amr-for-r.org/CLAUDE.html","id":"common-commands","dir":"","previous_headings":"","what":"Common Commands","title":"CLAUDE.md — AMR R Package","text":"commands run inside R session: shell:","code":"# Rebuild documentation (roxygen2 → .Rd files + NAMESPACE) devtools::document() # Run all tests devtools::test() # Full package check (CRAN-level: docs + tests + checks) devtools::check() # Build pkgdown website locally pkgdown::build_site() # Code coverage report covr::package_coverage() # CRAN check from parent directory R CMD check AMR"},{"path":"https://amr-for-r.org/CLAUDE.html","id":"repository-structure","dir":"","previous_headings":"","what":"Repository Structure","title":"CLAUDE.md — AMR R Package","text":"","code":"R/ # All R source files (62 files, ~28,000 lines) man/ # Auto-generated .Rd documentation (do not edit manually) tests/testthat/ # testthat test files (test-*.R) and helper-functions.R data/ # Pre-compiled .rda datasets data-raw/ # Scripts used to generate data/ files vignettes/ # Rmd vignette articles inst/ # Installed files (translations, etc.) _pkgdown.yml # pkgdown website configuration"},{"path":"https://amr-for-r.org/CLAUDE.html","id":"r-source-file-conventions","dir":"","previous_headings":"","what":"R Source File Conventions","title":"CLAUDE.md — AMR R Package","text":"Naming conventions R/: Key source files: aa_helper_functions.R / aa_helper_pm_functions.R — internal utility functions (large; ~63 KB ~37 KB) aa_globals.R — global constants breakpoint lookup structures aa_options.R — amr_options() / get_AMR_option() system mo.R / mo_property.R — microorganism lookup properties ab.R / ab_property.R — antimicrobial drug functions av.R / av_property.R — antiviral drug functions sir.R / sir_calc.R / sir_df.R — SIR classification engine mic.R / disk.R — MIC disk diffusion classes antibiogram.R — antibiogram generation (traditional, combined, syndromic, WISCA) first_isolate.R — first-isolate identification algorithms mdro.R — MDRO classification (EUCAST, CLSI, CDC, custom guidelines) amr_selectors.R — tidyselect helpers selecting AMR columns interpretive_rules.R / custom_eucast_rules.R — clinical interpretation rules translate.R — 28-language translation system ggplot_sir.R / ggplot_pca.R / plotting.R — visualisation functions","code":""},{"path":"https://amr-for-r.org/CLAUDE.html","id":"code-style","dir":"","previous_headings":"","what":"Code Style","title":"CLAUDE.md — AMR R Package","text":"Follow tidyverse style guide precisely. Key rules: 2-space indentation; tabs <- assignment, = Spaces around binary operators commas; spaces inside parentheses function call must break across lines, place first argument new line indented 2 spaces, put closing ) line — never align arguments opening parenthesis (hanging/forced mid-line indentation)","code":"# 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\")"},{"path":"https://amr-for-r.org/CLAUDE.html","id":"custom-s3-classes","dir":"","previous_headings":"","what":"Custom S3 Classes","title":"CLAUDE.md — AMR R Package","text":"package defines five S3 classes full print/format/plot/vctrs support:","code":""},{"path":"https://amr-for-r.org/CLAUDE.html","id":"data-files","dir":"","previous_headings":"","what":"Data Files","title":"CLAUDE.md — AMR R Package","text":"Pre-compiled data/ (edit directly; regenerate via data-raw/ scripts):","code":""},{"path":"https://amr-for-r.org/CLAUDE.html","id":"zero-dependency-design","dir":"","previous_headings":"","what":"Zero-Dependency Design","title":"CLAUDE.md — AMR R Package","text":"package Imports DESCRIPTION. optional integrations (ggplot2, dplyr, data.table, tidymodels, cli, crayon, etc.) listed Suggests guarded : Line truncated
|
||||
@@ -77,6 +77,7 @@
|
||||
<url><loc>https://amr-for-r.org/reference/proportion.html</loc></url>
|
||||
<url><loc>https://amr-for-r.org/reference/random.html</loc></url>
|
||||
<url><loc>https://amr-for-r.org/reference/resistance_predict.html</loc></url>
|
||||
<url><loc>https://amr-for-r.org/reference/sir_combine.html</loc></url>
|
||||
<url><loc>https://amr-for-r.org/reference/skewness.html</loc></url>
|
||||
<url><loc>https://amr-for-r.org/reference/top_n_microorganisms.html</loc></url>
|
||||
<url><loc>https://amr-for-r.org/reference/translate.html</loc></url>
|
||||
|
||||
Reference in new issue
Block a user