mirror of
https://github.com/msberends/AMR.git
synced 2026-06-01 05:41:46 +02:00
Built site for AMR@3.0.1.9053: 23beebc
This commit is contained in:
2
404.html
2
404.html
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
42
CLAUDE.html
42
CLAUDE.html
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -73,7 +73,7 @@
|
||||
<span><span class="fu">pkgdown</span><span class="fu">::</span><span class="fu"><a href="https://pkgdown.r-lib.org/reference/build_site.html" class="external-link">build_site</a></span><span class="op">(</span><span class="op">)</span></span>
|
||||
<span></span>
|
||||
<span><span class="co"># Code coverage report</span></span>
|
||||
<span><span class="fu">covr</span><span class="fu">::</span><span class="fu"><a href="http://covr.r-lib.org/reference/package_coverage.html" class="external-link">package_coverage</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div>
|
||||
<span><span class="fu">covr</span><span class="fu">::</span><span class="fu">package_coverage</span><span class="op">(</span><span class="op">)</span></span></code></pre></div>
|
||||
<p>From the shell:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" tabindex="-1"></a><span class="co"># CRAN check from parent directory</span></span>
|
||||
<span id="cb2-2"><a href="#cb2-2" tabindex="-1"></a><span class="ex">R</span> CMD check AMR</span></code></pre></div>
|
||||
@@ -92,13 +92,13 @@ _pkgdown.yml # pkgdown website configuration</code></pre>
|
||||
<div class="section level2">
|
||||
<h2 id="r-source-file-conventions">R Source File Conventions<a class="anchor" aria-label="anchor" href="#r-source-file-conventions"></a></h2>
|
||||
<p><strong>Naming conventions in <code>R/</code>:</strong></p>
|
||||
<table class="table"><thead><tr class="header"><th>Prefix/Name</th>
|
||||
<table class="table"><thead><tr><th>Prefix/Name</th>
|
||||
<th>Purpose</th>
|
||||
</tr></thead><tbody><tr class="odd"><td><code>aa_*.R</code></td>
|
||||
</tr></thead><tbody><tr><td><code>aa_*.R</code></td>
|
||||
<td>Loaded first (helpers, globals, options, package docs)</td>
|
||||
</tr><tr class="even"><td><code>zz_deprecated.R</code></td>
|
||||
</tr><tr><td><code>zz_deprecated.R</code></td>
|
||||
<td>Deprecated function wrappers</td>
|
||||
</tr><tr class="odd"><td><code>zzz.R</code></td>
|
||||
</tr><tr><td><code>zzz.R</code></td>
|
||||
<td>
|
||||
<code>.onLoad</code> / <code>.onAttach</code> initialization</td>
|
||||
</tr></tbody></table><p><strong>Key source files:</strong></p>
|
||||
@@ -136,46 +136,46 @@ _pkgdown.yml # pkgdown website configuration</code></pre>
|
||||
<div class="section level2">
|
||||
<h2 id="custom-s3-classes">Custom S3 Classes<a class="anchor" aria-label="anchor" href="#custom-s3-classes"></a></h2>
|
||||
<p>The package defines five S3 classes with full print/format/plot/vctrs support:</p>
|
||||
<table class="table"><thead><tr class="header"><th>Class</th>
|
||||
<table class="table"><thead><tr><th>Class</th>
|
||||
<th>Created by</th>
|
||||
<th>Represents</th>
|
||||
</tr></thead><tbody><tr class="odd"><td><code><mo></code></td>
|
||||
</tr></thead><tbody><tr><td><code><mo></code></td>
|
||||
<td><code><a href="reference/as.mo.html">as.mo()</a></code></td>
|
||||
<td>Microorganism code</td>
|
||||
</tr><tr class="even"><td><code><ab></code></td>
|
||||
</tr><tr><td><code><ab></code></td>
|
||||
<td><code><a href="reference/as.ab.html">as.ab()</a></code></td>
|
||||
<td>Antimicrobial drug code</td>
|
||||
</tr><tr class="odd"><td><code><av></code></td>
|
||||
</tr><tr><td><code><av></code></td>
|
||||
<td><code><a href="reference/as.av.html">as.av()</a></code></td>
|
||||
<td>Antiviral drug code</td>
|
||||
</tr><tr class="even"><td><code><sir></code></td>
|
||||
</tr><tr><td><code><sir></code></td>
|
||||
<td><code><a href="reference/as.sir.html">as.sir()</a></code></td>
|
||||
<td>SIR value (S/I/R/SDD)</td>
|
||||
</tr><tr class="odd"><td><code><mic></code></td>
|
||||
</tr><tr><td><code><mic></code></td>
|
||||
<td><code><a href="reference/as.mic.html">as.mic()</a></code></td>
|
||||
<td>Minimum inhibitory concentration</td>
|
||||
</tr><tr class="even"><td><code><disk></code></td>
|
||||
</tr><tr><td><code><disk></code></td>
|
||||
<td><code><a href="reference/as.disk.html">as.disk()</a></code></td>
|
||||
<td>Disk diffusion diameter</td>
|
||||
</tr></tbody></table></div>
|
||||
<div class="section level2">
|
||||
<h2 id="data-files">Data Files<a class="anchor" aria-label="anchor" href="#data-files"></a></h2>
|
||||
<p>Pre-compiled in <code>data/</code> (do not edit directly; regenerate via <code>data-raw/</code> scripts):</p>
|
||||
<table class="table"><colgroup><col width="50%"><col width="50%"></colgroup><thead><tr class="header"><th>File</th>
|
||||
<table class="table"><colgroup><col width="50%"><col width="50%"></colgroup><thead><tr><th>File</th>
|
||||
<th>Contents</th>
|
||||
</tr></thead><tbody><tr class="odd"><td><code>microorganisms.rda</code></td>
|
||||
</tr></thead><tbody><tr><td><code>microorganisms.rda</code></td>
|
||||
<td>~79,000 microbial species with full taxonomy</td>
|
||||
</tr><tr class="even"><td><code>antimicrobials.rda</code></td>
|
||||
</tr><tr><td><code>antimicrobials.rda</code></td>
|
||||
<td>~620 antimicrobial drugs with ATC codes</td>
|
||||
</tr><tr class="odd"><td><code>antivirals.rda</code></td>
|
||||
</tr><tr><td><code>antivirals.rda</code></td>
|
||||
<td>Antiviral drugs</td>
|
||||
</tr><tr class="even"><td><code>clinical_breakpoints.rda</code></td>
|
||||
</tr><tr><td><code>clinical_breakpoints.rda</code></td>
|
||||
<td>EUCAST + CLSI breakpoints (2011–2025)</td>
|
||||
</tr><tr class="odd"><td><code>intrinsic_resistant.rda</code></td>
|
||||
</tr><tr><td><code>intrinsic_resistant.rda</code></td>
|
||||
<td>Intrinsic resistance patterns</td>
|
||||
</tr><tr class="even"><td><code>example_isolates.rda</code></td>
|
||||
</tr><tr><td><code>example_isolates.rda</code></td>
|
||||
<td>Example AMR dataset for documentation/testing</td>
|
||||
</tr><tr class="odd"><td><code>WHONET.rda</code></td>
|
||||
</tr><tr><td><code>WHONET.rda</code></td>
|
||||
<td>Example WHONET-format dataset</td>
|
||||
</tr></tbody></table></div>
|
||||
<div class="section level2">
|
||||
|
||||
@@ -23,6 +23,7 @@ Concentration (MIC) and disk diffusion handling - Multilingual output
|
||||
All commands run inside an R session:
|
||||
|
||||
``` r
|
||||
|
||||
# Rebuild documentation (roxygen2 → .Rd files + NAMESPACE)
|
||||
devtools::document()
|
||||
|
||||
@@ -95,7 +96,7 @@ The package defines five S3 classes with full print/format/plot/vctrs
|
||||
support:
|
||||
|
||||
| Class | Created by | Represents |
|
||||
|----------|-----------------------------------------------------------|----------------------------------|
|
||||
|----|----|----|
|
||||
| `<mo>` | [`as.mo()`](https://amr-for-r.org/reference/as.mo.md) | Microorganism code |
|
||||
| `<ab>` | [`as.ab()`](https://amr-for-r.org/reference/as.ab.md) | Antimicrobial drug code |
|
||||
| `<av>` | [`as.av()`](https://amr-for-r.org/reference/as.av.md) | Antiviral drug code |
|
||||
@@ -125,6 +126,7 @@ integrations (ggplot2, dplyr, data.table, tidymodels, cli, crayon, etc.)
|
||||
are listed in `Suggests` and guarded with:
|
||||
|
||||
``` r
|
||||
|
||||
if (requireNamespace("pkg", quietly = TRUE)) { ... }
|
||||
```
|
||||
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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,7 +91,7 @@
|
||||
website update since they are based on randomly created values and the
|
||||
page was written in <a href="https://rmarkdown.rstudio.com/" class="external-link">R
|
||||
Markdown</a>. However, the methodology remains unchanged. This page was
|
||||
generated on 25 April 2026.</p>
|
||||
generated on 30 April 2026.</p>
|
||||
<div class="section level2">
|
||||
<h2 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a>
|
||||
</h2>
|
||||
@@ -147,21 +147,21 @@ make the structure of your data generally look like this:</p>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">2026-04-25</td>
|
||||
<td align="center">2026-04-30</td>
|
||||
<td align="center">abcd</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2026-04-25</td>
|
||||
<td align="center">2026-04-30</td>
|
||||
<td align="center">abcd</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">2026-04-25</td>
|
||||
<td align="center">2026-04-30</td>
|
||||
<td align="center">efgh</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">R</td>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
**Note:** values on this page will change with every website update
|
||||
since they are based on randomly created values and the page was written
|
||||
in [R Markdown](https://rmarkdown.rstudio.com/). However, the
|
||||
methodology remains unchanged. This page was generated on 25 April 2026.
|
||||
methodology remains unchanged. This page was generated on 30 April 2026.
|
||||
|
||||
## Introduction
|
||||
|
||||
@@ -51,9 +51,9 @@ structure of your data generally look like this:
|
||||
|
||||
| date | patient_id | mo | AMX | CIP |
|
||||
|:----------:|:----------:|:----------------:|:---:|:---:|
|
||||
| 2026-04-25 | abcd | Escherichia coli | S | S |
|
||||
| 2026-04-25 | abcd | Escherichia coli | S | R |
|
||||
| 2026-04-25 | efgh | Escherichia coli | R | S |
|
||||
| 2026-04-30 | abcd | Escherichia coli | S | S |
|
||||
| 2026-04-30 | abcd | Escherichia coli | S | R |
|
||||
| 2026-04-30 | efgh | Escherichia coli | R | S |
|
||||
|
||||
### Needed R packages
|
||||
|
||||
@@ -69,6 +69,7 @@ We will also use the `cleaner` package, that can be used for cleaning
|
||||
data and creating frequency tables.
|
||||
|
||||
``` r
|
||||
|
||||
library(dplyr)
|
||||
library(ggplot2)
|
||||
library(AMR)
|
||||
@@ -81,6 +82,7 @@ The `AMR` package contains a data set `example_isolates_unclean`, which
|
||||
might look data that users have extracted from their laboratory systems:
|
||||
|
||||
``` r
|
||||
|
||||
example_isolates_unclean
|
||||
#> # A tibble: 3,000 × 8
|
||||
#> patient_id hospital date bacteria AMX AMC CIP GEN
|
||||
@@ -119,6 +121,7 @@ still human readable. More importantly,
|
||||
of input:
|
||||
|
||||
``` r
|
||||
|
||||
as.mo("Klebsiella pneumoniae")
|
||||
#> Class <mo>
|
||||
#> [1] B_KLBSL_PNMN
|
||||
@@ -143,6 +146,7 @@ Gram-stain. They all start with `mo_` and they use
|
||||
that still any arbitrary user input can be used:
|
||||
|
||||
``` r
|
||||
|
||||
mo_family("K. pneumoniae")
|
||||
#> [1] "Enterobacteriaceae"
|
||||
mo_genus("K. pneumoniae")
|
||||
@@ -165,6 +169,7 @@ mo_snomed("K. pneumoniae")
|
||||
Now we can thus clean our data:
|
||||
|
||||
``` r
|
||||
|
||||
our_data$bacteria <- as.mo(our_data$bacteria, info = TRUE)
|
||||
#> ℹ Retrieved values from the `microorganisms.codes` data set for "ESCCOL",
|
||||
#> "KLEPNE", "STAAUR", and "STRPNE".
|
||||
@@ -177,6 +182,7 @@ Apparently, there was some uncertainty about the translation to
|
||||
taxonomic codes. Let’s check this:
|
||||
|
||||
``` r
|
||||
|
||||
mo_uncertainties()
|
||||
#> Matching scores are based on the resemblance between the input and the full
|
||||
#> taxonomic name, and the pathogenicity in humans. See `mo_matching_score()`.
|
||||
@@ -231,6 +237,7 @@ diffusion values, read more about that on the
|
||||
For now, we will just clean the SIR columns in our data using dplyr:
|
||||
|
||||
``` r
|
||||
|
||||
# method 1, be explicit about the columns:
|
||||
our_data <- our_data %>%
|
||||
mutate_at(vars(AMX:GEN), as.sir)
|
||||
@@ -308,6 +315,7 @@ page.
|
||||
The outcome of the function can easily be added to our data:
|
||||
|
||||
``` r
|
||||
|
||||
our_data <- our_data %>%
|
||||
mutate(first = first_isolate(info = TRUE))
|
||||
#> ℹ Determining first isolates using an episode length of 365 days
|
||||
@@ -326,6 +334,7 @@ with the [`filter()`](https://dplyr.tidyverse.org/reference/filter.html)
|
||||
function, also from the `dplyr` package:
|
||||
|
||||
``` r
|
||||
|
||||
our_data_1st <- our_data %>%
|
||||
filter(first == TRUE)
|
||||
```
|
||||
@@ -333,6 +342,7 @@ our_data_1st <- our_data %>%
|
||||
For future use, the above two syntaxes can be shortened:
|
||||
|
||||
``` r
|
||||
|
||||
our_data_1st <- our_data %>%
|
||||
filter_first_isolate()
|
||||
```
|
||||
@@ -340,6 +350,7 @@ our_data_1st <- our_data %>%
|
||||
So we end up with 2 724 isolates for analysis. Now our data looks like:
|
||||
|
||||
``` r
|
||||
|
||||
our_data_1st
|
||||
#> # A tibble: 2,724 × 9
|
||||
#> patient_id hospital date bacteria AMX AMC CIP GEN first
|
||||
@@ -366,6 +377,7 @@ gives a good first impression, as it comes with support for the new `mo`
|
||||
and `sir` classes that we now have in our data set:
|
||||
|
||||
``` r
|
||||
|
||||
summary(our_data_1st)
|
||||
#> patient_id hospital date bacteria
|
||||
#> Length :2724 Length :2724 Min. :2011-01-01 Class :mo
|
||||
@@ -417,6 +429,7 @@ table with [`count()`](https://amr-for-r.org/reference/count.md) based
|
||||
on the name of the microorganisms:
|
||||
|
||||
``` r
|
||||
|
||||
our_data %>%
|
||||
count(mo_name(bacteria), sort = TRUE)
|
||||
#> # A tibble: 4 × 2
|
||||
@@ -445,6 +458,7 @@ columns based on the antibiotic class that your antibiotic results are
|
||||
in:
|
||||
|
||||
``` r
|
||||
|
||||
our_data_1st %>%
|
||||
select(date, aminoglycosides())
|
||||
#> ℹ For `aminoglycosides()` using column GEN
|
||||
@@ -590,6 +604,7 @@ function to create any of the above antibiogram types. For starters,
|
||||
this is what the included `example_isolates` data set looks like:
|
||||
|
||||
``` r
|
||||
|
||||
example_isolates
|
||||
#> # A tibble: 2,000 × 46
|
||||
#> date patient age gender ward mo PEN OXA FLC AMX
|
||||
@@ -622,6 +637,7 @@ function supports any (combination) of the previously mentioned
|
||||
antibiotic class selectors:
|
||||
|
||||
``` r
|
||||
|
||||
antibiogram(example_isolates,
|
||||
antibiotics = c(aminoglycosides(), carbapenems())
|
||||
)
|
||||
@@ -631,7 +647,7 @@ antibiogram(example_isolates,
|
||||
```
|
||||
|
||||
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|
||||
|:-----------------|:---------------------|:--------------------|:---------------------|:----------------|:---------------------|:--------------------|
|
||||
|:---|:---|:---|:---|:---|:---|:---|
|
||||
| CoNS | 0% (0-8%,N=43) | 86% (82-90%,N=309) | 52% (37-67%,N=48) | 0% (0-8%,N=43) | 52% (37-67%,N=48) | 22% (12-35%,N=55) |
|
||||
| *E. coli* | 100% (98-100%,N=171) | 98% (96-99%,N=460) | 100% (99-100%,N=422) | NA | 100% (99-100%,N=418) | 97% (96-99%,N=462) |
|
||||
| *E. faecalis* | 0% (0-9%,N=39) | 0% (0-9%,N=39) | 100% (91-100%,N=38) | 0% (0-9%,N=39) | NA | 0% (0-9%,N=39) |
|
||||
@@ -659,6 +675,7 @@ Ukrainian, Urdu, or Vietnamese. In this next example, we force the
|
||||
language to be Spanish using the `language` argument:
|
||||
|
||||
``` r
|
||||
|
||||
antibiogram(example_isolates,
|
||||
mo_transform = "gramstain",
|
||||
antibiotics = aminoglycosides(),
|
||||
@@ -670,7 +687,7 @@ antibiogram(example_isolates,
|
||||
```
|
||||
|
||||
| Patógeno | Amikacina | Gentamicina | Kanamicina | Tobramicina |
|
||||
|:--------------|:-------------------|:--------------------|:----------------|:-------------------|
|
||||
|:---|:---|:---|:---|:---|
|
||||
| Gram negativo | 98% (96-99%,N=256) | 96% (95-98%,N=684) | 0% (0-10%,N=35) | 96% (94-97%,N=686) |
|
||||
| Gram positivo | 0% (0-1%,N=436) | 63% (60-66%,N=1170) | 0% (0-1%,N=436) | 34% (31-38%,N=665) |
|
||||
|
||||
@@ -680,6 +697,7 @@ To create a combined antibiogram, use antibiotic codes or names with a
|
||||
plus `+` character like this:
|
||||
|
||||
``` r
|
||||
|
||||
combined_ab <- antibiogram(example_isolates,
|
||||
antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"),
|
||||
ab_transform = NULL
|
||||
@@ -688,7 +706,7 @@ combined_ab
|
||||
```
|
||||
|
||||
| Pathogen | TZP | TZP + GEN | TZP + TOB |
|
||||
|:-----------------|:---------------------|:---------------------|:---------------------|
|
||||
|:---|:---|:---|:---|
|
||||
| CoNS | 30% (16-49%,N=33) | 97% (95-99%,N=274) | NA |
|
||||
| *E. coli* | 94% (92-96%,N=416) | 100% (98-100%,N=459) | 99% (97-100%,N=461) |
|
||||
| *K. pneumoniae* | 89% (77-96%,N=53) | 93% (83-98%,N=58) | 93% (83-98%,N=58) |
|
||||
@@ -707,6 +725,7 @@ be used. This can be any column in the data, or e.g. an
|
||||
on certain columns:
|
||||
|
||||
``` r
|
||||
|
||||
antibiogram(example_isolates,
|
||||
antibiotics = c(aminoglycosides(), carbapenems()),
|
||||
syndromic_group = "ward"
|
||||
@@ -717,7 +736,7 @@ antibiogram(example_isolates,
|
||||
```
|
||||
|
||||
| Syndromic Group | Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|
||||
|:----------------|:-----------------|:---------------------|:--------------------|:---------------------|:----------------|:---------------------|:--------------------|
|
||||
|:---|:---|:---|:---|:---|:---|:---|:---|
|
||||
| Clinical | CoNS | NA | 89% (84-93%,N=205) | 57% (39-74%,N=35) | NA | 57% (39-74%,N=35) | 26% (12-45%,N=31) |
|
||||
| ICU | CoNS | NA | 79% (68-88%,N=73) | NA | NA | NA | NA |
|
||||
| Outpatient | CoNS | NA | 84% (66-95%,N=31) | NA | NA | NA | NA |
|
||||
@@ -745,6 +764,7 @@ susceptibility estimates, weighted by pathogen incidence and
|
||||
antimicrobial susceptibility patterns.
|
||||
|
||||
``` r
|
||||
|
||||
example_isolates %>%
|
||||
wisca(
|
||||
antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"),
|
||||
@@ -753,7 +773,7 @@ example_isolates %>%
|
||||
```
|
||||
|
||||
| Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|
||||
|:------------------------|:-------------------------------------|:-------------------------------------|
|
||||
|:---|:---|:---|
|
||||
| 69.4% (64.3-74.3%) | 92.6% (91.1-93.9%) | 88.7% (85.8-91.2%) |
|
||||
|
||||
WISCA uses a **Bayesian decision model** to integrate data from multiple
|
||||
@@ -775,6 +795,7 @@ grouped `tibble`, i.e., using
|
||||
first:
|
||||
|
||||
``` r
|
||||
|
||||
example_isolates %>%
|
||||
top_n_microorganisms(n = 10) %>%
|
||||
group_by(
|
||||
@@ -785,7 +806,7 @@ example_isolates %>%
|
||||
```
|
||||
|
||||
| age_group | gender | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|
||||
|:----------|:-------|:------------------------|:-------------------------------------|:-------------------------------------|
|
||||
|:---|:---|:---|:---|:---|
|
||||
| 0-24 | F | 56.6% (25.2-83.9%) | 73.6% (48-91.6%) | 68.6% (42.9-89.5%) |
|
||||
| 0-24 | M | 60.3% (28.4-87.1%) | 79.7% (57.6-94.2%) | 60.1% (29.5-87.7%) |
|
||||
| 25-49 | F | 66.6% (45.6-85.5%) | 91.7% (84.6-96.7%) | 83% (67.9-94%) |
|
||||
@@ -803,6 +824,7 @@ from the `ggplot2` packages, since this `AMR` package provides an
|
||||
extension to that function:
|
||||
|
||||
``` r
|
||||
|
||||
autoplot(combined_ab)
|
||||
```
|
||||
|
||||
@@ -847,6 +869,7 @@ equal to
|
||||
These functions can be used on their own:
|
||||
|
||||
``` r
|
||||
|
||||
our_data_1st %>% resistance(AMX)
|
||||
#> ℹ `resistance()` assumes the EUCAST guideline and thus considers the 'I'
|
||||
#> category susceptible. Set the `guideline` argument or the `AMR_guideline`
|
||||
@@ -861,6 +884,7 @@ Or can be used in conjunction with
|
||||
both from the `dplyr` package:
|
||||
|
||||
``` r
|
||||
|
||||
our_data_1st %>%
|
||||
group_by(hospital) %>%
|
||||
summarise(amoxicillin = resistance(AMX))
|
||||
@@ -881,6 +905,7 @@ example with randomly generated MIC values for *Klebsiella pneumoniae*
|
||||
and ciprofloxacin:
|
||||
|
||||
``` r
|
||||
|
||||
set.seed(123)
|
||||
mic_values <- random_mic(100)
|
||||
sir_values <- as.sir(mic_values, mo = "K. pneumoniae", ab = "cipro", guideline = "EUCAST 2024")
|
||||
@@ -916,6 +941,7 @@ y-axis and
|
||||
colour-code SIR categories.
|
||||
|
||||
``` r
|
||||
|
||||
# add a group
|
||||
my_data$group <- rep(c("A", "B", "C", "D"), each = 25)
|
||||
|
||||
@@ -946,6 +972,7 @@ has been extended by this package to directly plot MIC and disk
|
||||
diffusion values:
|
||||
|
||||
``` r
|
||||
|
||||
autoplot(mic_values)
|
||||
```
|
||||
|
||||
@@ -953,6 +980,7 @@ autoplot(mic_values)
|
||||
|
||||
``` r
|
||||
|
||||
|
||||
# by providing `mo` and `ab`, colours will indicate the SIR interpretation:
|
||||
autoplot(mic_values, mo = "K. pneumoniae", ab = "cipro", guideline = "EUCAST 2024")
|
||||
```
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -169,7 +169,7 @@ AMR.microorganisms
|
||||
```
|
||||
|
||||
| mo | fullname | status | kingdom | gbif | gbif_parent | gbif_renamed_to | prevalence |
|
||||
|--------------|------------------------------------|----------|----------|----------|-------------|-----------------|------------|
|
||||
|----|----|----|----|----|----|----|----|
|
||||
| B_GRAMN | (unknown Gram-negatives) | unknown | Bacteria | None | None | None | 2.0 |
|
||||
| B_GRAMP | (unknown Gram-positives) | unknown | Bacteria | None | None | None | 2.0 |
|
||||
| B_ANAER-NEG | (unknown anaerobic Gram-negatives) | unknown | Bacteria | None | None | None | 2.0 |
|
||||
@@ -187,7 +187,7 @@ AMR.antimicrobials
|
||||
```
|
||||
|
||||
| ab | cid | name | group | oral_ddd | oral_units | iv_ddd | iv_units |
|
||||
|-----|------------|-----------------------|--------------------------|----------|------------|--------|----------|
|
||||
|----|----|----|----|----|----|----|----|
|
||||
| AMA | 4649.0 | 4-aminosalicylic acid | Antimycobacterials | 12.00 | g | NaN | None |
|
||||
| ACM | 6450012.0 | Acetylmidecamycin | Macrolides/lincosamides | NaN | None | NaN | None |
|
||||
| ASP | 49787020.0 | Acetylspiramycin | Macrolides/lincosamides | NaN | None | NaN | None |
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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,6 +49,7 @@ We begin by loading the required libraries and preparing the
|
||||
`example_isolates` dataset from the `AMR` package.
|
||||
|
||||
``` r
|
||||
|
||||
# Load required libraries
|
||||
library(AMR) # For AMR data analysis
|
||||
library(tidymodels) # For machine learning workflows, and data manipulation (dplyr, tidyr, ...)
|
||||
@@ -57,6 +58,7 @@ library(tidymodels) # For machine learning workflows, and data manipulation (dpl
|
||||
Prepare the data:
|
||||
|
||||
``` r
|
||||
|
||||
# Your data could look like this:
|
||||
example_isolates
|
||||
#> # A tibble: 2,000 × 46
|
||||
@@ -127,6 +129,7 @@ preprocessing, model specification, and fitting.
|
||||
We create a recipe to preprocess the data for modelling.
|
||||
|
||||
``` r
|
||||
|
||||
# Define the recipe for data preprocessing
|
||||
resistance_recipe <- recipe(mo ~ ., data = data) %>%
|
||||
step_corr(c(aminoglycosides(), betalactams()), threshold = 0.9)
|
||||
@@ -148,6 +151,7 @@ have with `step_corr()`, the necessary parameters can be estimated from
|
||||
a training set using `prep()`:
|
||||
|
||||
``` r
|
||||
|
||||
prep(resistance_recipe)
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||
#> (amikacin), and KAN (kanamycin)
|
||||
@@ -201,6 +205,7 @@ We define a logistic regression model since resistance prediction is a
|
||||
binary classification task.
|
||||
|
||||
``` r
|
||||
|
||||
# Specify a logistic regression model
|
||||
logistic_model <- logistic_reg() %>%
|
||||
set_engine("glm") # Use the Generalised Linear Model engine
|
||||
@@ -221,6 +226,7 @@ We bundle the recipe and model together into a `workflow`, which
|
||||
organises the entire modelling process.
|
||||
|
||||
``` r
|
||||
|
||||
# Combine the recipe and model into a workflow
|
||||
resistance_workflow <- workflow() %>%
|
||||
add_recipe(resistance_recipe) %>% # Add the preprocessing recipe
|
||||
@@ -248,6 +254,7 @@ Then, we fit the workflow on the training set and evaluate its
|
||||
performance.
|
||||
|
||||
``` r
|
||||
|
||||
# Split data into training and testing sets
|
||||
set.seed(123) # For reproducibility
|
||||
data_split <- initial_split(data, prop = 0.8) # 80% training, 20% testing
|
||||
@@ -271,6 +278,7 @@ they are stored in the recipe.
|
||||
Next, we evaluate the model on the testing data.
|
||||
|
||||
``` r
|
||||
|
||||
# Make predictions on the testing set
|
||||
predictions <- fitted_workflow %>%
|
||||
predict(testing_data) # Generate predictions
|
||||
@@ -338,6 +346,7 @@ AMR results of only aminoglycosides and beta-lactam antibiotics. The ROC
|
||||
curve looks like this:
|
||||
|
||||
``` r
|
||||
|
||||
predictions %>%
|
||||
roc_curve(mo, `.pred_Gram-negative`) %>%
|
||||
autoplot()
|
||||
@@ -390,6 +399,7 @@ Our goal is to:
|
||||
We use the `esbl_isolates` dataset that comes with the AMR package.
|
||||
|
||||
``` r
|
||||
|
||||
# Load required libraries
|
||||
library(AMR)
|
||||
library(tidymodels)
|
||||
@@ -437,6 +447,7 @@ selected using the new
|
||||
[`all_mic_predictors()`](https://amr-for-r.org/reference/amr-tidymodels.md):
|
||||
|
||||
``` r
|
||||
|
||||
# Split into training and testing sets
|
||||
set.seed(123)
|
||||
split <- initial_split(data)
|
||||
@@ -480,6 +491,7 @@ manual](https://parsnip.tidymodels.org/reference/details_boost_tree_xgboost.html
|
||||
could be much more precise.
|
||||
|
||||
``` r
|
||||
|
||||
# Define the model
|
||||
model <- logistic_reg(mode = "classification") %>%
|
||||
set_engine("glm")
|
||||
@@ -498,6 +510,7 @@ model
|
||||
#### 3. Building the Workflow
|
||||
|
||||
``` r
|
||||
|
||||
# Create workflow
|
||||
workflow_model <- workflow() %>%
|
||||
add_recipe(mic_recipe) %>%
|
||||
@@ -522,6 +535,7 @@ workflow_model
|
||||
### **Training and Evaluating the Model**
|
||||
|
||||
``` r
|
||||
|
||||
# Fit the model
|
||||
fitted <- fit(workflow_model, training_data)
|
||||
|
||||
@@ -566,6 +580,7 @@ We can visualise predictions by comparing predicted and actual ESBL
|
||||
status.
|
||||
|
||||
``` r
|
||||
|
||||
library(ggplot2)
|
||||
|
||||
ggplot(predictions, aes(x = esbl, fill = .pred_class)) +
|
||||
@@ -583,6 +598,7 @@ ggplot(predictions, aes(x = esbl, fill = .pred_class)) +
|
||||
And plot the certainties too - how certain were the actual predictions?
|
||||
|
||||
``` r
|
||||
|
||||
predictions %>%
|
||||
mutate(
|
||||
certainty = ifelse(.pred_class == "FALSE",
|
||||
@@ -646,6 +662,7 @@ We start by transforming the `example_isolates` dataset into a
|
||||
structured time-series format.
|
||||
|
||||
``` r
|
||||
|
||||
# Load required libraries
|
||||
library(AMR)
|
||||
library(tidymodels)
|
||||
@@ -706,6 +723,7 @@ step, a model specification, and the fitting process.
|
||||
#### 1. Preprocessing with a Recipe
|
||||
|
||||
``` r
|
||||
|
||||
# Define the recipe
|
||||
resistance_recipe_time <- recipe(res_AMX ~ year + gramstain, data = data_time) %>%
|
||||
step_dummy(gramstain, one_hot = TRUE) %>% # Convert categorical to numerical
|
||||
@@ -739,6 +757,7 @@ resistance_recipe_time
|
||||
We use a linear regression model to predict resistance trends.
|
||||
|
||||
``` r
|
||||
|
||||
# Define the linear regression model
|
||||
lm_model <- linear_reg() %>%
|
||||
set_engine("lm") # Use linear regression
|
||||
@@ -759,6 +778,7 @@ lm_model
|
||||
We combine the preprocessing recipe and model into a workflow.
|
||||
|
||||
``` r
|
||||
|
||||
# Create workflow
|
||||
resistance_workflow_time <- workflow() %>%
|
||||
add_recipe(resistance_recipe_time) %>%
|
||||
@@ -788,6 +808,7 @@ We split the data into training and testing sets, fit the model, and
|
||||
evaluate performance.
|
||||
|
||||
``` r
|
||||
|
||||
# Split the data
|
||||
set.seed(123)
|
||||
data_split_time <- initial_split(data_time, prop = 0.8)
|
||||
@@ -829,6 +850,7 @@ metrics_time
|
||||
We plot resistance trends over time for amoxicillin.
|
||||
|
||||
``` r
|
||||
|
||||
library(ggplot2)
|
||||
|
||||
# Plot actual vs predicted resistance over time
|
||||
@@ -849,6 +871,7 @@ Additionally, we can visualise resistance trends in `ggplot2` and
|
||||
directly add linear models there:
|
||||
|
||||
``` r
|
||||
|
||||
ggplot(data_time, aes(x = year, y = res_AMX, color = gramstain)) +
|
||||
geom_line() +
|
||||
labs(
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -36,6 +36,7 @@ function resolves this, by applying the latest ‘EUCAST Expected
|
||||
Resistant Phenotypes’ guideline:
|
||||
|
||||
``` r
|
||||
|
||||
oops <- tibble::tibble(
|
||||
mo = c(
|
||||
"Klebsiella pneumoniae",
|
||||
@@ -64,6 +65,7 @@ that uses the same guideline, but allows to check for one or more
|
||||
specific microorganisms or antimicrobials:
|
||||
|
||||
``` r
|
||||
|
||||
mo_is_intrinsic_resistant(
|
||||
c("Klebsiella pneumoniae", "Escherichia coli"),
|
||||
"ampicillin"
|
||||
@@ -83,6 +85,7 @@ other antimicrobials drugs. This process is called *interpretive
|
||||
reading*, and is basically a form of imputation:
|
||||
|
||||
``` r
|
||||
|
||||
data <- tibble::tibble(
|
||||
mo = c(
|
||||
"Staphylococcus aureus",
|
||||
@@ -102,6 +105,7 @@ data <- tibble::tibble(
|
||||
```
|
||||
|
||||
``` r
|
||||
|
||||
data
|
||||
```
|
||||
|
||||
@@ -114,6 +118,7 @@ data
|
||||
| Pseudomonas aeruginosa | \- | \- | \- | \- | \- | S | S |
|
||||
|
||||
``` r
|
||||
|
||||
eucast_rules(data, overwrite = TRUE)
|
||||
```
|
||||
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -11,6 +11,7 @@ For PCA, we need to transform our AMR data first. This is what the
|
||||
`example_isolates` data set in this package looks like:
|
||||
|
||||
``` r
|
||||
|
||||
library(AMR)
|
||||
library(dplyr)
|
||||
glimpse(example_isolates)
|
||||
@@ -68,6 +69,7 @@ Now to transform this to a data set with only resistance percentages per
|
||||
taxonomic order and genus:
|
||||
|
||||
``` r
|
||||
|
||||
resistance_data <- example_isolates %>%
|
||||
group_by(
|
||||
order = mo_order(mo), # group on anything, like order
|
||||
@@ -103,6 +105,7 @@ automatically filter on rows that contain numeric values in all selected
|
||||
variables, so we now only need to do:
|
||||
|
||||
``` r
|
||||
|
||||
pca_result <- pca(resistance_data)
|
||||
#> ℹ Columns selected for PCA: "\033[1mAMC\033[22m", "\033[1mCAZ\033[22m",
|
||||
#> "\033[1mCTX\033[22m", "\033[1mCXM\033[22m", "\033[1mGEN\033[22m",
|
||||
@@ -114,6 +117,7 @@ The result can be reviewed with the good old
|
||||
[`summary()`](https://rdrr.io/r/base/summary.html) function:
|
||||
|
||||
``` r
|
||||
|
||||
summary(pca_result)
|
||||
#> Groups (n=4, named as 'order'):
|
||||
#> [1] "Caryophanales" "Enterobacterales" "Lactobacillales" "Pseudomonadales"
|
||||
@@ -137,6 +141,7 @@ microorganism.
|
||||
## Plotting the results
|
||||
|
||||
``` r
|
||||
|
||||
biplot(pca_result)
|
||||
```
|
||||
|
||||
@@ -148,6 +153,7 @@ better with our new
|
||||
function, that automatically adds the right labels and even groups:
|
||||
|
||||
``` r
|
||||
|
||||
ggplot_pca(pca_result)
|
||||
```
|
||||
|
||||
@@ -156,6 +162,7 @@ ggplot_pca(pca_result)
|
||||
You can also print an ellipse per group, and edit the appearance:
|
||||
|
||||
``` r
|
||||
|
||||
ggplot_pca(pca_result, ellipse = TRUE) +
|
||||
ggplot2::labs(title = "An AMR/PCA biplot!")
|
||||
```
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -11,6 +11,7 @@ date fields are imported correctly.
|
||||
An example syntax could look like this:
|
||||
|
||||
``` r
|
||||
|
||||
library(readxl)
|
||||
data <- read_excel(path = "path/to/your/file.xlsx")
|
||||
```
|
||||
@@ -27,6 +28,7 @@ I suggest you read about it on their website:
|
||||
<https://www.tidyverse.org/>.
|
||||
|
||||
``` r
|
||||
|
||||
library(dplyr) # part of tidyverse
|
||||
library(ggplot2) # part of tidyverse
|
||||
library(AMR) # this package
|
||||
@@ -50,6 +52,7 @@ analysis:
|
||||
for.
|
||||
|
||||
``` r
|
||||
|
||||
# transform variables
|
||||
data <- WHONET %>%
|
||||
# get microbial ID based on given organism
|
||||
@@ -68,6 +71,7 @@ function can be used to create frequency tables.
|
||||
So let’s check our data, with a couple of frequency tables:
|
||||
|
||||
``` r
|
||||
|
||||
# our newly created `mo` variable, put in the mo_name() function
|
||||
data %>% freq(mo_name(mo), nmax = 10)
|
||||
```
|
||||
@@ -83,7 +87,7 @@ Shortest: 11
|
||||
Longest: 40
|
||||
|
||||
| | Item | Count | Percent | Cum. Count | Cum. Percent |
|
||||
|:----|:-----------------------------------------|------:|--------:|-----------:|-------------:|
|
||||
|:---|:---|---:|---:|---:|---:|
|
||||
| 1 | Escherichia coli | 245 | 49.0% | 245 | 49.0% |
|
||||
| 2 | Coagulase-negative Staphylococcus (CoNS) | 74 | 14.8% | 319 | 63.8% |
|
||||
| 3 | Staphylococcus epidermidis | 38 | 7.6% | 357 | 71.4% |
|
||||
@@ -98,6 +102,7 @@ Longest: 40
|
||||
(omitted 28 entries, n = 57 \[11.4%\])
|
||||
|
||||
``` r
|
||||
|
||||
# our transformed antibiotic columns
|
||||
# amoxicillin/clavulanic acid (J01CR02) as an example
|
||||
data %>% freq(AMC_ND2)
|
||||
@@ -132,6 +137,7 @@ included [`ggplot_sir()`](https://amr-for-r.org/reference/ggplot_sir.md)
|
||||
function:
|
||||
|
||||
``` r
|
||||
|
||||
data %>%
|
||||
group_by(Country) %>%
|
||||
select(Country, AMP_ND2, AMC_ED20, CAZ_ED10, CIP_ED5) %>%
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -151,7 +151,7 @@ isolates. Therefore, traditional antibiograms:</p>
|
||||
regimen.</li>
|
||||
</ul>
|
||||
<p>We can write this as:</p>
|
||||
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Coverage</mtext><mo>=</mo><munder><mo>∑</mo><mi>i</mi></munder><mrow><mo stretchy="true" form="prefix">(</mo><msub><mtext mathvariant="normal">Incidence</mtext><mi>i</mi></msub><mo>×</mo><msub><mtext mathvariant="normal">Susceptibility</mtext><mi>i</mi></msub><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">\text{Coverage} = \sum_i (\text{Incidence}_i \times \text{Susceptibility}_i)</annotation></semantics></math></p>
|
||||
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Coverage</mtext><mo>=</mo><munder><mo>∑</mo><mi>i</mi></munder><mo stretchy="false" form="prefix">(</mo><msub><mtext mathvariant="normal">Incidence</mtext><mi>i</mi></msub><mo>×</mo><msub><mtext mathvariant="normal">Susceptibility</mtext><mi>i</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\text{Coverage} = \sum_i (\text{Incidence}_i \times \text{Susceptibility}_i)</annotation></semantics></math></p>
|
||||
<p>For example, suppose:</p>
|
||||
<ul>
|
||||
<li>
|
||||
@@ -162,7 +162,7 @@ are susceptible to a drug.</li>
|
||||
<em>Klebsiella</em> are susceptible.</li>
|
||||
</ul>
|
||||
<p>Then:</p>
|
||||
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Coverage</mtext><mo>=</mo><mrow><mo stretchy="true" form="prefix">(</mo><mn>0.6</mn><mo>×</mo><mn>0.9</mn><mo stretchy="true" form="postfix">)</mo></mrow><mo>+</mo><mrow><mo stretchy="true" form="prefix">(</mo><mn>0.4</mn><mo>×</mo><mn>0.7</mn><mo stretchy="true" form="postfix">)</mo></mrow><mo>=</mo><mn>0.82</mn></mrow><annotation encoding="application/x-tex">\text{Coverage} = (0.6 \times 0.9) + (0.4 \times 0.7) = 0.82</annotation></semantics></math></p>
|
||||
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Coverage</mtext><mo>=</mo><mo stretchy="false" form="prefix">(</mo><mn>0.6</mn><mo>×</mo><mn>0.9</mn><mo stretchy="false" form="postfix">)</mo><mo>+</mo><mo stretchy="false" form="prefix">(</mo><mn>0.4</mn><mo>×</mo><mn>0.7</mn><mo stretchy="false" form="postfix">)</mo><mo>=</mo><mn>0.82</mn></mrow><annotation encoding="application/x-tex">\text{Coverage} = (0.6 \times 0.9) + (0.4 \times 0.7) = 0.82</annotation></semantics></math></p>
|
||||
<p>But in real data, incidence and susceptibility are <strong>estimated
|
||||
from samples</strong>, so they carry uncertainty. WISCA models this
|
||||
<strong>probabilistically</strong>, using conjugate Bayesian
|
||||
@@ -180,16 +180,16 @@ distributions.</p>
|
||||
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>K</mi><annotation encoding="application/x-tex">K</annotation></semantics></math>
|
||||
be the number of pathogens,</li>
|
||||
<li>
|
||||
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>α</mi><mo>=</mo><mrow><mo stretchy="true" form="prefix">(</mo><mn>1</mn><mo>,</mo><mn>1</mn><mo>,</mo><mi>…</mi><mo>,</mo><mn>1</mn><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">\alpha = (1, 1, \ldots, 1)</annotation></semantics></math>
|
||||
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>α</mi><mo>=</mo><mo stretchy="false" form="prefix">(</mo><mn>1</mn><mo>,</mo><mn>1</mn><mo>,</mo><mi>…</mi><mo>,</mo><mn>1</mn><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\alpha = (1, 1, \ldots, 1)</annotation></semantics></math>
|
||||
be a <strong>Dirichlet</strong> prior (uniform),</li>
|
||||
<li>
|
||||
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>=</mo><mrow><mo stretchy="true" form="prefix">(</mo><msub><mi>n</mi><mn>1</mn></msub><mo>,</mo><mi>…</mi><mo>,</mo><msub><mi>n</mi><mi>K</mi></msub><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">n = (n_1, \ldots, n_K)</annotation></semantics></math>
|
||||
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>=</mo><mo stretchy="false" form="prefix">(</mo><msub><mi>n</mi><mn>1</mn></msub><mo>,</mo><mi>…</mi><mo>,</mo><msub><mi>n</mi><mi>K</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">n = (n_1, \ldots, n_K)</annotation></semantics></math>
|
||||
be the observed counts per species.</li>
|
||||
</ul>
|
||||
<p>Then the posterior incidence is:</p>
|
||||
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi><mo>∼</mo><mtext mathvariant="normal">Dirichlet</mtext><mrow><mo stretchy="true" form="prefix">(</mo><msub><mi>α</mi><mn>1</mn></msub><mo>+</mo><msub><mi>n</mi><mn>1</mn></msub><mo>,</mo><mi>…</mi><mo>,</mo><msub><mi>α</mi><mi>K</mi></msub><mo>+</mo><msub><mi>n</mi><mi>K</mi></msub><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">p \sim \text{Dirichlet}(\alpha_1 + n_1, \ldots, \alpha_K + n_K)</annotation></semantics></math></p>
|
||||
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi><mo>∼</mo><mtext mathvariant="normal">Dirichlet</mtext><mo stretchy="false" form="prefix">(</mo><msub><mi>α</mi><mn>1</mn></msub><mo>+</mo><msub><mi>n</mi><mn>1</mn></msub><mo>,</mo><mi>…</mi><mo>,</mo><msub><mi>α</mi><mi>K</mi></msub><mo>+</mo><msub><mi>n</mi><mi>K</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">p \sim \text{Dirichlet}(\alpha_1 + n_1, \ldots, \alpha_K + n_K)</annotation></semantics></math></p>
|
||||
<p>To simulate from this, we use:</p>
|
||||
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>x</mi><mi>i</mi></msub><mo>∼</mo><mtext mathvariant="normal">Gamma</mtext><mrow><mo stretchy="true" form="prefix">(</mo><msub><mi>α</mi><mi>i</mi></msub><mo>+</mo><msub><mi>n</mi><mi>i</mi></msub><mo>,</mo><mspace width="0.222em"></mspace><mn>1</mn><mo stretchy="true" form="postfix">)</mo></mrow><mo>,</mo><mspace width="1.0em"></mspace><msub><mi>p</mi><mi>i</mi></msub><mo>=</mo><mfrac><msub><mi>x</mi><mi>i</mi></msub><mrow><munderover><mo>∑</mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mi>K</mi></munderover><msub><mi>x</mi><mi>j</mi></msub></mrow></mfrac></mrow><annotation encoding="application/x-tex">x_i \sim \text{Gamma}(\alpha_i + n_i,\ 1), \quad p_i = \frac{x_i}{\sum_{j=1}^{K} x_j}</annotation></semantics></math></p>
|
||||
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>x</mi><mi>i</mi></msub><mo>∼</mo><mtext mathvariant="normal">Gamma</mtext><mo stretchy="false" form="prefix">(</mo><msub><mi>α</mi><mi>i</mi></msub><mo>+</mo><msub><mi>n</mi><mi>i</mi></msub><mo>,</mo><mspace width="0.222em"></mspace><mn>1</mn><mo stretchy="false" form="postfix">)</mo><mo>,</mo><mspace width="1.0em"></mspace><msub><mi>p</mi><mi>i</mi></msub><mo>=</mo><mfrac><msub><mi>x</mi><mi>i</mi></msub><mrow><munderover><mo>∑</mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mi>K</mi></munderover><msub><mi>x</mi><mi>j</mi></msub></mrow></mfrac></mrow><annotation encoding="application/x-tex">x_i \sim \text{Gamma}(\alpha_i + n_i,\ 1), \quad p_i = \frac{x_i}{\sum_{j=1}^{K} x_j}</annotation></semantics></math></p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="susceptibility">Susceptibility<a class="anchor" aria-label="anchor" href="#susceptibility"></a>
|
||||
@@ -197,7 +197,7 @@ be the observed counts per species.</li>
|
||||
<p>Each pathogen–regimen pair has a prior and data:</p>
|
||||
<ul>
|
||||
<li>Prior:
|
||||
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Beta</mtext><mrow><mo stretchy="true" form="prefix">(</mo><msub><mi>α</mi><mn>0</mn></msub><mo>,</mo><msub><mi>β</mi><mn>0</mn></msub><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">\text{Beta}(\alpha_0, \beta_0)</annotation></semantics></math>,
|
||||
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Beta</mtext><mo stretchy="false" form="prefix">(</mo><msub><mi>α</mi><mn>0</mn></msub><mo>,</mo><msub><mi>β</mi><mn>0</mn></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\text{Beta}(\alpha_0, \beta_0)</annotation></semantics></math>,
|
||||
with default
|
||||
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>α</mi><mn>0</mn></msub><mo>=</mo><msub><mi>β</mi><mn>0</mn></msub><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">\alpha_0 = \beta_0 = 1</annotation></semantics></math>
|
||||
</li>
|
||||
@@ -213,7 +213,7 @@ category could also include values SDD (susceptible, dose-dependent) and
|
||||
I (intermediate [CLSI], or susceptible, increased exposure
|
||||
[EUCAST]).</p>
|
||||
<p>Then the posterior is:</p>
|
||||
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>θ</mi><mo>∼</mo><mtext mathvariant="normal">Beta</mtext><mrow><mo stretchy="true" form="prefix">(</mo><msub><mi>α</mi><mn>0</mn></msub><mo>+</mo><mi>S</mi><mo>,</mo><mspace width="0.222em"></mspace><msub><mi>β</mi><mn>0</mn></msub><mo>+</mo><mi>N</mi><mo>−</mo><mi>S</mi><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">\theta \sim \text{Beta}(\alpha_0 + S,\ \beta_0 + N - S)</annotation></semantics></math></p>
|
||||
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>θ</mi><mo>∼</mo><mtext mathvariant="normal">Beta</mtext><mo stretchy="false" form="prefix">(</mo><msub><mi>α</mi><mn>0</mn></msub><mo>+</mo><mi>S</mi><mo>,</mo><mspace width="0.222em"></mspace><msub><mi>β</mi><mn>0</mn></msub><mo>+</mo><mi>N</mi><mo>−</mo><mi>S</mi><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\theta \sim \text{Beta}(\alpha_0 + S,\ \beta_0 + N - S)</annotation></semantics></math></p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="final-coverage-estimate">Final coverage estimate<a class="anchor" aria-label="anchor" href="#final-coverage-estimate"></a>
|
||||
@@ -224,7 +224,7 @@ I (intermediate [CLSI], or susceptible, increased exposure
|
||||
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>𝐩</mi><mo>∼</mo><mtext mathvariant="normal">Dirichlet</mtext></mrow><annotation encoding="application/x-tex">\boldsymbol{p} \sim \text{Dirichlet}</annotation></semantics></math>
|
||||
</li>
|
||||
<li>Simulate susceptibility:
|
||||
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>θ</mi><mi>i</mi></msub><mo>∼</mo><mtext mathvariant="normal">Beta</mtext><mrow><mo stretchy="true" form="prefix">(</mo><mn>1</mn><mo>+</mo><msub><mi>S</mi><mi>i</mi></msub><mo>,</mo><mspace width="0.222em"></mspace><mn>1</mn><mo>+</mo><msub><mi>R</mi><mi>i</mi></msub><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">\theta_i \sim \text{Beta}(1 + S_i,\ 1 + R_i)</annotation></semantics></math>
|
||||
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>θ</mi><mi>i</mi></msub><mo>∼</mo><mtext mathvariant="normal">Beta</mtext><mo stretchy="false" form="prefix">(</mo><mn>1</mn><mo>+</mo><msub><mi>S</mi><mi>i</mi></msub><mo>,</mo><mspace width="0.222em"></mspace><mn>1</mn><mo>+</mo><msub><mi>R</mi><mi>i</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\theta_i \sim \text{Beta}(1 + S_i,\ 1 + R_i)</annotation></semantics></math>
|
||||
</li>
|
||||
<li>Combine:</li>
|
||||
</ol>
|
||||
|
||||
@@ -58,7 +58,9 @@ This means combining two things:
|
||||
|
||||
We can write this as:
|
||||
|
||||
$$\text{Coverage} = \sum\limits_{i}\left( \text{Incidence}_{i} \times \text{Susceptibility}_{i} \right)$$
|
||||
``` math
|
||||
\text{Coverage} = \sum_i (\text{Incidence}_i \times \text{Susceptibility}_i)
|
||||
```
|
||||
|
||||
For example, suppose:
|
||||
|
||||
@@ -69,7 +71,9 @@ For example, suppose:
|
||||
|
||||
Then:
|
||||
|
||||
$$\text{Coverage} = (0.6 \times 0.9) + (0.4 \times 0.7) = 0.82$$
|
||||
``` math
|
||||
\text{Coverage} = (0.6 \times 0.9) + (0.4 \times 0.7) = 0.82
|
||||
```
|
||||
|
||||
But in real data, incidence and susceptibility are **estimated from
|
||||
samples**, so they carry uncertainty. WISCA models this
|
||||
@@ -81,45 +85,53 @@ samples**, so they carry uncertainty. WISCA models this
|
||||
|
||||
Let:
|
||||
|
||||
- $K$ be the number of pathogens,
|
||||
- $\alpha = (1,1,\ldots,1)$ be a **Dirichlet** prior (uniform),
|
||||
- $n = \left( n_{1},\ldots,n_{K} \right)$ be the observed counts per
|
||||
species.
|
||||
- $`K`$ be the number of pathogens,
|
||||
- $`\alpha = (1, 1, \ldots, 1)`$ be a **Dirichlet** prior (uniform),
|
||||
- $`n = (n_1, \ldots, n_K)`$ be the observed counts per species.
|
||||
|
||||
Then the posterior incidence is:
|
||||
|
||||
$$p \sim \text{Dirichlet}\left( \alpha_{1} + n_{1},\ldots,\alpha_{K} + n_{K} \right)$$
|
||||
``` math
|
||||
p \sim \text{Dirichlet}(\alpha_1 + n_1, \ldots, \alpha_K + n_K)
|
||||
```
|
||||
|
||||
To simulate from this, we use:
|
||||
|
||||
$$x_{i} \sim \text{Gamma}\left( \alpha_{i} + n_{i},\ 1 \right),\quad p_{i} = \frac{x_{i}}{\sum\limits_{j = 1}^{K}x_{j}}$$
|
||||
``` math
|
||||
x_i \sim \text{Gamma}(\alpha_i + n_i,\ 1), \quad p_i = \frac{x_i}{\sum_{j=1}^{K} x_j}
|
||||
```
|
||||
|
||||
### Susceptibility
|
||||
|
||||
Each pathogen–regimen pair has a prior and data:
|
||||
|
||||
- Prior: $\text{Beta}\left( \alpha_{0},\beta_{0} \right)$, with default
|
||||
$\alpha_{0} = \beta_{0} = 1$
|
||||
- Data: $S$ susceptible out of $N$ tested
|
||||
- Prior: $`\text{Beta}(\alpha_0, \beta_0)`$, with default
|
||||
$`\alpha_0 = \beta_0 = 1`$
|
||||
- Data: $`S`$ susceptible out of $`N`$ tested
|
||||
|
||||
The $S$ category could also include values SDD (susceptible,
|
||||
The $`S`$ category could also include values SDD (susceptible,
|
||||
dose-dependent) and I (intermediate \[CLSI\], or susceptible, increased
|
||||
exposure \[EUCAST\]).
|
||||
|
||||
Then the posterior is:
|
||||
|
||||
$$\theta \sim \text{Beta}\left( \alpha_{0} + S,\ \beta_{0} + N - S \right)$$
|
||||
``` math
|
||||
\theta \sim \text{Beta}(\alpha_0 + S,\ \beta_0 + N - S)
|
||||
```
|
||||
|
||||
### Final coverage estimate
|
||||
|
||||
Putting it together:
|
||||
|
||||
1. Simulate pathogen incidence: $\mathbf{p} \sim \text{Dirichlet}$
|
||||
1. Simulate pathogen incidence:
|
||||
$`\boldsymbol{p} \sim \text{Dirichlet}`$
|
||||
2. Simulate susceptibility:
|
||||
$\theta_{i} \sim \text{Beta}\left( 1 + S_{i},\ 1 + R_{i} \right)$
|
||||
$`\theta_i \sim \text{Beta}(1 + S_i,\ 1 + R_i)`$
|
||||
3. Combine:
|
||||
|
||||
$$\text{Coverage} = \sum\limits_{i = 1}^{K}p_{i} \cdot \theta_{i}$$
|
||||
``` math
|
||||
\text{Coverage} = \sum_{i=1}^{K} p_i \cdot \theta_i
|
||||
```
|
||||
|
||||
Repeat this simulation (e.g. 1000×) and summarise:
|
||||
|
||||
@@ -131,6 +143,7 @@ Repeat this simulation (e.g. 1000×) and summarise:
|
||||
### Prepare data and simulate synthetic syndrome
|
||||
|
||||
``` r
|
||||
|
||||
library(AMR)
|
||||
data <- example_isolates
|
||||
|
||||
@@ -164,6 +177,7 @@ data$syndrome <- ifelse(data$mo %like% "coli", "UTI", "No UTI")
|
||||
### Basic WISCA antibiogram
|
||||
|
||||
``` r
|
||||
|
||||
wisca(data,
|
||||
antimicrobials = c("AMC", "CIP", "GEN")
|
||||
)
|
||||
@@ -176,18 +190,20 @@ wisca(data,
|
||||
### Use combination regimens
|
||||
|
||||
``` r
|
||||
|
||||
wisca(data,
|
||||
antimicrobials = c("AMC", "AMC + CIP", "AMC + GEN")
|
||||
)
|
||||
```
|
||||
|
||||
| Amoxicillin/clavulanic acid | Amoxicillin/clavulanic acid + Ciprofloxacin | Amoxicillin/clavulanic acid + Gentamicin |
|
||||
|:----------------------------|:--------------------------------------------|:-----------------------------------------|
|
||||
|:---|:---|:---|
|
||||
| 73.8% (71.8-75.7%) | 87.5% (85.9-89%) | 89.7% (88.2-91.1%) |
|
||||
|
||||
### Stratify by syndrome
|
||||
|
||||
``` r
|
||||
|
||||
wisca(data,
|
||||
antimicrobials = c("AMC", "AMC + CIP", "AMC + GEN"),
|
||||
syndromic_group = "syndrome"
|
||||
@@ -195,7 +211,7 @@ wisca(data,
|
||||
```
|
||||
|
||||
| Syndromic Group | Amoxicillin/clavulanic acid | Amoxicillin/clavulanic acid + Ciprofloxacin | Amoxicillin/clavulanic acid + Gentamicin |
|
||||
|:----------------|:----------------------------|:--------------------------------------------|:-----------------------------------------|
|
||||
|:---|:---|:---|:---|
|
||||
| No UTI | 70.1% (67.8-72.3%) | 85.2% (83.1-87.2%) | 87.1% (85.3-88.7%) |
|
||||
| UTI | 80.9% (77.7-83.8%) | 88.2% (85.7-90.5%) | 90.9% (88.7-93%) |
|
||||
|
||||
@@ -204,6 +220,7 @@ for the [`wisca()`](https://amr-for-r.org/reference/antibiogram.md)
|
||||
function too:
|
||||
|
||||
``` r
|
||||
|
||||
wisca(data,
|
||||
antimicrobials = c("AMC", "AMC + CIP", "AMC + GEN"),
|
||||
syndromic_group = gsub("UTI", "UCI", data$syndrome),
|
||||
@@ -212,7 +229,7 @@ wisca(data,
|
||||
```
|
||||
|
||||
| Grupo sindrómico | Amoxicilina/ácido clavulánico | Amoxicilina/ácido clavulánico + Ciprofloxacina | Amoxicilina/ácido clavulánico + Gentamicina |
|
||||
|:-----------------|:------------------------------|:-----------------------------------------------|:--------------------------------------------|
|
||||
|:---|:---|:---|:---|
|
||||
| No UCI | 70% (67.8-72.4%) | 85.3% (83.3-87.2%) | 87% (85.3-88.8%) |
|
||||
| UCI | 80.9% (77.7-83.9%) | 88.2% (85.5-90.6%) | 90.9% (88.7-93%) |
|
||||
|
||||
@@ -242,6 +259,7 @@ WISCA enables:
|
||||
It is available in the `AMR` package via either:
|
||||
|
||||
``` r
|
||||
|
||||
wisca(...)
|
||||
|
||||
antibiogram(..., wisca = TRUE)
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -80,7 +80,7 @@
|
||||
<main id="main" class="col-md-9"><div class="page-header">
|
||||
<img src="../logo.svg" class="logo" alt=""><h1>Download data sets for download / own use</h1>
|
||||
|
||||
<h4 data-toc-skip class="date">25 April 2026</h4>
|
||||
<h4 data-toc-skip class="date">30 April 2026</h4>
|
||||
|
||||
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
|
||||
<div class="d-none name"><code>datasets.Rmd</code></div>
|
||||
|
||||
@@ -79,7 +79,7 @@ Included (sub)species per taxonomic kingdom:
|
||||
First 6 rows when filtering on genus *Escherichia*:
|
||||
|
||||
| mo | fullname | status | kingdom | phylum | class | order | family | genus | species | subspecies | rank | ref | oxygen_tolerance | source | lpsn | lpsn_parent | lpsn_renamed_to | mycobank | mycobank_parent | mycobank_renamed_to | gbif | gbif_parent | gbif_renamed_to | prevalence | snomed |
|
||||
|:-----------------:|:--------------------------:|:--------:|:--------:|:--------------:|:-------------------:|:----------------:|:------------------:|:-----------:|:--------------:|:----------:|:----------:|:-----------------------:|:---------------------------:|:------:|:------:|:-----------:|:---------------:|:--------:|:---------------:|:-------------------:|:--------:|:-----------:|:---------------:|:----------:|:-----------------------------------------:|
|
||||
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
|
||||
| B_ESCHR | Escherichia | accepted | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | | | genus | Castellani et al., 1919 | facultative anaerobe | LPSN | 515602 | 482 | | | | | | 11158430 | | 1 | 407310004, 407251000, 407281008, … |
|
||||
| B_ESCHR_ADCR | Escherichia adecarboxylata | synonym | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | adecarboxylata | | species | Leclerc, 1962 | likely facultative anaerobe | LPSN | 776052 | 515602 | 777447 | | | | | | | 1 | |
|
||||
| B_ESCHR_ALBR | Escherichia albertii | accepted | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | albertii | | species | Huys et al., 2003 | facultative anaerobe | LPSN | 776053 | 515602 | | | | | 5427575 | | | 1 | 419388003 |
|
||||
@@ -135,7 +135,7 @@ as comma separated values.
|
||||
**Example content**
|
||||
|
||||
| ab | cid | name | group | atc | atc_group1 | atc_group2 | abbreviations | synonyms | oral_ddd | oral_units | iv_ddd | iv_units | loinc |
|
||||
|:---:|:--------:|:---------------------------:|:----------------------------------------------:|:------------------------------:|:-------------------------------------------:|:------------------------------------------------------------:|:-------------------:|:-------------------------------------------------------:|:--------:|:----------:|:------:|:--------:|:------------------------------:|
|
||||
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
|
||||
| AMK | 37768 | Amikacin | Aminoglycosides | D06AX12, J01GB06, QD06AX12, … | Aminoglycoside antibacterials | Other aminoglycosides | ak, ami, amik, … | amikacillin, amikacina, amikacine, … | | | 1.0 | g | 101493-5, 11-7, 12-5, … |
|
||||
| AMX | 33613 | Amoxicillin | Aminopenicillins, Penicillins, Beta-lactams | J01CA04, QG51AA03, QJ01CA04 | Beta-lactam antibacterials, penicillins | Penicillins with extended spectrum | ac, amox, amoxic, … | acuotricina, alfamox, alfida, … | 1.5 | g | 3.0 | g | 101498-4, 15-8, 16-6, … |
|
||||
| AMC | 23665637 | Amoxicillin/clavulanic acid | Aminopenicillins, Penicillins, Beta-lactams, … | J01CR02, QJ01CR02 | Beta-lactam antibacterials, penicillins | Combinations of penicillins, incl. beta-lactamase inhibitors | a/c, amcl, aml, … | amocla, amoclan, amoclav, … | 1.5 | g | 3.0 | g | |
|
||||
@@ -187,7 +187,7 @@ here](https://amr-for-r.org/reference/clinical_breakpoints.html).
|
||||
**Example content**
|
||||
|
||||
| guideline | type | host | method | site | mo | mo_name | rank_index | ab | ab_name | ref_tbl | disk_dose | breakpoint_S | breakpoint_R | uti | is_SDD |
|
||||
|:-----------:|:-----:|:-----:|:------:|:----:|:-------------:|:--------------------------:|:----------:|:---:|:-----------------------------:|:---------------:|:--------------:|:------------:|:------------:|:-----:|:------:|
|
||||
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
|
||||
| EUCAST 2026 | human | human | DISK | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | MEM | Meropenem | A. xylosoxidans | 10 mcg | 26.000 | 20.000 | FALSE | FALSE |
|
||||
| EUCAST 2026 | human | human | MIC | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | MEM | Meropenem | A. xylosoxidans | | 1.000 | 4.000 | FALSE | FALSE |
|
||||
| EUCAST 2026 | human | human | DISK | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | SXT | Trimethoprim/sulfamethoxazole | A. xylosoxidans | 1.25/23.75 mcg | 26.000 | 26.000 | FALSE | FALSE |
|
||||
@@ -237,7 +237,7 @@ here](https://amr-for-r.org/reference/microorganisms.groups.html).
|
||||
**Example content**
|
||||
|
||||
| mo_group | mo | mo_group_name | mo_name |
|
||||
|:--------------:|:------------:|:-------------------------------:|:---------------------------:|
|
||||
|:--:|:--:|:--:|:--:|
|
||||
| B_ACNTB_BMNN-C | B_ACNTB_BMNN | Acinetobacter baumannii complex | Acinetobacter baumannii |
|
||||
| B_ACNTB_BMNN-C | B_ACNTB_CLCC | Acinetobacter baumannii complex | Acinetobacter calcoaceticus |
|
||||
| B_ACNTB_BMNN-C | B_ACNTB_LCTC | Acinetobacter baumannii complex | Acinetobacter dijkshoorniae |
|
||||
@@ -395,7 +395,7 @@ here](https://amr-for-r.org/reference/dosage.html).
|
||||
**Example content**
|
||||
|
||||
| ab | name | type | dose | dose_times | administration | notes | original_txt | eucast_version |
|
||||
|:---:|:-----------:|:-----------------:|:-----------:|:----------:|:--------------:|:-----:|:------------------:|:--------------:|
|
||||
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
|
||||
| AMK | Amikacin | standard_dosage | 25-30 mg/kg | 1 | iv | | 25-30 mg/kg x 1 iv | 15 |
|
||||
| AMX | Amoxicillin | high_dosage | 2 g | 6 | iv | | 2 g x 6 iv | 15 |
|
||||
| AMX | Amoxicillin | standard_dosage | 1 g | 3 | iv | | 1 g x 3-4 iv | 15 |
|
||||
@@ -425,7 +425,7 @@ here](https://amr-for-r.org/reference/example_isolates.html).
|
||||
**Example content**
|
||||
|
||||
| date | patient | age | gender | ward | mo | PEN | OXA | FLC | AMX | AMC | AMP | TZP | CZO | FEP | CXM | FOX | CTX | CAZ | CRO | GEN | TOB | AMK | KAN | TMP | SXT | NIT | FOS | LNZ | CIP | MFX | VAN | TEC | TCY | TGC | DOX | ERY | CLI | AZM | IPM | MEM | MTR | CHL | COL | MUP | RIF |
|
||||
|:----------:|:-------:|:---:|:------:|:--------:|:------------:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
|
||||
| 2002-01-02 | A77334 | 65 | F | Clinical | B_ESCHR_COLI | R | | | | I | | | | | I | | | | | | | | | R | R | | | R | | | R | R | R | | | R | R | R | | | | | | | R |
|
||||
| 2002-01-03 | A77334 | 65 | F | Clinical | B_ESCHR_COLI | R | | | | I | | | | | I | | | | | | | | | R | R | | | R | | | R | R | R | | | R | R | R | | | | | | | R |
|
||||
| 2002-01-07 | 067927 | 45 | F | ICU | B_STPHY_EPDR | R | | R | | | | | | | R | | | R | | | | | | S | S | | | | | | S | | S | S | S | R | | R | | | | | R | | |
|
||||
@@ -556,7 +556,7 @@ contain the trade names and LOINC codes as comma separated values.
|
||||
**Example content**
|
||||
|
||||
| av | name | atc | cid | atc_group | synonyms | oral_ddd | oral_units | iv_ddd | iv_units | loinc |
|
||||
|:---:|:------------------:|:-------:|:---------:|:------------------------------------------------------------------:|:-----------------------------------------------------:|:--------:|:----------:|:------:|:--------:|:----------------------------:|
|
||||
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
|
||||
| ABA | Abacavir | J05AF06 | 441300 | Nucleoside and nucleotide reverse transcriptase inhibitors | abacavir sulfate, avacavir, ziagen | 0.6 | g | | | 29113-8, 30273-7, 30287-7, … |
|
||||
| ACI | Aciclovir | J05AB01 | 135398513 | Nucleosides and nucleotides excl. reverse transcriptase inhibitors | acicloftal, aciclovier, aciclovirum, … | 4.0 | g | 4 | g | |
|
||||
| ADD | Adefovir dipivoxil | J05AF08 | 60871 | Nucleoside and nucleotide reverse transcriptase inhibitors | adefovir di, adefovir di ester, adefovir dipivoxyl, … | 10.0 | mg | | | |
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
135
index.html
135
index.html
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -145,24 +145,26 @@
|
||||
<span><span class="co">#> ℹ Using column mo as input for `mo_fullname()`</span></span>
|
||||
<span><span class="co">#> ℹ Using column mo as input for `mo_is_gram_negative()`</span></span>
|
||||
<span><span class="co">#> ℹ Using column mo as input for `mo_is_intrinsic_resistant()`</span></span>
|
||||
<span><span class="co">#> ℹ Determining intrinsic resistance based on 'EUCAST Expected Resistant</span></span>
|
||||
<span><span class="co">#> Phenotypes' v1.2 (2023). This note will be shown once per session.</span></span>
|
||||
<span><span class="co">#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK</span></span>
|
||||
<span><span class="co">#> (amikacin), and KAN (kanamycin)</span></span>
|
||||
<span><span class="co">#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)</span></span>
|
||||
<span><span class="co">#> ℹ Determining intrinsic resistance based on 'EUCAST Expected</span></span>
|
||||
<span><span class="co">#> Resistant Phenotypes' v1.2 (2023). This note will be shown</span></span>
|
||||
<span><span class="co">#> once per session.</span></span>
|
||||
<span><span class="co">#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB</span></span>
|
||||
<span><span class="co">#> (tobramycin), AMK (amikacin), and KAN (kanamycin)</span></span>
|
||||
<span><span class="co">#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM</span></span>
|
||||
<span><span class="co">#> (meropenem)</span></span>
|
||||
<span><span class="co">#> # A tibble: 35 × 7</span></span>
|
||||
<span><span class="co">#> bacteria GEN TOB AMK KAN IPM MEM </span></span>
|
||||
<span><span class="co">#> <chr> <sir> <sir> <sir> <sir> <sir> <sir></span></span>
|
||||
<span><span class="co">#> 1 Pseudomonas aeruginosa I S NA R S NA </span></span>
|
||||
<span><span class="co">#> 2 Pseudomonas aeruginosa I S NA R S NA </span></span>
|
||||
<span><span class="co">#> 3 Pseudomonas aeruginosa I S NA R S NA </span></span>
|
||||
<span><span class="co">#> 4 Pseudomonas aeruginosa S S S R NA S </span></span>
|
||||
<span><span class="co">#> 5 Pseudomonas aeruginosa S S S R S S </span></span>
|
||||
<span><span class="co">#> 6 Pseudomonas aeruginosa S S S R S S </span></span>
|
||||
<span><span class="co">#> 7 Stenotrophomonas maltophilia R R R R R R </span></span>
|
||||
<span><span class="co">#> 8 Pseudomonas aeruginosa S S S R NA S </span></span>
|
||||
<span><span class="co">#> 9 Pseudomonas aeruginosa S S S R NA S </span></span>
|
||||
<span><span class="co">#> 10 Pseudomonas aeruginosa S S S R S S </span></span>
|
||||
<span><span class="co">#> 1 Pseudomonas aer… I S NA R S NA </span></span>
|
||||
<span><span class="co">#> 2 Pseudomonas aer… I S NA R S NA </span></span>
|
||||
<span><span class="co">#> 3 Pseudomonas aer… I S NA R S NA </span></span>
|
||||
<span><span class="co">#> 4 Pseudomonas aer… S S S R NA S </span></span>
|
||||
<span><span class="co">#> 5 Pseudomonas aer… S S S R S S </span></span>
|
||||
<span><span class="co">#> 6 Pseudomonas aer… S S S R S S </span></span>
|
||||
<span><span class="co">#> 7 Stenotrophomona… R R R R R R </span></span>
|
||||
<span><span class="co">#> 8 Pseudomonas aer… S S S R NA S </span></span>
|
||||
<span><span class="co">#> 9 Pseudomonas aer… S S S R NA S </span></span>
|
||||
<span><span class="co">#> 10 Pseudomonas aer… S S S R S S </span></span>
|
||||
<span><span class="co">#> # ℹ 25 more rows</span></span></code></pre></div>
|
||||
<p>With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (<code><a href="reference/mo_property.html">mo_is_gram_negative()</a></code> and <code><a href="reference/mo_property.html">mo_is_intrinsic_resistant()</a></code>) and a column selection on two antibiotic groups (<code><a href="reference/antimicrobial_selectors.html">aminoglycosides()</a></code> and <code><a href="reference/antimicrobial_selectors.html">carbapenems()</a></code>), the reference data about <a href="./reference/microorganisms.html">all microorganisms</a> and <a href="./reference/antimicrobials.html">all antimicrobials</a> in the <code>AMR</code> package make sure you get what you meant.</p>
|
||||
</div>
|
||||
@@ -174,20 +176,21 @@
|
||||
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span><span class="fu"><a href="reference/antibiogram.html">antibiogram</a></span><span class="op">(</span><span class="va">example_isolates</span>,</span>
|
||||
<span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="reference/antimicrobial_selectors.html">aminoglycosides</a></span><span class="op">(</span><span class="op">)</span>, <span class="fu"><a href="reference/antimicrobial_selectors.html">carbapenems</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span><span class="op">)</span></span>
|
||||
<span><span class="co">#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK</span></span>
|
||||
<span><span class="co">#> (amikacin), and KAN (kanamycin)</span></span>
|
||||
<span><span class="co">#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)</span></span></code></pre></div>
|
||||
<table style="width:100%;" class="table">
|
||||
<span><span class="co">#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB</span></span>
|
||||
<span><span class="co">#> (tobramycin), AMK (amikacin), and KAN (kanamycin)</span></span>
|
||||
<span><span class="co">#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM</span></span>
|
||||
<span><span class="co">#> (meropenem)</span></span></code></pre></div>
|
||||
<table class="table">
|
||||
<colgroup>
|
||||
<col width="12%">
|
||||
<col width="15%">
|
||||
<col width="14%">
|
||||
<col width="14%">
|
||||
<col width="14%">
|
||||
<col width="14%">
|
||||
<col width="14%">
|
||||
<col width="14%">
|
||||
<col width="15%">
|
||||
<col width="11%">
|
||||
<col width="15%">
|
||||
<col width="14%">
|
||||
</colgroup>
|
||||
<thead><tr class="header">
|
||||
<thead><tr>
|
||||
<th align="left">Pathogen</th>
|
||||
<th align="left">Amikacin</th>
|
||||
<th align="left">Gentamicin</th>
|
||||
@@ -197,7 +200,7 @@
|
||||
<th align="left">Tobramycin</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<tr>
|
||||
<td align="left">CoNS</td>
|
||||
<td align="left">0% (0-8%,N=43)</td>
|
||||
<td align="left">86% (82-90%,N=309)</td>
|
||||
@@ -206,7 +209,7 @@
|
||||
<td align="left">52% (37-67%,N=48)</td>
|
||||
<td align="left">22% (12-35%,N=55)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<tr>
|
||||
<td align="left"><em>E. coli</em></td>
|
||||
<td align="left">100% (98-100%,N=171)</td>
|
||||
<td align="left">98% (96-99%,N=460)</td>
|
||||
@@ -215,7 +218,7 @@
|
||||
<td align="left">100% (99-100%,N=418)</td>
|
||||
<td align="left">97% (96-99%,N=462)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<tr>
|
||||
<td align="left"><em>E. faecalis</em></td>
|
||||
<td align="left">0% (0-9%,N=39)</td>
|
||||
<td align="left">0% (0-9%,N=39)</td>
|
||||
@@ -224,7 +227,7 @@
|
||||
<td align="left">NA</td>
|
||||
<td align="left">0% (0-9%,N=39)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<tr>
|
||||
<td align="left"><em>K. pneumoniae</em></td>
|
||||
<td align="left">NA</td>
|
||||
<td align="left">90% (79-96%,N=58)</td>
|
||||
@@ -233,7 +236,7 @@
|
||||
<td align="left">100% (93-100%,N=53)</td>
|
||||
<td align="left">90% (79-96%,N=58)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<tr>
|
||||
<td align="left"><em>P. aeruginosa</em></td>
|
||||
<td align="left">NA</td>
|
||||
<td align="left">100% (88-100%,N=30)</td>
|
||||
@@ -242,7 +245,7 @@
|
||||
<td align="left">NA</td>
|
||||
<td align="left">100% (88-100%,N=30)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<tr>
|
||||
<td align="left"><em>P. mirabilis</em></td>
|
||||
<td align="left">NA</td>
|
||||
<td align="left">94% (80-99%,N=34)</td>
|
||||
@@ -251,7 +254,7 @@
|
||||
<td align="left">NA</td>
|
||||
<td align="left">94% (80-99%,N=34)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<tr>
|
||||
<td align="left"><em>S. aureus</em></td>
|
||||
<td align="left">NA</td>
|
||||
<td align="left">99% (97-100%,N=233)</td>
|
||||
@@ -260,7 +263,7 @@
|
||||
<td align="left">NA</td>
|
||||
<td align="left">98% (92-100%,N=86)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<tr>
|
||||
<td align="left"><em>S. epidermidis</em></td>
|
||||
<td align="left">0% (0-8%,N=44)</td>
|
||||
<td align="left">79% (71-85%,N=163)</td>
|
||||
@@ -269,7 +272,7 @@
|
||||
<td align="left">NA</td>
|
||||
<td align="left">51% (40-61%,N=89)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<tr>
|
||||
<td align="left"><em>S. hominis</em></td>
|
||||
<td align="left">NA</td>
|
||||
<td align="left">92% (84-97%,N=80)</td>
|
||||
@@ -278,7 +281,7 @@
|
||||
<td align="left">NA</td>
|
||||
<td align="left">85% (74-93%,N=62)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<tr>
|
||||
<td align="left"><em>S. pneumoniae</em></td>
|
||||
<td align="left">0% (0-3%,N=117)</td>
|
||||
<td align="left">0% (0-3%,N=117)</td>
|
||||
@@ -296,25 +299,25 @@
|
||||
<span> mo_transform <span class="op">=</span> <span class="st">"gramstain"</span><span class="op">)</span></span></code></pre></div>
|
||||
<table class="table">
|
||||
<colgroup>
|
||||
<col width="25%">
|
||||
<col width="25%">
|
||||
<col width="25%">
|
||||
<col width="25%">
|
||||
<col width="12%">
|
||||
<col width="21%">
|
||||
<col width="32%">
|
||||
<col width="32%">
|
||||
</colgroup>
|
||||
<thead><tr class="header">
|
||||
<thead><tr>
|
||||
<th align="left">Pathogen</th>
|
||||
<th align="left">Piperacillin/tazobactam</th>
|
||||
<th align="left">Piperacillin/tazobactam + Gentamicin</th>
|
||||
<th align="left">Piperacillin/tazobactam + Tobramycin</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<tr>
|
||||
<td align="left">Gram-negative</td>
|
||||
<td align="left">88% (85-91%,N=641)</td>
|
||||
<td align="left">99% (97-99%,N=691)</td>
|
||||
<td align="left">98% (97-99%,N=693)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<tr>
|
||||
<td align="left">Gram-positive</td>
|
||||
<td align="left">86% (82-89%,N=345)</td>
|
||||
<td align="left">98% (96-98%,N=1044)</td>
|
||||
@@ -336,20 +339,20 @@
|
||||
<col width="26%">
|
||||
<col width="26%">
|
||||
</colgroup>
|
||||
<thead><tr class="header">
|
||||
<thead><tr>
|
||||
<th align="left">Збудник</th>
|
||||
<th align="left">Гентаміцин</th>
|
||||
<th align="left">Тобраміцин</th>
|
||||
<th align="left">Ципрофлоксацин</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<tr>
|
||||
<td align="left">Грамнегативні</td>
|
||||
<td align="left">96% (95-98%,N=684)</td>
|
||||
<td align="left">96% (94-97%,N=686)</td>
|
||||
<td align="left">91% (88-93%,N=684)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<tr>
|
||||
<td align="left">Грампозитивні</td>
|
||||
<td align="left">63% (60-66%,N=1170)</td>
|
||||
<td align="left">34% (31-38%,N=665)</td>
|
||||
@@ -404,16 +407,18 @@
|
||||
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/across.html" class="external-link">across</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="va">GEN</span>, <span class="va">TOB</span><span class="op">)</span>,</span>
|
||||
<span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>total_R <span class="op">=</span> <span class="va">resistance</span>,</span>
|
||||
<span> conf_int <span class="op">=</span> <span class="kw">function</span><span class="op">(</span><span class="va">x</span><span class="op">)</span> <span class="fu"><a href="reference/proportion.html">sir_confidence_interval</a></span><span class="op">(</span><span class="va">x</span>, collapse <span class="op">=</span> <span class="st">"-"</span><span class="op">)</span><span class="op">)</span><span class="op">)</span><span class="op">)</span></span>
|
||||
<span><span class="co">#> ℹ `resistance()` assumes the EUCAST guideline and thus considers the 'I'</span></span>
|
||||
<span><span class="co">#> category susceptible. Set the `guideline` argument or the `AMR_guideline`</span></span>
|
||||
<span><span class="co">#> option to either "CLSI" or "EUCAST", see `?AMR-options`.</span></span>
|
||||
<span><span class="co">#> ℹ `resistance()` assumes the EUCAST guideline and thus</span></span>
|
||||
<span><span class="co">#> considers the 'I' category susceptible. Set the `guideline`</span></span>
|
||||
<span><span class="co">#> argument or the `AMR_guideline` option to either "CLSI" or</span></span>
|
||||
<span><span class="co">#> "EUCAST", see `?AMR-options`.</span></span>
|
||||
<span><span class="co">#> ℹ This message will be shown once per session.</span></span>
|
||||
<span><span class="co">#> # A tibble: 3 × 5</span></span>
|
||||
<span><span class="co">#> ward GEN_total_R GEN_conf_int TOB_total_R TOB_conf_int</span></span>
|
||||
<span><span class="co">#> <chr> <dbl> <chr> <dbl> <chr> </span></span>
|
||||
<span><span class="co">#> 1 Clinical 0.229 0.205-0.254 0.315 0.284-0.347 </span></span>
|
||||
<span><span class="co">#> 2 ICU 0.290 0.253-0.33 0.400 0.353-0.449 </span></span>
|
||||
<span><span class="co">#> 3 Outpatient 0.2 0.131-0.285 0.368 0.254-0.493</span></span></code></pre></div>
|
||||
<span><span class="co">#> ward GEN_total_R GEN_conf_int TOB_total_R</span></span>
|
||||
<span><span class="co">#> <chr> <dbl> <chr> <dbl></span></span>
|
||||
<span><span class="co">#> 1 Clinical 0.229 0.205-0.254 0.315</span></span>
|
||||
<span><span class="co">#> 2 ICU 0.290 0.253-0.33 0.400</span></span>
|
||||
<span><span class="co">#> 3 Outpatient 0.2 0.131-0.285 0.368</span></span>
|
||||
<span><span class="co">#> # ℹ 1 more variable: TOB_conf_int <chr></span></span></code></pre></div>
|
||||
<p>Or use <a href="https://amr-for-r.org/reference/antimicrobial_selectors.html">antimicrobial selectors</a> to select a series of antibiotic columns:</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://amr-for-r.org">AMR</a></span><span class="op">)</span></span>
|
||||
@@ -425,15 +430,16 @@
|
||||
<span> <span class="co"># calculate AMR using resistance(), over all aminoglycosides and polymyxins:</span></span>
|
||||
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarise</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/across.html" class="external-link">across</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="reference/antimicrobial_selectors.html">aminoglycosides</a></span><span class="op">(</span><span class="op">)</span>, <span class="fu"><a href="reference/antimicrobial_selectors.html">polymyxins</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span>,</span>
|
||||
<span> <span class="va">resistance</span><span class="op">)</span><span class="op">)</span></span>
|
||||
<span><span class="co">#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK</span></span>
|
||||
<span><span class="co">#> (amikacin), and KAN (kanamycin)</span></span>
|
||||
<span><span class="co">#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB</span></span>
|
||||
<span><span class="co">#> (tobramycin), AMK (amikacin), and KAN (kanamycin)</span></span>
|
||||
<span><span class="co">#> ℹ For `polymyxins()` using column COL (colistin)</span></span>
|
||||
<span><span class="co">#> Warning: There was 1 warning in `summarise()`.</span></span>
|
||||
<span><span class="co">#> ℹ In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`.</span></span>
|
||||
<span><span class="co">#> ℹ In argument: `across(c(aminoglycosides(), polymyxins()),</span></span>
|
||||
<span><span class="co">#> resistance)`.</span></span>
|
||||
<span><span class="co">#> ℹ In group 3: `ward = "Outpatient"`.</span></span>
|
||||
<span><span class="co">#> Caused by warning:</span></span>
|
||||
<span><span class="co">#> ! Introducing NA: only 23 results available for KAN in group: ward = "Outpatient"</span></span>
|
||||
<span><span class="co">#> (whilst `minimum = 30`).</span></span>
|
||||
<span><span class="co">#> ! Introducing NA: only 23 results available for KAN in group:</span></span>
|
||||
<span><span class="co">#> ward = "Outpatient" (whilst `minimum = 30`).</span></span>
|
||||
<span><span class="va">out</span></span>
|
||||
<span><span class="co">#> # A tibble: 3 × 6</span></span>
|
||||
<span><span class="co">#> ward GEN TOB AMK KAN COL</span></span>
|
||||
@@ -445,11 +451,12 @@
|
||||
<code class="sourceCode R"><span><span class="co"># transform the antibiotic columns to names:</span></span>
|
||||
<span><span class="va">out</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="reference/ab_property.html">set_ab_names</a></span><span class="op">(</span><span class="op">)</span></span>
|
||||
<span><span class="co">#> # A tibble: 3 × 6</span></span>
|
||||
<span><span class="co">#> ward gentamicin tobramycin amikacin kanamycin colistin</span></span>
|
||||
<span><span class="co">#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl></span></span>
|
||||
<span><span class="co">#> 1 Clinical 0.229 0.315 0.626 1 0.780</span></span>
|
||||
<span><span class="co">#> 2 ICU 0.290 0.400 0.662 1 0.857</span></span>
|
||||
<span><span class="co">#> 3 Outpatient 0.2 0.368 0.605 NA 0.889</span></span></code></pre></div>
|
||||
<span><span class="co">#> ward gentamicin tobramycin amikacin kanamycin</span></span>
|
||||
<span><span class="co">#> <chr> <dbl> <dbl> <dbl> <dbl></span></span>
|
||||
<span><span class="co">#> 1 Clinical 0.229 0.315 0.626 1</span></span>
|
||||
<span><span class="co">#> 2 ICU 0.290 0.400 0.662 1</span></span>
|
||||
<span><span class="co">#> 3 Outpatient 0.2 0.368 0.605 NA</span></span>
|
||||
<span><span class="co">#> # ℹ 1 more variable: colistin <dbl></span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span><span class="co"># transform the antibiotic column to ATC codes:</span></span>
|
||||
<span><span class="va">out</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="reference/ab_property.html">set_ab_names</a></span><span class="op">(</span>property <span class="op">=</span> <span class="st">"atc"</span><span class="op">)</span></span>
|
||||
|
||||
94
index.md
94
index.md
@@ -100,6 +100,7 @@ selectors](https://amr-for-r.org/reference/antimicrobial_selectors.html),
|
||||
which work in base R, `dplyr` and `data.table`.
|
||||
|
||||
``` r
|
||||
|
||||
# AMR works great with dplyr, but it's not required or neccesary
|
||||
library(AMR)
|
||||
library(dplyr, warn.conflicts = FALSE)
|
||||
@@ -116,24 +117,26 @@ example_isolates %>%
|
||||
#> ℹ Using column mo as input for `mo_fullname()`
|
||||
#> ℹ Using column mo as input for `mo_is_gram_negative()`
|
||||
#> ℹ Using column mo as input for `mo_is_intrinsic_resistant()`
|
||||
#> ℹ Determining intrinsic resistance based on 'EUCAST Expected Resistant
|
||||
#> Phenotypes' v1.2 (2023). This note will be shown once per session.
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||
#> (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
|
||||
#> ℹ Determining intrinsic resistance based on 'EUCAST Expected
|
||||
#> Resistant Phenotypes' v1.2 (2023). This note will be shown
|
||||
#> once per session.
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB
|
||||
#> (tobramycin), AMK (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM
|
||||
#> (meropenem)
|
||||
#> # A tibble: 35 × 7
|
||||
#> bacteria GEN TOB AMK KAN IPM MEM
|
||||
#> <chr> <sir> <sir> <sir> <sir> <sir> <sir>
|
||||
#> 1 Pseudomonas aeruginosa I S NA R S NA
|
||||
#> 2 Pseudomonas aeruginosa I S NA R S NA
|
||||
#> 3 Pseudomonas aeruginosa I S NA R S NA
|
||||
#> 4 Pseudomonas aeruginosa S S S R NA S
|
||||
#> 5 Pseudomonas aeruginosa S S S R S S
|
||||
#> 6 Pseudomonas aeruginosa S S S R S S
|
||||
#> 7 Stenotrophomonas maltophilia R R R R R R
|
||||
#> 8 Pseudomonas aeruginosa S S S R NA S
|
||||
#> 9 Pseudomonas aeruginosa S S S R NA S
|
||||
#> 10 Pseudomonas aeruginosa S S S R S S
|
||||
#> 1 Pseudomonas aer… I S NA R S NA
|
||||
#> 2 Pseudomonas aer… I S NA R S NA
|
||||
#> 3 Pseudomonas aer… I S NA R S NA
|
||||
#> 4 Pseudomonas aer… S S S R NA S
|
||||
#> 5 Pseudomonas aer… S S S R S S
|
||||
#> 6 Pseudomonas aer… S S S R S S
|
||||
#> 7 Stenotrophomona… R R R R R R
|
||||
#> 8 Pseudomonas aer… S S S R NA S
|
||||
#> 9 Pseudomonas aer… S S S R NA S
|
||||
#> 10 Pseudomonas aer… S S S R S S
|
||||
#> # ℹ 25 more rows
|
||||
```
|
||||
|
||||
@@ -161,15 +164,17 @@ If used inside [R Markdown](https://rmarkdown.rstudio.com) or
|
||||
output format automatically (such as markdown, LaTeX, HTML, etc.).
|
||||
|
||||
``` r
|
||||
|
||||
antibiogram(example_isolates,
|
||||
antimicrobials = c(aminoglycosides(), carbapenems()))
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||
#> (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB
|
||||
#> (tobramycin), AMK (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM
|
||||
#> (meropenem)
|
||||
```
|
||||
|
||||
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|
||||
|:-----------------|:---------------------|:--------------------|:---------------------|:----------------|:---------------------|:--------------------|
|
||||
|:---|:---|:---|:---|:---|:---|:---|
|
||||
| CoNS | 0% (0-8%,N=43) | 86% (82-90%,N=309) | 52% (37-67%,N=48) | 0% (0-8%,N=43) | 52% (37-67%,N=48) | 22% (12-35%,N=55) |
|
||||
| *E. coli* | 100% (98-100%,N=171) | 98% (96-99%,N=460) | 100% (99-100%,N=422) | NA | 100% (99-100%,N=418) | 97% (96-99%,N=462) |
|
||||
| *E. faecalis* | 0% (0-9%,N=39) | 0% (0-9%,N=39) | 100% (91-100%,N=38) | 0% (0-9%,N=39) | NA | 0% (0-9%,N=39) |
|
||||
@@ -185,13 +190,14 @@ In combination antibiograms, it is clear that combined antimicrobials
|
||||
yield higher empiric coverage:
|
||||
|
||||
``` r
|
||||
|
||||
antibiogram(example_isolates,
|
||||
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
|
||||
mo_transform = "gramstain")
|
||||
```
|
||||
|
||||
| Pathogen | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|
||||
|:--------------|:------------------------|:-------------------------------------|:-------------------------------------|
|
||||
|:---|:---|:---|:---|
|
||||
| Gram-negative | 88% (85-91%,N=641) | 99% (97-99%,N=691) | 98% (97-99%,N=693) |
|
||||
| Gram-positive | 86% (82-89%,N=345) | 98% (96-98%,N=1044) | 95% (93-97%,N=550) |
|
||||
|
||||
@@ -201,6 +207,7 @@ with support for 28 languages that are often detected automatically
|
||||
based on system language:
|
||||
|
||||
``` r
|
||||
|
||||
antibiogram(example_isolates,
|
||||
antimicrobials = c("cipro", "tobra", "genta"), # any arbitrary name or code will work
|
||||
mo_transform = "gramstain",
|
||||
@@ -221,6 +228,7 @@ with new scale functions, to allow plotting of log2-distributed MIC
|
||||
values and SIR values.
|
||||
|
||||
``` r
|
||||
|
||||
library(ggplot2)
|
||||
library(AMR)
|
||||
|
||||
@@ -258,6 +266,7 @@ For a manual approach, you can use the `resistance` or
|
||||
function:
|
||||
|
||||
``` r
|
||||
|
||||
example_isolates %>%
|
||||
# group by ward:
|
||||
group_by(ward) %>%
|
||||
@@ -266,16 +275,18 @@ example_isolates %>%
|
||||
summarise(across(c(GEN, TOB),
|
||||
list(total_R = resistance,
|
||||
conf_int = function(x) sir_confidence_interval(x, collapse = "-"))))
|
||||
#> ℹ `resistance()` assumes the EUCAST guideline and thus considers the 'I'
|
||||
#> category susceptible. Set the `guideline` argument or the `AMR_guideline`
|
||||
#> option to either "CLSI" or "EUCAST", see `?AMR-options`.
|
||||
#> ℹ `resistance()` assumes the EUCAST guideline and thus
|
||||
#> considers the 'I' category susceptible. Set the `guideline`
|
||||
#> argument or the `AMR_guideline` option to either "CLSI" or
|
||||
#> "EUCAST", see `?AMR-options`.
|
||||
#> ℹ This message will be shown once per session.
|
||||
#> # A tibble: 3 × 5
|
||||
#> ward GEN_total_R GEN_conf_int TOB_total_R TOB_conf_int
|
||||
#> <chr> <dbl> <chr> <dbl> <chr>
|
||||
#> 1 Clinical 0.229 0.205-0.254 0.315 0.284-0.347
|
||||
#> 2 ICU 0.290 0.253-0.33 0.400 0.353-0.449
|
||||
#> 3 Outpatient 0.2 0.131-0.285 0.368 0.254-0.493
|
||||
#> ward GEN_total_R GEN_conf_int TOB_total_R
|
||||
#> <chr> <dbl> <chr> <dbl>
|
||||
#> 1 Clinical 0.229 0.205-0.254 0.315
|
||||
#> 2 ICU 0.290 0.253-0.33 0.400
|
||||
#> 3 Outpatient 0.2 0.131-0.285 0.368
|
||||
#> # ℹ 1 more variable: TOB_conf_int <chr>
|
||||
```
|
||||
|
||||
Or use [antimicrobial
|
||||
@@ -283,6 +294,7 @@ selectors](https://amr-for-r.org/reference/antimicrobial_selectors.html)
|
||||
to select a series of antibiotic columns:
|
||||
|
||||
``` r
|
||||
|
||||
library(AMR)
|
||||
library(dplyr)
|
||||
|
||||
@@ -292,15 +304,16 @@ out <- example_isolates %>%
|
||||
# calculate AMR using resistance(), over all aminoglycosides and polymyxins:
|
||||
summarise(across(c(aminoglycosides(), polymyxins()),
|
||||
resistance))
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||
#> (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB
|
||||
#> (tobramycin), AMK (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `polymyxins()` using column COL (colistin)
|
||||
#> Warning: There was 1 warning in `summarise()`.
|
||||
#> ℹ In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`.
|
||||
#> ℹ In argument: `across(c(aminoglycosides(), polymyxins()),
|
||||
#> resistance)`.
|
||||
#> ℹ In group 3: `ward = "Outpatient"`.
|
||||
#> Caused by warning:
|
||||
#> ! Introducing NA: only 23 results available for KAN in group: ward = "Outpatient"
|
||||
#> (whilst `minimum = 30`).
|
||||
#> ! Introducing NA: only 23 results available for KAN in group:
|
||||
#> ward = "Outpatient" (whilst `minimum = 30`).
|
||||
out
|
||||
#> # A tibble: 3 × 6
|
||||
#> ward GEN TOB AMK KAN COL
|
||||
@@ -311,17 +324,20 @@ out
|
||||
```
|
||||
|
||||
``` r
|
||||
|
||||
# transform the antibiotic columns to names:
|
||||
out %>% set_ab_names()
|
||||
#> # A tibble: 3 × 6
|
||||
#> ward gentamicin tobramycin amikacin kanamycin colistin
|
||||
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
|
||||
#> 1 Clinical 0.229 0.315 0.626 1 0.780
|
||||
#> 2 ICU 0.290 0.400 0.662 1 0.857
|
||||
#> 3 Outpatient 0.2 0.368 0.605 NA 0.889
|
||||
#> ward gentamicin tobramycin amikacin kanamycin
|
||||
#> <chr> <dbl> <dbl> <dbl> <dbl>
|
||||
#> 1 Clinical 0.229 0.315 0.626 1
|
||||
#> 2 ICU 0.290 0.400 0.662 1
|
||||
#> 3 Outpatient 0.2 0.368 0.605 NA
|
||||
#> # ℹ 1 more variable: colistin <dbl>
|
||||
```
|
||||
|
||||
``` r
|
||||
|
||||
# transform the antibiotic column to ATC codes:
|
||||
out %>% set_ab_names(property = "atc")
|
||||
#> # A tibble: 3 × 6
|
||||
@@ -393,6 +409,7 @@ This package is available [here on the official R network
|
||||
R from CRAN by using the command:
|
||||
|
||||
``` r
|
||||
|
||||
install.packages("AMR")
|
||||
```
|
||||
|
||||
@@ -417,6 +434,7 @@ here](https://github.com/msberends/AMR/wiki/Developer-Guideline).
|
||||
To install the latest and unpublished beta version:
|
||||
|
||||
``` r
|
||||
|
||||
install.packages("AMR", repos = "beta.amr-for-r.org")
|
||||
|
||||
# if this does not work, try to install directly from GitHub using the 'remotes' package:
|
||||
|
||||
94
llms.txt
94
llms.txt
@@ -100,6 +100,7 @@ selectors](https://amr-for-r.org/reference/antimicrobial_selectors.html),
|
||||
which work in base R, `dplyr` and `data.table`.
|
||||
|
||||
``` r
|
||||
|
||||
# AMR works great with dplyr, but it's not required or neccesary
|
||||
library(AMR)
|
||||
library(dplyr, warn.conflicts = FALSE)
|
||||
@@ -116,24 +117,26 @@ example_isolates %>%
|
||||
#> ℹ Using column mo as input for `mo_fullname()`
|
||||
#> ℹ Using column mo as input for `mo_is_gram_negative()`
|
||||
#> ℹ Using column mo as input for `mo_is_intrinsic_resistant()`
|
||||
#> ℹ Determining intrinsic resistance based on 'EUCAST Expected Resistant
|
||||
#> Phenotypes' v1.2 (2023). This note will be shown once per session.
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||
#> (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
|
||||
#> ℹ Determining intrinsic resistance based on 'EUCAST Expected
|
||||
#> Resistant Phenotypes' v1.2 (2023). This note will be shown
|
||||
#> once per session.
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB
|
||||
#> (tobramycin), AMK (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM
|
||||
#> (meropenem)
|
||||
#> # A tibble: 35 × 7
|
||||
#> bacteria GEN TOB AMK KAN IPM MEM
|
||||
#> <chr> <sir> <sir> <sir> <sir> <sir> <sir>
|
||||
#> 1 Pseudomonas aeruginosa I S NA R S NA
|
||||
#> 2 Pseudomonas aeruginosa I S NA R S NA
|
||||
#> 3 Pseudomonas aeruginosa I S NA R S NA
|
||||
#> 4 Pseudomonas aeruginosa S S S R NA S
|
||||
#> 5 Pseudomonas aeruginosa S S S R S S
|
||||
#> 6 Pseudomonas aeruginosa S S S R S S
|
||||
#> 7 Stenotrophomonas maltophilia R R R R R R
|
||||
#> 8 Pseudomonas aeruginosa S S S R NA S
|
||||
#> 9 Pseudomonas aeruginosa S S S R NA S
|
||||
#> 10 Pseudomonas aeruginosa S S S R S S
|
||||
#> 1 Pseudomonas aer… I S NA R S NA
|
||||
#> 2 Pseudomonas aer… I S NA R S NA
|
||||
#> 3 Pseudomonas aer… I S NA R S NA
|
||||
#> 4 Pseudomonas aer… S S S R NA S
|
||||
#> 5 Pseudomonas aer… S S S R S S
|
||||
#> 6 Pseudomonas aer… S S S R S S
|
||||
#> 7 Stenotrophomona… R R R R R R
|
||||
#> 8 Pseudomonas aer… S S S R NA S
|
||||
#> 9 Pseudomonas aer… S S S R NA S
|
||||
#> 10 Pseudomonas aer… S S S R S S
|
||||
#> # ℹ 25 more rows
|
||||
```
|
||||
|
||||
@@ -161,15 +164,17 @@ If used inside [R Markdown](https://rmarkdown.rstudio.com) or
|
||||
output format automatically (such as markdown, LaTeX, HTML, etc.).
|
||||
|
||||
``` r
|
||||
|
||||
antibiogram(example_isolates,
|
||||
antimicrobials = c(aminoglycosides(), carbapenems()))
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||
#> (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB
|
||||
#> (tobramycin), AMK (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM
|
||||
#> (meropenem)
|
||||
```
|
||||
|
||||
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|
||||
|:-----------------|:---------------------|:--------------------|:---------------------|:----------------|:---------------------|:--------------------|
|
||||
|:---|:---|:---|:---|:---|:---|:---|
|
||||
| CoNS | 0% (0-8%,N=43) | 86% (82-90%,N=309) | 52% (37-67%,N=48) | 0% (0-8%,N=43) | 52% (37-67%,N=48) | 22% (12-35%,N=55) |
|
||||
| *E. coli* | 100% (98-100%,N=171) | 98% (96-99%,N=460) | 100% (99-100%,N=422) | NA | 100% (99-100%,N=418) | 97% (96-99%,N=462) |
|
||||
| *E. faecalis* | 0% (0-9%,N=39) | 0% (0-9%,N=39) | 100% (91-100%,N=38) | 0% (0-9%,N=39) | NA | 0% (0-9%,N=39) |
|
||||
@@ -185,13 +190,14 @@ In combination antibiograms, it is clear that combined antimicrobials
|
||||
yield higher empiric coverage:
|
||||
|
||||
``` r
|
||||
|
||||
antibiogram(example_isolates,
|
||||
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
|
||||
mo_transform = "gramstain")
|
||||
```
|
||||
|
||||
| Pathogen | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|
||||
|:--------------|:------------------------|:-------------------------------------|:-------------------------------------|
|
||||
|:---|:---|:---|:---|
|
||||
| Gram-negative | 88% (85-91%,N=641) | 99% (97-99%,N=691) | 98% (97-99%,N=693) |
|
||||
| Gram-positive | 86% (82-89%,N=345) | 98% (96-98%,N=1044) | 95% (93-97%,N=550) |
|
||||
|
||||
@@ -201,6 +207,7 @@ with support for 28 languages that are often detected automatically
|
||||
based on system language:
|
||||
|
||||
``` r
|
||||
|
||||
antibiogram(example_isolates,
|
||||
antimicrobials = c("cipro", "tobra", "genta"), # any arbitrary name or code will work
|
||||
mo_transform = "gramstain",
|
||||
@@ -221,6 +228,7 @@ with new scale functions, to allow plotting of log2-distributed MIC
|
||||
values and SIR values.
|
||||
|
||||
``` r
|
||||
|
||||
library(ggplot2)
|
||||
library(AMR)
|
||||
|
||||
@@ -258,6 +266,7 @@ For a manual approach, you can use the `resistance` or
|
||||
function:
|
||||
|
||||
``` r
|
||||
|
||||
example_isolates %>%
|
||||
# group by ward:
|
||||
group_by(ward) %>%
|
||||
@@ -266,16 +275,18 @@ example_isolates %>%
|
||||
summarise(across(c(GEN, TOB),
|
||||
list(total_R = resistance,
|
||||
conf_int = function(x) sir_confidence_interval(x, collapse = "-"))))
|
||||
#> ℹ `resistance()` assumes the EUCAST guideline and thus considers the 'I'
|
||||
#> category susceptible. Set the `guideline` argument or the `AMR_guideline`
|
||||
#> option to either "CLSI" or "EUCAST", see `?AMR-options`.
|
||||
#> ℹ `resistance()` assumes the EUCAST guideline and thus
|
||||
#> considers the 'I' category susceptible. Set the `guideline`
|
||||
#> argument or the `AMR_guideline` option to either "CLSI" or
|
||||
#> "EUCAST", see `?AMR-options`.
|
||||
#> ℹ This message will be shown once per session.
|
||||
#> # A tibble: 3 × 5
|
||||
#> ward GEN_total_R GEN_conf_int TOB_total_R TOB_conf_int
|
||||
#> <chr> <dbl> <chr> <dbl> <chr>
|
||||
#> 1 Clinical 0.229 0.205-0.254 0.315 0.284-0.347
|
||||
#> 2 ICU 0.290 0.253-0.33 0.400 0.353-0.449
|
||||
#> 3 Outpatient 0.2 0.131-0.285 0.368 0.254-0.493
|
||||
#> ward GEN_total_R GEN_conf_int TOB_total_R
|
||||
#> <chr> <dbl> <chr> <dbl>
|
||||
#> 1 Clinical 0.229 0.205-0.254 0.315
|
||||
#> 2 ICU 0.290 0.253-0.33 0.400
|
||||
#> 3 Outpatient 0.2 0.131-0.285 0.368
|
||||
#> # ℹ 1 more variable: TOB_conf_int <chr>
|
||||
```
|
||||
|
||||
Or use [antimicrobial
|
||||
@@ -283,6 +294,7 @@ selectors](https://amr-for-r.org/reference/antimicrobial_selectors.html)
|
||||
to select a series of antibiotic columns:
|
||||
|
||||
``` r
|
||||
|
||||
library(AMR)
|
||||
library(dplyr)
|
||||
|
||||
@@ -292,15 +304,16 @@ out <- example_isolates %>%
|
||||
# calculate AMR using resistance(), over all aminoglycosides and polymyxins:
|
||||
summarise(across(c(aminoglycosides(), polymyxins()),
|
||||
resistance))
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||
#> (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB
|
||||
#> (tobramycin), AMK (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `polymyxins()` using column COL (colistin)
|
||||
#> Warning: There was 1 warning in `summarise()`.
|
||||
#> ℹ In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`.
|
||||
#> ℹ In argument: `across(c(aminoglycosides(), polymyxins()),
|
||||
#> resistance)`.
|
||||
#> ℹ In group 3: `ward = "Outpatient"`.
|
||||
#> Caused by warning:
|
||||
#> ! Introducing NA: only 23 results available for KAN in group: ward = "Outpatient"
|
||||
#> (whilst `minimum = 30`).
|
||||
#> ! Introducing NA: only 23 results available for KAN in group:
|
||||
#> ward = "Outpatient" (whilst `minimum = 30`).
|
||||
out
|
||||
#> # A tibble: 3 × 6
|
||||
#> ward GEN TOB AMK KAN COL
|
||||
@@ -311,17 +324,20 @@ out
|
||||
```
|
||||
|
||||
``` r
|
||||
|
||||
# transform the antibiotic columns to names:
|
||||
out %>% set_ab_names()
|
||||
#> # A tibble: 3 × 6
|
||||
#> ward gentamicin tobramycin amikacin kanamycin colistin
|
||||
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
|
||||
#> 1 Clinical 0.229 0.315 0.626 1 0.780
|
||||
#> 2 ICU 0.290 0.400 0.662 1 0.857
|
||||
#> 3 Outpatient 0.2 0.368 0.605 NA 0.889
|
||||
#> ward gentamicin tobramycin amikacin kanamycin
|
||||
#> <chr> <dbl> <dbl> <dbl> <dbl>
|
||||
#> 1 Clinical 0.229 0.315 0.626 1
|
||||
#> 2 ICU 0.290 0.400 0.662 1
|
||||
#> 3 Outpatient 0.2 0.368 0.605 NA
|
||||
#> # ℹ 1 more variable: colistin <dbl>
|
||||
```
|
||||
|
||||
``` r
|
||||
|
||||
# transform the antibiotic column to ATC codes:
|
||||
out %>% set_ab_names(property = "atc")
|
||||
#> # A tibble: 3 × 6
|
||||
@@ -393,6 +409,7 @@ This package is available [here on the official R network
|
||||
R from CRAN by using the command:
|
||||
|
||||
``` r
|
||||
|
||||
install.packages("AMR")
|
||||
```
|
||||
|
||||
@@ -417,6 +434,7 @@ here](https://github.com/msberends/AMR/wiki/Developer-Guideline).
|
||||
To install the latest and unpublished beta version:
|
||||
|
||||
``` r
|
||||
|
||||
install.packages("AMR", repos = "beta.amr-for-r.org")
|
||||
|
||||
# if this does not work, try to install directly from GitHub using the 'remotes' package:
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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,11 +49,17 @@
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
<h2 class="pkg-version" data-toc-text="3.0.1.9052" id="amr-3019052">AMR 3.0.1.9052<a class="anchor" aria-label="anchor" href="#amr-3019052"></a></h2>
|
||||
<h2 class="pkg-version" data-toc-text="3.0.1.9053" id="amr-3019053">AMR 3.0.1.9053<a class="anchor" aria-label="anchor" href="#amr-3019053"></a></h2>
|
||||
<p>This will become release v3.1.0, intended for launch end of May.</p>
|
||||
<div class="section level4">
|
||||
<h4 id="new-3-0-1-9052">New<a class="anchor" aria-label="anchor" href="#new-3-0-1-9052"></a></h4>
|
||||
<h4 id="new-3-0-1-9053">New<a class="anchor" aria-label="anchor" href="#new-3-0-1-9053"></a></h4>
|
||||
<ul><li>Support for clinical breakpoints of 2026 of both CLSI and EUCAST, by adding all of their over 5,700 new clinical breakpoints to the <code>clinical_breakpoints</code> data set for usage in <code><a href="../reference/as.sir.html">as.sir()</a></code>. EUCAST 2026 is now the new default guideline for all MIC and disk diffusion interpretations.</li>
|
||||
<li>Integration with the <strong>tidymodels</strong> framework to allow seamless use of SIR, MIC and disk data in modelling pipelines via <code>recipes</code>
|
||||
<li>Support for the <a href="https://future.futureverse.org" class="external-link"><code>future</code></a> package and its framework, as the previous implementation of parallel computing was slow
|
||||
<ul><li>
|
||||
<strong>Breaking change</strong>: <code><a href="../reference/as.sir.html">as.sir()</a></code> with <code>parallel = TRUE</code> now requires a non-sequential <code><a href="https://future.futureverse.org/reference/plan.html" class="external-link">future::plan()</a></code> to be active before the call — e.g., <code>future::plan(future::multisession)</code> — and throws an informative error if none is set.</li>
|
||||
<li>New all-core usage setup: when the number of AB columns is smaller than the number of available cores, rows are now split into batches so all cores stay active (row-batch mode). Previously, a 6-column dataset on a 16-core machine would only use 6 cores; now all 16 are used, with each worker processing a smaller row slice (lower per-worker memory pressure and processing time)</li>
|
||||
</ul></li>
|
||||
<li>Integration with the <em>tidymodels</em> framework to allow seamless use of SIR, MIC and disk data in modelling pipelines via <code>recipes</code>
|
||||
<ul><li>
|
||||
<code><a href="../reference/amr-tidymodels.html">step_mic_log2()</a></code> to transform <code><mic></code> columns with log2, and <code><a href="../reference/amr-tidymodels.html">step_sir_numeric()</a></code> to convert <code><sir></code> columns to numeric</li>
|
||||
<li>New <code>tidyselect</code> helpers:
|
||||
@@ -86,9 +92,8 @@
|
||||
<li>Two new <code>NA</code> objects, <code>NA_ab_</code> and <code>NA_mo_</code>, analogous to base R’s <code>NA_character_</code> and <code>NA_integer_</code>, for use in pipelines that require typed missing values</li>
|
||||
</ul></div>
|
||||
<div class="section level4">
|
||||
<h4 id="fixes-3-0-1-9052">Fixes<a class="anchor" aria-label="anchor" href="#fixes-3-0-1-9052"></a></h4>
|
||||
<ul><li>Fixed multiple bugs in the <code>parallel = TRUE</code> mode of <code><a href="../reference/as.sir.html">as.sir()</a></code> for data frames</li>
|
||||
<li>Fixed a bug in <code><a href="../reference/as.sir.html">as.sir()</a></code> where values that were purely numeric (e.g., <code>"1"</code>) and matched the broad SIR-matching regex would be incorrectly stripped of all content by the Unicode letter filter</li>
|
||||
<h4 id="fixes-3-0-1-9053">Fixes<a class="anchor" aria-label="anchor" href="#fixes-3-0-1-9053"></a></h4>
|
||||
<ul><li>Fixed a bug in <code><a href="../reference/as.sir.html">as.sir()</a></code> where values that were purely numeric (e.g., <code>"1"</code>) and matched the broad SIR-matching regex would be incorrectly stripped of all content by the Unicode letter filter</li>
|
||||
<li>Fixed a bug in <code><a href="../reference/as.mic.html">as.mic()</a></code> where MIC values in scientific notation (e.g., <code>"1e-3"</code>) were incorrectly handled because the letter <code>e</code> was removed along with other Unicode letters; scientific notation <code>e</code> is now preserved</li>
|
||||
<li>Fixed a bug in <code><a href="../reference/as.ab.html">as.ab()</a></code> where certain AB codes containing “PH” or “TH” (such as <code>ETH</code>, <code>MTH</code>, <code>PHE</code>, <code>PHN</code>, <code>STH</code>, <code>THA</code>, <code>THI1</code>) would incorrectly return <code>NA</code> when combined in a vector with any untranslatable value (<a href="https://github.com/msberends/AMR/issues/245" class="external-link">#245</a>)</li>
|
||||
<li>Fixed a bug in <code><a href="../reference/antibiogram.html">antibiogram()</a></code> for when no antimicrobials are set</li>
|
||||
@@ -104,12 +109,10 @@
|
||||
<li>Fixed BRMO classification by including bacterial complexes (<a href="https://github.com/msberends/AMR/issues/275" class="external-link">#275</a>)</li>
|
||||
<li>Fixed <code><a href="../reference/as.sir.html">as.sir()</a></code> for data frames silently deleting columns whose AB class was already <code><sir></code> when called a second time (re-running on already-converted data) (<a href="https://github.com/msberends/AMR/issues/278" class="external-link">#278</a>)</li>
|
||||
<li>Fixed <code><a href="../reference/as.sir.html">as.sir()</a></code> for data frames incorrectly treating metadata columns (e.g. <code>patient</code>, <code>ward</code>) as antibiotic columns when their names coincidentally matched an antibiotic code; column content is now validated against AMR data patterns before inclusion</li>
|
||||
<li>Improved parallel computing in <code><a href="../reference/as.sir.html">as.sir()</a></code>: when the number of AB columns is smaller than the number of available cores, rows are now split into batches so all cores stay active (row-batch mode). Previously, a 6-column dataset on a 16-core machine would only use 6 cores; now all 16 are used, with each worker processing a smaller row slice (lower per-worker memory pressure)</li>
|
||||
<li>Fixed <code><a href="../reference/as.sir.html">as.sir()</a></code> ignoring <code>info = FALSE</code> for columns with no breakpoints (e.g. cefoxitin against <em>E. coli</em>): an operator-precedence bug (<code>&&</code>/<code>||</code>) caused the “Interpreting MIC values” intro message to fire unconditionally when <code>nrow(breakpoints) == 0</code>, regardless of <code>info</code>; the progress bar title was also not gated by <code>info</code>
|
||||
</li>
|
||||
<li>Fixed <code><a href="../reference/as.sir.html">as.sir()</a></code> ignoring <code>info = FALSE</code> for columns with no breakpoints (e.g. cefoxitin against <em>E. coli</em>)</li>
|
||||
</ul></div>
|
||||
<div class="section level4">
|
||||
<h4 id="updates-3-0-1-9052">Updates<a class="anchor" aria-label="anchor" href="#updates-3-0-1-9052"></a></h4>
|
||||
<h4 id="updates-3-0-1-9053">Updates<a class="anchor" aria-label="anchor" href="#updates-3-0-1-9053"></a></h4>
|
||||
<ul><li>
|
||||
<code><a href="../reference/as.sir.html">as.sir()</a></code> with <code>reference_data</code>: custom guideline names now correctly classify values as R using EUCAST convention (<code>> breakpoint_R</code> for MIC, <code>< breakpoint_R</code> for disk); custom breakpoints with <code>host = NA</code> now serve as a host-agnostic fallback when no host-specific row matches (<a href="https://github.com/msberends/AMR/issues/239" class="external-link">#239</a>)</li>
|
||||
<li>Extensive <code>cli</code> integration for better message handling and clickable links in messages and warnings (<a href="https://github.com/msberends/AMR/issues/191" class="external-link">#191</a>, <a href="https://github.com/msberends/AMR/issues/265" class="external-link">#265</a>)</li>
|
||||
@@ -134,7 +137,6 @@
|
||||
</ul></li>
|
||||
<li>
|
||||
<code><a href="../reference/ab_property.html">ab_group()</a></code> now returns values consist with the AMR selectors (<a href="https://github.com/msberends/AMR/issues/246" class="external-link">#246</a>)</li>
|
||||
<li>Added two new <code>NA</code> objects, <code>NA_ab_</code> and <code>NA_mo_</code>, analogous to base R’s <code>NA_character_</code> and <code>NA_integer_</code>, for use in pipelines that require typed missing values</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Changelog
|
||||
|
||||
## AMR 3.0.1.9052
|
||||
## AMR 3.0.1.9053
|
||||
|
||||
This will become release v3.1.0, intended for launch end of May.
|
||||
|
||||
#### New
|
||||
|
||||
@@ -10,7 +12,23 @@
|
||||
[`as.sir()`](https://amr-for-r.org/reference/as.sir.md). EUCAST 2026
|
||||
is now the new default guideline for all MIC and disk diffusion
|
||||
interpretations.
|
||||
- Integration with the **tidymodels** framework to allow seamless use of
|
||||
- Support for the [`future`](https://future.futureverse.org) package and
|
||||
its framework, as the previous implementation of parallel computing
|
||||
was slow
|
||||
- **Breaking change**:
|
||||
[`as.sir()`](https://amr-for-r.org/reference/as.sir.md) with
|
||||
`parallel = TRUE` now requires a non-sequential
|
||||
[`future::plan()`](https://future.futureverse.org/reference/plan.html)
|
||||
to be active before the call — e.g.,
|
||||
`future::plan(future::multisession)` — and throws an informative
|
||||
error if none is set.
|
||||
- New all-core usage setup: when the number of AB columns is smaller
|
||||
than the number of available cores, rows are now split into batches
|
||||
so all cores stay active (row-batch mode). Previously, a 6-column
|
||||
dataset on a 16-core machine would only use 6 cores; now all 16 are
|
||||
used, with each worker processing a smaller row slice (lower
|
||||
per-worker memory pressure and processing time)
|
||||
- Integration with the *tidymodels* framework to allow seamless use of
|
||||
SIR, MIC and disk data in modelling pipelines via `recipes`
|
||||
- [`step_mic_log2()`](https://amr-for-r.org/reference/amr-tidymodels.md)
|
||||
to transform `<mic>` columns with log2, and
|
||||
@@ -63,9 +81,6 @@
|
||||
|
||||
#### Fixes
|
||||
|
||||
- Fixed multiple bugs in the `parallel = TRUE` mode of
|
||||
[`as.sir()`](https://amr-for-r.org/reference/as.sir.md) for data
|
||||
frames
|
||||
- Fixed a bug in [`as.sir()`](https://amr-for-r.org/reference/as.sir.md)
|
||||
where values that were purely numeric (e.g., `"1"`) and matched the
|
||||
broad SIR-matching regex would be incorrectly stripped of all content
|
||||
@@ -111,19 +126,9 @@
|
||||
as antibiotic columns when their names coincidentally matched an
|
||||
antibiotic code; column content is now validated against AMR data
|
||||
patterns before inclusion
|
||||
- Improved parallel computing in
|
||||
[`as.sir()`](https://amr-for-r.org/reference/as.sir.md): when the
|
||||
number of AB columns is smaller than the number of available cores,
|
||||
rows are now split into batches so all cores stay active (row-batch
|
||||
mode). Previously, a 6-column dataset on a 16-core machine would only
|
||||
use 6 cores; now all 16 are used, with each worker processing a
|
||||
smaller row slice (lower per-worker memory pressure)
|
||||
- Fixed [`as.sir()`](https://amr-for-r.org/reference/as.sir.md) ignoring
|
||||
`info = FALSE` for columns with no breakpoints (e.g. cefoxitin against
|
||||
*E. coli*): an operator-precedence bug (`&&`/`||`) caused the
|
||||
“Interpreting MIC values” intro message to fire unconditionally when
|
||||
`nrow(breakpoints) == 0`, regardless of `info`; the progress bar title
|
||||
was also not gated by `info`
|
||||
*E. coli*)
|
||||
|
||||
#### Updates
|
||||
|
||||
@@ -184,9 +189,6 @@
|
||||
- [`ab_group()`](https://amr-for-r.org/reference/ab_property.md) now
|
||||
returns values consist with the AMR selectors
|
||||
([\#246](https://github.com/msberends/AMR/issues/246))
|
||||
- Added two new `NA` objects, `NA_ab_` and `NA_mo_`, analogous to base
|
||||
R’s `NA_character_` and `NA_integer_`, for use in pipelines that
|
||||
require typed missing values
|
||||
|
||||
## AMR 3.0.1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
pandoc: 3.1.11
|
||||
pandoc: 3.8.3
|
||||
pkgdown: 2.2.0
|
||||
pkgdown_sha: ~
|
||||
articles:
|
||||
@@ -10,7 +10,7 @@ articles:
|
||||
PCA: PCA.html
|
||||
WHONET: WHONET.html
|
||||
WISCA: WISCA.html
|
||||
last_built: 2026-04-25T14:24Z
|
||||
last_built: 2026-04-30T08:02Z
|
||||
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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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 @@ 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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -57,6 +57,7 @@ Data." *Journal of Statistical Software*, *104*(3), 1-31.
|
||||
|
||||
A BibTeX entry for LaTeX users is:
|
||||
|
||||
|
||||
@Article{,
|
||||
title = {{AMR}: An {R} Package for Working with Antimicrobial Resistance Data},
|
||||
author = {Matthijs S. Berends and Christian F. Luz and Alexander W. Friedrich and Bhanu N. M. Sinha and Casper J. Albers and Corinna Glasner},
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -112,16 +112,16 @@
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="va">df</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> birth_date age age_exact age_at_y2k</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 1 1999-06-30 26 26.81918 0</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 2 1968-01-29 58 58.23562 31</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 3 1965-12-05 60 60.38630 34</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 4 1980-03-01 46 46.15068 19</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 5 1949-11-01 76 76.47945 50</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 6 1947-02-14 79 79.19178 52</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 7 1940-02-19 86 86.17808 59</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 8 1988-01-10 38 38.28767 11</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 9 1997-08-27 28 28.66027 2</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 10 1978-01-26 48 48.24384 21</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 1 1999-06-30 26 26.83288 0</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 2 1968-01-29 58 58.24932 31</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 3 1965-12-05 60 60.40000 34</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 4 1980-03-01 46 46.16438 19</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 5 1949-11-01 76 76.49315 50</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 6 1947-02-14 79 79.20548 52</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 7 1940-02-19 86 86.19178 59</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 8 1988-01-10 38 38.30137 11</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 9 1997-08-27 28 28.67397 2</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 10 1978-01-26 48 48.25753 21</span>
|
||||
</code></pre></div>
|
||||
</div>
|
||||
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
|
||||
|
||||
@@ -81,14 +81,14 @@ df$age_at_y2k <- age(df$birth_date, "2000-01-01")
|
||||
|
||||
df
|
||||
#> birth_date age age_exact age_at_y2k
|
||||
#> 1 1999-06-30 26 26.81918 0
|
||||
#> 2 1968-01-29 58 58.23562 31
|
||||
#> 3 1965-12-05 60 60.38630 34
|
||||
#> 4 1980-03-01 46 46.15068 19
|
||||
#> 5 1949-11-01 76 76.47945 50
|
||||
#> 6 1947-02-14 79 79.19178 52
|
||||
#> 7 1940-02-19 86 86.17808 59
|
||||
#> 8 1988-01-10 38 38.28767 11
|
||||
#> 9 1997-08-27 28 28.66027 2
|
||||
#> 10 1978-01-26 48 48.24384 21
|
||||
#> 1 1999-06-30 26 26.83288 0
|
||||
#> 2 1968-01-29 58 58.24932 31
|
||||
#> 3 1965-12-05 60 60.40000 34
|
||||
#> 4 1980-03-01 46 46.16438 19
|
||||
#> 5 1949-11-01 76 76.49315 50
|
||||
#> 6 1947-02-14 79 79.20548 52
|
||||
#> 7 1940-02-19 86 86.19178 59
|
||||
#> 8 1988-01-10 38 38.30137 11
|
||||
#> 9 1997-08-27 28 28.67397 2
|
||||
#> 10 1978-01-26 48 48.25753 21
|
||||
```
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
|
||||
<a class="navbar-brand me-2" 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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -411,7 +411,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-msg co"><span class="r-pr">#></span> <span style="color: #00BBBB;">ℹ</span> For `aminoglycosides()` using columns <span style="color: #00BB00; font-weight: bold;">GEN</span> (gentamicin), <span style="color: #00BB00; font-weight: bold;">TOB</span> (tobramycin), <span style="color: #00BB00; font-weight: bold;">AMK</span></span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> (amikacin), and <span style="color: #00BB00; font-weight: bold;">KAN</span> (kanamycin)</span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> <span style="color: #00BBBB;">ℹ</span> For `carbapenems()` using columns <span style="color: #00BB00; font-weight: bold;">IPM</span> (imipenem) and <span style="color: #00BB00; font-weight: bold;">MEM</span> (meropenem)</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An Antibiogram: 10 × 7</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An antibiogram: 10 × 7</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> Pathogen Amikacin Gentamicin Imipenem Kanamycin Meropenem Tobramycin</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;"><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 style="color: #949494; font-style: italic;"><chr></span> </span>
|
||||
@@ -426,7 +426,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;"> 9</span> S. hominis <span style="color: #BB0000;">NA</span> 92% (84-9… <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 85% (74-9…</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">10</span> S. pneumoniae 0% (0-3%,N… 0% (0-3%,… <span style="color: #BB0000;">NA</span> 0% (0-3%… <span style="color: #BB0000;">NA</span> 0% (0-3%,…</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
|
||||
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="antimicrobial_selectors.html">aminoglycosides</a></span><span class="op">(</span><span class="op">)</span>,</span></span>
|
||||
@@ -435,14 +435,14 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-in"><span><span class="op">)</span></span></span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> <span style="color: #00BBBB;">ℹ</span> For `aminoglycosides()` using columns <span style="color: #00BB00; font-weight: bold;">GEN</span> (gentamicin), <span style="color: #00BB00; font-weight: bold;">TOB</span> (tobramycin), <span style="color: #00BB00; font-weight: bold;">AMK</span></span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> (amikacin), and <span style="color: #00BB00; font-weight: bold;">KAN</span> (kanamycin)</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An Antibiogram: 2 × 5</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An antibiogram: 2 × 5</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> Pathogen J01GB01 J01GB03 J01GB04 J01GB06 </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;"><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> Gram-negative 96% (94-97%,N=686) 96% (95-98%,N=684) 0% (0-10%,N=35) 98% (96-…</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">2</span> Gram-positive 34% (31-38%,N=665) 63% (60-66%,N=1170) 0% (0-1%,N=436) 0% (0-1%…</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
|
||||
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="antimicrobial_selectors.html">carbapenems</a></span><span class="op">(</span><span class="op">)</span>,</span></span>
|
||||
@@ -450,7 +450,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-in"><span> mo_transform <span class="op">=</span> <span class="st">"name"</span></span></span>
|
||||
<span class="r-in"><span><span class="op">)</span></span></span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> <span style="color: #00BBBB;">ℹ</span> For `carbapenems()` using columns <span style="color: #00BB00; font-weight: bold;">IPM</span> (imipenem) and <span style="color: #00BB00; font-weight: bold;">MEM</span> (meropenem)</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An Antibiogram: 5 × 3</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An antibiogram: 5 × 3</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> Pathogen Imipenem Meropenem </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;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> </span>
|
||||
@@ -460,7 +460,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">4</span> Klebsiella pneumoniae 100% (93-100%,N=51) 100% (93-100%,N…</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">5</span> Proteus mirabilis 94% (79-99%,N=32) <span style="color: #BB0000;">NA</span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co"># Combined antibiogram -------------------------------------------------</span></span></span>
|
||||
@@ -470,7 +470,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"TZP"</span>, <span class="st">"TZP+TOB"</span>, <span class="st">"TZP+GEN"</span><span class="op">)</span>,</span></span>
|
||||
<span class="r-in"><span> mo_transform <span class="op">=</span> <span class="st">"gramstain"</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;"># An Antibiogram: 2 × 4</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An antibiogram: 2 × 4</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> Pathogen Piperacillin/tazobac…¹ Piperacillin/tazobac…² Piperacillin/tazobac…³</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;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> </span>
|
||||
@@ -480,7 +480,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ²`Piperacillin/tazobactam + Gentamicin`,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ³`Piperacillin/tazobactam + Tobramycin`</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co"># you can use any antimicrobial selector with `+` too:</span></span></span>
|
||||
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
|
||||
@@ -488,7 +488,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-in"><span> mo_transform <span class="op">=</span> <span class="st">"gramstain"</span></span></span>
|
||||
<span class="r-in"><span><span class="op">)</span></span></span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> <span style="color: #00BBBB;">ℹ</span> For `ureidopenicillins()` using column <span style="color: #00BB00; font-weight: bold;">TZP</span> (piperacillin/tazobactam)</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An Antibiogram: 2 × 4</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An antibiogram: 2 × 4</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> Pathogen Piperacillin/tazobac…¹ Piperacillin/tazobac…² Piperacillin/tazobac…³</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;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> </span>
|
||||
@@ -498,7 +498,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ²`Piperacillin/tazobactam + Gentamicin`,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ³`Piperacillin/tazobactam + Tobramycin`</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co"># names of antimicrobials do not need to resemble columns exactly:</span></span></span>
|
||||
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
|
||||
@@ -507,14 +507,14 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-in"><span> ab_transform <span class="op">=</span> <span class="st">"name"</span>,</span></span>
|
||||
<span class="r-in"><span> sep <span class="op">=</span> <span class="st">" & "</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;"># An Antibiogram: 2 × 3</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An antibiogram: 2 × 3</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> Pathogen Ciprofloxacin `Ciprofloxacin & Gentamicin`</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;"><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> Gram-negative 91% (88-93%,N=684) 99% (97-99%,N=694) </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">2</span> Gram-positive 77% (74-80%,N=724) 93% (91-94%,N=847) </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co"># Syndromic antibiogram ------------------------------------------------</span></span></span>
|
||||
@@ -527,7 +527,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-msg co"><span class="r-pr">#></span> <span style="color: #00BBBB;">ℹ</span> For `aminoglycosides()` using columns <span style="color: #00BB00; font-weight: bold;">GEN</span> (gentamicin), <span style="color: #00BB00; font-weight: bold;">TOB</span> (tobramycin), <span style="color: #00BB00; font-weight: bold;">AMK</span></span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> (amikacin), and <span style="color: #00BB00; font-weight: bold;">KAN</span> (kanamycin)</span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> <span style="color: #00BBBB;">ℹ</span> For `carbapenems()` using columns <span style="color: #00BB00; font-weight: bold;">IPM</span> (imipenem) and <span style="color: #00BB00; font-weight: bold;">MEM</span> (meropenem)</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An Antibiogram: 14 × 8</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An antibiogram: 14 × 8</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> `Syndromic Group` Pathogen Amikacin Gentamicin Imipenem Kanamycin Meropenem</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;"><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 style="color: #949494; font-style: italic;"><chr></span> </span>
|
||||
@@ -547,7 +547,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">14</span> ICU S. pneumo… 0% (0-1… 0% (0-12%… <span style="color: #BB0000;">NA</span> 0% (0-12… <span style="color: #BB0000;">NA</span> </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ℹ 1 more variable: Tobramycin <chr></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co"># now define a data set with only E. coli</span></span></span>
|
||||
<span class="r-in"><span><span class="va">ex1</span> <span class="op"><-</span> <span class="va">example_isolates</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/which.html" class="external-link">which</a></span><span class="op">(</span><span class="fu"><a href="mo_property.html">mo_genus</a></span><span class="op">(</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Escherichia"</span><span class="op">)</span>, <span class="op">]</span></span></span>
|
||||
@@ -565,14 +565,14 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-in"><span><span class="op">)</span></span></span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> <span style="color: #00BBBB;">ℹ</span> For `aminoglycosides()` using columns <span style="color: #00BB00; font-weight: bold;">GEN</span> (gentamicin), <span style="color: #00BB00; font-weight: bold;">TOB</span> (tobramycin), <span style="color: #00BB00; font-weight: bold;">AMK</span></span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> (amikacin), and <span style="color: #00BB00; font-weight: bold;">KAN</span> (kanamycin)</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An Antibiogram: 2 × 5</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An antibiogram: 2 × 5</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> `Grupo sindrómico` Patógeno Amikacina Gentamicina Tobramicina</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;"><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> No UCI E. coli 100% (97-100%,N=119) 98% (96-99%,N=32… 98% (96-99…</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #BCBCBC;">2</span> UCI E. coli 100% (93-100%,N=52) 99% (95-100%,N=1… 96% (92-99…</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co"># WISCA antibiogram ----------------------------------------------------</span></span></span>
|
||||
@@ -583,7 +583,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-in"><span> syndromic_group <span class="op">=</span> <span class="st">"ward"</span>,</span></span>
|
||||
<span class="r-in"><span> wisca <span class="op">=</span> <span class="cn">TRUE</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;"># An Antibiogram: 3 × 4</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># An antibiogram: 3 × 4</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Type: WISCA with 95% CI</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> `Syndromic Group` `Piperacillin/tazobactam` Piperacillin/tazobactam + Gentam…¹</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;"><chr></span> <span style="color: #949494; font-style: italic;"><chr></span> </span>
|
||||
@@ -593,7 +593,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ℹ abbreviated name: ¹`Piperacillin/tazobactam + Gentamicin`</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># ℹ 1 more variable: `Piperacillin/tazobactam + Tobramycin` <chr></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or https://quarto.org, see ?antibiogram</span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co"># Print the output for R Markdown / Quarto -----------------------------</span></span></span>
|
||||
|
||||
@@ -602,7 +602,7 @@ antibiogram(example_isolates,
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||
#> (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
|
||||
#> # An Antibiogram: 10 × 7
|
||||
#> # An antibiogram: 10 × 7
|
||||
#> # Type: Non-WISCA with 95% CI
|
||||
#> Pathogen Amikacin Gentamicin Imipenem Kanamycin Meropenem Tobramycin
|
||||
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
|
||||
@@ -617,7 +617,7 @@ antibiogram(example_isolates,
|
||||
#> 9 S. hominis NA 92% (84-9… NA NA NA 85% (74-9…
|
||||
#> 10 S. pneumoniae 0% (0-3%,N… 0% (0-3%,… NA 0% (0-3%… NA 0% (0-3%,…
|
||||
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
|
||||
#> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram
|
||||
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
|
||||
|
||||
antibiogram(example_isolates,
|
||||
antimicrobials = aminoglycosides(),
|
||||
@@ -626,14 +626,14 @@ antibiogram(example_isolates,
|
||||
)
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||
#> (amikacin), and KAN (kanamycin)
|
||||
#> # An Antibiogram: 2 × 5
|
||||
#> # An antibiogram: 2 × 5
|
||||
#> # Type: Non-WISCA with 95% CI
|
||||
#> Pathogen J01GB01 J01GB03 J01GB04 J01GB06
|
||||
#> <chr> <chr> <chr> <chr> <chr>
|
||||
#> 1 Gram-negative 96% (94-97%,N=686) 96% (95-98%,N=684) 0% (0-10%,N=35) 98% (96-…
|
||||
#> 2 Gram-positive 34% (31-38%,N=665) 63% (60-66%,N=1170) 0% (0-1%,N=436) 0% (0-1%…
|
||||
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
|
||||
#> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram
|
||||
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
|
||||
|
||||
antibiogram(example_isolates,
|
||||
antimicrobials = carbapenems(),
|
||||
@@ -641,7 +641,7 @@ antibiogram(example_isolates,
|
||||
mo_transform = "name"
|
||||
)
|
||||
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
|
||||
#> # An Antibiogram: 5 × 3
|
||||
#> # An antibiogram: 5 × 3
|
||||
#> # Type: Non-WISCA with 95% CI
|
||||
#> Pathogen Imipenem Meropenem
|
||||
#> <chr> <chr> <chr>
|
||||
@@ -651,7 +651,7 @@ antibiogram(example_isolates,
|
||||
#> 4 Klebsiella pneumoniae 100% (93-100%,N=51) 100% (93-100%,N…
|
||||
#> 5 Proteus mirabilis 94% (79-99%,N=32) NA
|
||||
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
|
||||
#> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram
|
||||
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
|
||||
|
||||
|
||||
# Combined antibiogram -------------------------------------------------
|
||||
@@ -661,7 +661,7 @@ antibiogram(example_isolates,
|
||||
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
|
||||
mo_transform = "gramstain"
|
||||
)
|
||||
#> # An Antibiogram: 2 × 4
|
||||
#> # An antibiogram: 2 × 4
|
||||
#> # Type: Non-WISCA with 95% CI
|
||||
#> Pathogen Piperacillin/tazobac…¹ Piperacillin/tazobac…² Piperacillin/tazobac…³
|
||||
#> <chr> <chr> <chr> <chr>
|
||||
@@ -671,7 +671,7 @@ antibiogram(example_isolates,
|
||||
#> # ²`Piperacillin/tazobactam + Gentamicin`,
|
||||
#> # ³`Piperacillin/tazobactam + Tobramycin`
|
||||
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
|
||||
#> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram
|
||||
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
|
||||
|
||||
# you can use any antimicrobial selector with `+` too:
|
||||
antibiogram(example_isolates,
|
||||
@@ -679,7 +679,7 @@ antibiogram(example_isolates,
|
||||
mo_transform = "gramstain"
|
||||
)
|
||||
#> ℹ For `ureidopenicillins()` using column TZP (piperacillin/tazobactam)
|
||||
#> # An Antibiogram: 2 × 4
|
||||
#> # An antibiogram: 2 × 4
|
||||
#> # Type: Non-WISCA with 95% CI
|
||||
#> Pathogen Piperacillin/tazobac…¹ Piperacillin/tazobac…² Piperacillin/tazobac…³
|
||||
#> <chr> <chr> <chr> <chr>
|
||||
@@ -689,7 +689,7 @@ antibiogram(example_isolates,
|
||||
#> # ²`Piperacillin/tazobactam + Gentamicin`,
|
||||
#> # ³`Piperacillin/tazobactam + Tobramycin`
|
||||
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
|
||||
#> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram
|
||||
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
|
||||
|
||||
# names of antimicrobials do not need to resemble columns exactly:
|
||||
antibiogram(example_isolates,
|
||||
@@ -698,14 +698,14 @@ antibiogram(example_isolates,
|
||||
ab_transform = "name",
|
||||
sep = " & "
|
||||
)
|
||||
#> # An Antibiogram: 2 × 3
|
||||
#> # An antibiogram: 2 × 3
|
||||
#> # Type: Non-WISCA with 95% CI
|
||||
#> Pathogen Ciprofloxacin `Ciprofloxacin & Gentamicin`
|
||||
#> <chr> <chr> <chr>
|
||||
#> 1 Gram-negative 91% (88-93%,N=684) 99% (97-99%,N=694)
|
||||
#> 2 Gram-positive 77% (74-80%,N=724) 93% (91-94%,N=847)
|
||||
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
|
||||
#> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram
|
||||
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
|
||||
|
||||
|
||||
# Syndromic antibiogram ------------------------------------------------
|
||||
@@ -718,7 +718,7 @@ antibiogram(example_isolates,
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||
#> (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
|
||||
#> # An Antibiogram: 14 × 8
|
||||
#> # An antibiogram: 14 × 8
|
||||
#> # Type: Non-WISCA with 95% CI
|
||||
#> `Syndromic Group` Pathogen Amikacin Gentamicin Imipenem Kanamycin Meropenem
|
||||
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
|
||||
@@ -738,7 +738,7 @@ antibiogram(example_isolates,
|
||||
#> 14 ICU S. pneumo… 0% (0-1… 0% (0-12%… NA 0% (0-12… NA
|
||||
#> # ℹ 1 more variable: Tobramycin <chr>
|
||||
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
|
||||
#> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram
|
||||
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
|
||||
|
||||
# now define a data set with only E. coli
|
||||
ex1 <- example_isolates[which(mo_genus() == "Escherichia"), ]
|
||||
@@ -756,14 +756,14 @@ antibiogram(ex1,
|
||||
)
|
||||
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
|
||||
#> (amikacin), and KAN (kanamycin)
|
||||
#> # An Antibiogram: 2 × 5
|
||||
#> # An antibiogram: 2 × 5
|
||||
#> # Type: Non-WISCA with 95% CI
|
||||
#> `Grupo sindrómico` Patógeno Amikacina Gentamicina Tobramicina
|
||||
#> <chr> <chr> <chr> <chr> <chr>
|
||||
#> 1 No UCI E. coli 100% (97-100%,N=119) 98% (96-99%,N=32… 98% (96-99…
|
||||
#> 2 UCI E. coli 100% (93-100%,N=52) 99% (95-100%,N=1… 96% (92-99…
|
||||
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
|
||||
#> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram
|
||||
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
|
||||
|
||||
|
||||
# WISCA antibiogram ----------------------------------------------------
|
||||
@@ -774,7 +774,7 @@ antibiogram(example_isolates,
|
||||
syndromic_group = "ward",
|
||||
wisca = TRUE
|
||||
)
|
||||
#> # An Antibiogram: 3 × 4
|
||||
#> # An antibiogram: 3 × 4
|
||||
#> # Type: WISCA with 95% CI
|
||||
#> `Syndromic Group` `Piperacillin/tazobactam` Piperacillin/tazobactam + Gentam…¹
|
||||
#> <chr> <chr> <chr>
|
||||
@@ -784,7 +784,7 @@ antibiogram(example_isolates,
|
||||
#> # ℹ abbreviated name: ¹`Piperacillin/tazobactam + Gentamicin`
|
||||
#> # ℹ 1 more variable: `Piperacillin/tazobactam + Tobramycin` <chr>
|
||||
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
|
||||
#> # or use it directly in R Markdown or https://quarto.org, see ?antibiogram
|
||||
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
|
||||
|
||||
|
||||
# Print the output for R Markdown / Quarto -----------------------------
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -111,7 +111,7 @@ Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026,
|
||||
<span> include_PKPD <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_include_PKPD"</span>, <span class="cn">TRUE</span><span class="op">)</span>,</span>
|
||||
<span> breakpoint_type <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_breakpoint_type"</span>, <span class="st">"human"</span><span class="op">)</span>, host <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, verbose <span class="op">=</span> <span class="cn">FALSE</span>, info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
|
||||
<span> parallel <span class="op">=</span> <span class="cn">FALSE</span>, max_cores <span class="op">=</span> <span class="op">-</span><span class="fl">1</span>, conserve_capped_values <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></span>
|
||||
<span> parallel <span class="op">=</span> <span class="cn">FALSE</span>, conserve_capped_values <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></span>
|
||||
<span></span>
|
||||
<span><span class="fu">sir_interpretation_history</span><span class="op">(</span>clean <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div>
|
||||
</div>
|
||||
@@ -227,11 +227,7 @@ Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026,
|
||||
|
||||
|
||||
<dt id="arg-parallel">parallel<a class="anchor" aria-label="anchor" href="#arg-parallel"></a></dt>
|
||||
<dd><p>A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate if parallel computing must be used, defaults to <code>FALSE</code>. The <code>parallel</code> package is part of base <span style="R">R</span> and no additional packages are required. On Unix/macOS with <span style="R">R</span> >= 4.0.0, <code><a href="https://rdrr.io/r/parallel/mclapply.html" class="external-link">parallel::mclapply()</a></code> (fork-based) is used; on Windows and <span style="R">R</span> < 4.0.0, <code><a href="https://rdrr.io/r/parallel/clusterApply.html" class="external-link">parallel::parLapply()</a></code> with a PSOCK cluster is used (requires the AMR package to be installed, not just loaded via <code>devtools::load_all()</code>). Parallelism distributes columns across cores; it is most beneficial when there are many antibiotic columns and a large number of rows.</p></dd>
|
||||
|
||||
|
||||
<dt id="arg-max-cores">max_cores<a class="anchor" aria-label="anchor" href="#arg-max-cores"></a></dt>
|
||||
<dd><p>Maximum number of cores to use if <code>parallel = TRUE</code>. Use a negative value to subtract that number from the available number of cores, e.g. a value of <code>-2</code> on an 8-core machine means that at most 6 cores will be used. Defaults to <code>-1</code>. There will never be used more cores than variables to analyse. The available number of cores are detected using <code><a href="https://parallelly.futureverse.org/reference/availableCores.html" class="external-link">parallelly::availableCores()</a></code> if that package is installed, and base <span style="R">R</span>'s <code><a href="https://rdrr.io/r/parallel/detectCores.html" class="external-link">parallel::detectCores()</a></code> otherwise.</p></dd>
|
||||
<dd><p>A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate if parallel computing must be used, defaults to <code>FALSE</code>. Requires the <code><a href="https://future.apply.futureverse.org/reference/future_lapply.html" class="external-link">future.apply</a></code> package. <strong>A non-sequential <code><a href="https://future.futureverse.org/reference/plan.html" class="external-link">future::plan()</a></code> must already be active before setting <code>parallel = TRUE</code></strong> — for example, <code>future::plan(future::multisession)</code>. An error is thrown if <code>parallel = TRUE</code> is used without a plan set by the user. Parallelism distributes columns (and optionally row batches) across workers; it is most beneficial when there are many antibiotic columns and a large number of rows.</p></dd>
|
||||
|
||||
|
||||
<dt id="arg-clean">clean<a class="anchor" aria-label="anchor" href="#arg-clean"></a></dt>
|
||||
@@ -258,7 +254,7 @@ Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026,
|
||||
<span><span class="co"># for veterinary breakpoints, also set `host`:</span></span>
|
||||
<span><span class="va">your_data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html" class="external-link">mutate_if</a></span><span class="op">(</span><span class="va">is.mic</span>, <span class="va">as.sir</span>, host <span class="op">=</span> <span class="st">"column_with_animal_species"</span>, guideline <span class="op">=</span> <span class="st">"CLSI"</span><span class="op">)</span></span>
|
||||
<span></span>
|
||||
<span><span class="co"># fast processing with parallel computing:</span></span>
|
||||
<span><span class="co"># fast processing with parallel computing (requires future.apply):</span></span>
|
||||
<span><span class="fu"><a href="../reference/as.sir.html">as.sir</a></span><span class="op">(</span><span class="va">your_data</span>, <span class="va">...</span>, parallel <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre><p></p></div></li>
|
||||
<li><p>Operators like "<=" will be considered according to the <code>capped_mic_handling</code> setting. At default, an MIC value of e.g. ">2" will return "NI" (non-interpretable) if the breakpoint is 4-8; the <em>true</em> MIC could be at either side of the breakpoint. This is to prevent that capped values from raw laboratory data would not be treated conservatively.</p></li>
|
||||
<li><p><strong>Note:</strong> When using CLSI as the guideline, MIC values must be log2-based doubling dilutions. Values not in this format, will be automatically rounded up to the nearest log2 level as CLSI instructs, and a warning will be thrown.</p></li>
|
||||
@@ -272,7 +268,7 @@ Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026,
|
||||
<span><span class="co"># for veterinary breakpoints, also set `host`:</span></span>
|
||||
<span><span class="va">your_data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html" class="external-link">mutate_if</a></span><span class="op">(</span><span class="va">is.disk</span>, <span class="va">as.sir</span>, host <span class="op">=</span> <span class="st">"column_with_animal_species"</span>, guideline <span class="op">=</span> <span class="st">"CLSI"</span><span class="op">)</span></span>
|
||||
<span></span>
|
||||
<span><span class="co"># fast processing with parallel computing:</span></span>
|
||||
<span><span class="co"># fast processing with parallel computing (requires future.apply):</span></span>
|
||||
<span><span class="fu"><a href="../reference/as.sir.html">as.sir</a></span><span class="op">(</span><span class="va">your_data</span>, <span class="va">...</span>, parallel <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre><p></p></div></li>
|
||||
</ul></li>
|
||||
<li><p>For <strong>interpreting a complete data set</strong>, with automatic determination of MIC values, disk diffusion diameters, microorganism names or codes, and antimicrobial test results. This is done very simply by running <code>as.sir(your_data)</code>.</p></li>
|
||||
@@ -424,29 +420,15 @@ 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-04-25 <span style="color: #949494;">14:25:30</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-04-25 <span style="color: #949494;">14:25:30</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-04-25 <span style="color: #949494;">14:25:31</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-04-25 <span style="color: #949494;">14:25:31</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-04-30 <span style="color: #949494;">08:03:38</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-04-30 <span style="color: #949494;">08:03:38</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-04-30 <span style="color: #949494;">08:03:38</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-04-30 <span style="color: #949494;">08:03:39</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>
|
||||
<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="co"># using parallel computing, which is available in base R:</span></span></span>
|
||||
<span class="r-in"><span><span class="fu">as.sir</span><span class="op">(</span><span class="va">df_wide</span>, parallel <span class="op">=</span> <span class="cn">TRUE</span>, info <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> <span style="color: #00BBBB;">ℹ</span> Run `sir_interpretation_history()` afterwards to retrieve a logbook with all</span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> details of the breakpoint interpretations.</span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> Processing columns:</span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> <span style="color: #080808; background-color: #5FD7AF;"> DONE </span></span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> </span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> <span style="color: #00BBBB;">ℹ</span> Run `sir_interpretation_history()` to retrieve a logbook with all details of</span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> the breakpoint interpretations.</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> microorganism amoxicillin cipro tobra genta ERY</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 1 Escherichia coli S I S S R</span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span></span></span>
|
||||
<span class="r-in"><span><span class="co">## Using dplyr -------------------------------------------------</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>
|
||||
|
||||
@@ -69,7 +69,7 @@ as.sir(x, ..., col_mo = NULL,
|
||||
include_PKPD = getOption("AMR_include_PKPD", TRUE),
|
||||
breakpoint_type = getOption("AMR_breakpoint_type", "human"), host = NULL,
|
||||
language = get_AMR_locale(), verbose = FALSE, info = interactive(),
|
||||
parallel = FALSE, max_cores = -1, conserve_capped_values = NULL)
|
||||
parallel = FALSE, conserve_capped_values = NULL)
|
||||
|
||||
sir_interpretation_history(clean = FALSE)
|
||||
```
|
||||
@@ -348,28 +348,16 @@ disk diffusion diameters:
|
||||
- parallel:
|
||||
|
||||
A [logical](https://rdrr.io/r/base/logical.html) to indicate if
|
||||
parallel computing must be used, defaults to `FALSE`. The `parallel`
|
||||
package is part of base R and no additional packages are required. On
|
||||
Unix/macOS with R \>= 4.0.0,
|
||||
[`parallel::mclapply()`](https://rdrr.io/r/parallel/mclapply.html)
|
||||
(fork-based) is used; on Windows and R \< 4.0.0,
|
||||
[`parallel::parLapply()`](https://rdrr.io/r/parallel/clusterApply.html)
|
||||
with a PSOCK cluster is used (requires the AMR package to be
|
||||
installed, not just loaded via `devtools::load_all()`). Parallelism
|
||||
distributes columns across cores; it is most beneficial when there are
|
||||
many antibiotic columns and a large number of rows.
|
||||
|
||||
- max_cores:
|
||||
|
||||
Maximum number of cores to use if `parallel = TRUE`. Use a negative
|
||||
value to subtract that number from the available number of cores, e.g.
|
||||
a value of `-2` on an 8-core machine means that at most 6 cores will
|
||||
be used. Defaults to `-1`. There will never be used more cores than
|
||||
variables to analyse. The available number of cores are detected using
|
||||
[`parallelly::availableCores()`](https://parallelly.futureverse.org/reference/availableCores.html)
|
||||
if that package is installed, and base R's
|
||||
[`parallel::detectCores()`](https://rdrr.io/r/parallel/detectCores.html)
|
||||
otherwise.
|
||||
parallel computing must be used, defaults to `FALSE`. Requires the
|
||||
[`future.apply`](https://future.apply.futureverse.org/reference/future_lapply.html)
|
||||
package. **A non-sequential
|
||||
[`future::plan()`](https://future.futureverse.org/reference/plan.html)
|
||||
must already be active before setting `parallel = TRUE`** — for
|
||||
example, `future::plan(future::multisession)`. An error is thrown if
|
||||
`parallel = TRUE` is used without a plan set by the user. Parallelism
|
||||
distributes columns (and optionally row batches) across workers; it is
|
||||
most beneficial when there are many antibiotic columns and a large
|
||||
number of rows.
|
||||
|
||||
- clean:
|
||||
|
||||
@@ -425,7 +413,7 @@ The `as.sir()` function can work in four ways:
|
||||
# for veterinary breakpoints, also set `host`:
|
||||
your_data %>% mutate_if(is.mic, as.sir, host = "column_with_animal_species", guideline = "CLSI")
|
||||
|
||||
# fast processing with parallel computing:
|
||||
# fast processing with parallel computing (requires future.apply):
|
||||
as.sir(your_data, ..., parallel = TRUE)
|
||||
|
||||
- Operators like "\<=" will be considered according to the
|
||||
@@ -458,7 +446,7 @@ The `as.sir()` function can work in four ways:
|
||||
# for veterinary breakpoints, also set `host`:
|
||||
your_data %>% mutate_if(is.disk, as.sir, host = "column_with_animal_species", guideline = "CLSI")
|
||||
|
||||
# fast processing with parallel computing:
|
||||
# fast processing with parallel computing (requires future.apply):
|
||||
as.sir(your_data, ..., parallel = TRUE)
|
||||
|
||||
4. For **interpreting a complete data set**, with automatic
|
||||
@@ -679,29 +667,15 @@ 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-04-25 14:25:30 1 MIC amoxicillin Escherich… human 8
|
||||
#> 2 2026-04-25 14:25:30 1 MIC cipro Escherich… human 0.256
|
||||
#> 3 2026-04-25 14:25:31 1 DISK tobra Escherich… human 16
|
||||
#> 4 2026-04-25 14:25:31 1 DISK genta Escherich… human 18
|
||||
#> 1 2026-04-30 08:03:38 1 MIC amoxicillin Escherich… human 8
|
||||
#> 2 2026-04-30 08:03:38 1 MIC cipro Escherich… human 0.256
|
||||
#> 3 2026-04-30 08:03:38 1 DISK tobra Escherich… human 16
|
||||
#> 4 2026-04-30 08:03:39 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>
|
||||
|
||||
# \donttest{
|
||||
# using parallel computing, which is available in base R:
|
||||
as.sir(df_wide, parallel = TRUE, info = TRUE)
|
||||
#> ℹ Run `sir_interpretation_history()` afterwards to retrieve a logbook with all
|
||||
#> details of the breakpoint interpretations.
|
||||
#>
|
||||
#> Processing columns:
|
||||
#>
|
||||
#> DONE
|
||||
#>
|
||||
#> ℹ Run `sir_interpretation_history()` to retrieve a logbook with all details of
|
||||
#> the breakpoint interpretations.
|
||||
#> microorganism amoxicillin cipro tobra genta ERY
|
||||
#> 1 Escherichia coli S I S S R
|
||||
|
||||
|
||||
## Using dplyr -------------------------------------------------
|
||||
if (require("dplyr")) {
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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 @@ 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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
@@ -210,7 +210,7 @@ subspecies).
|
||||
All mentioned methods are covered in the `first_isolate()` function:
|
||||
|
||||
| | |
|
||||
|-------------------------------------------------|--------------------------------------------------------|
|
||||
|----|----|
|
||||
| **Method** | **Function to apply** |
|
||||
| **Isolate-based** | `first_isolate(x, method = "isolate-based")` |
|
||||
| *(= all isolates)* | |
|
||||
|
||||
@@ -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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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 @@ 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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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 @@ 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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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 @@ 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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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 @@ 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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<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.9052</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user