Built site for AMR@3.0.1.9138: 499b039

This commit is contained in:
github-actions committed 2026-10-15 10:00:58 +00:00
1 parent 840ba97370
commit c3087b8247
152 files changed
+1685 -1369

No files matched your search

+111 -29
View File
@@ -42,7 +42,7 @@ count_df(
data,
translate_ab = "name",
language = get_AMR_locale(),
combine_SI = TRUE,
combine_SI,
guideline = getOption("AMR_guideline", "EUCAST")
)
```
@@ -66,19 +66,20 @@ count_df(
- guideline:
Either `"EUCAST"` (default) or `"CLSI"`. With EUCAST, the 'I' category
will be considered as susceptible (see [EUCAST
website](https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/definition-of-s-i-and-r/)),
but with with CLSI, it will be considered resistant. Therefore:
- EUCAST: `count_susceptible()` \\= N\_{S} + N\_{I}\\,
`count_resistant()` \\= N\_{R}\\
- CLSI: `count_susceptible()` \\= N\_{S} + N\_{SDD}\\,
`count_resistant()` \\= N\_{I} + N\_{R}\\
You can also use e.g. `count_R()` or `count_S()` instead, to be
explicit.
A guideline name, `"EUCAST"` or `"CLSI"` (or any version thereof, e.g.
`"CLSI 2025"`), to determine whether the 'I' category is considered
susceptible (EUCAST) or resistant (CLSI). The default is the package
option
[`AMR_guideline`](https://amr-for-r.org/reference/AMR-options.md), or
`"EUCAST"` if it is not set. For functions that return results per
category, i.e., `count_df()`,
[`proportion_df()`](https://amr-for-r.org/reference/proportion.md),
[`sir_df()`](https://amr-for-r.org/reference/proportion.md),
[`ggplot_sir()`](https://amr-for-r.org/reference/ggplot_sir.md),
[`geom_sir()`](https://amr-for-r.org/reference/ggplot_sir.md), and
[`labels_sir_count()`](https://amr-for-r.org/reference/ggplot_sir.md),
this can also be `NULL` or `FALSE` to keep S, I, and R separate. See
section *Interpretation of SIR* below.
- data:
@@ -104,12 +105,10 @@ count_df(
- combine_SI:
A [logical](https://rdrr.io/r/base/logical.html) to indicate whether
the 'I' category must be merged with another category, so the output
only consists of susceptible vs. resistant - the default is `TRUE`.
Following the `guideline` argument, the output then consists of `"SI"`
(S+SDD+I) vs. `"R"` with EUCAST, and of `"S"` (S+SDD) vs. `"IR"` (I+R)
with CLSI.
*(deprecated in favour of `guideline`)* A
[logical](https://rdrr.io/r/base/logical.html). If set, it takes
precedence over `guideline`: `TRUE` merges S, SDD, and I into `"SI"`
vs. `"R"`, and `FALSE` keeps S, I, and R separate.
## Value
@@ -145,12 +144,77 @@ In 2019, the European Committee on Antimicrobial Susceptibility Testing
categories S, I, and R
(<https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/definition-of-s-i-and-r/>).
This AMR package follows insight; use
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md)
(equal to
[`proportion_SI()`](https://amr-for-r.org/reference/proportion.md)) to
determine antimicrobial susceptibility and `count_susceptible()` (equal
to `count_SI()`) to count susceptible isolates.
In aggregated analyses, such as proportions, counts, antibiograms, and
plots, the 'I' category must be considered either susceptible or
resistant. In epidemiological AMR data analysis, this follows the
guideline: EUCAST considers 'I' susceptible, while CLSI considers 'I'
resistant. The dose-dependent susceptibility of CLSI ('SDD') is always
considered susceptible, as it equals what EUCAST defines as 'I'. All
functions with a `guideline` argument for this purpose use these
categories:
| | | |
|-------------|---------------|---------------|
| `guideline` | Susceptible | Resistant |
| `"EUCAST"` | S, SDD, I, WT | R, NWT, NS |
| `"CLSI"` | S, SDD, WT | I, R, NWT, NS |
The values 'WT' (wild type) and 'NWT' (non-wild type) result from
epidemiological cut-off values (ECOFFs) instead of clinical breakpoints.
Since they are no clinical categories, 'WT' is always considered
susceptible and 'NWT' always resistant, regardless of the guideline. The
value 'NS' (non-susceptible) is always considered resistant, and 'NI'
(non-interpretable) is always considered a missing result.
The `guideline` argument can be:
- **Left unset**, to use the package option
[`AMR_guideline`](https://amr-for-r.org/reference/AMR-options.md), or
`"EUCAST"` if this option is not set. In the latter case, a message is
shown once per session (but not in R Markdown or Quarto documents);
set the option to silence it.
- **`"EUCAST"`**, or any EUCAST version such as `"EUCAST 2025"`, to
consider 'I' susceptible, e.g., to return `"SI"` vs. `"R"` in
[`proportion_df()`](https://amr-for-r.org/reference/proportion.md).
- **`"CLSI"`**, or any CLSI version such as `"CLSI 2025"`, to consider
'I' resistant, e.g., to return `"S"` vs. `"IR"` in
[`proportion_df()`](https://amr-for-r.org/reference/proportion.md).
- **`NULL` or `FALSE`**, to keep S, I, and R separate. This is only
possible in functions that return results per category: `count_df()`,
[`proportion_df()`](https://amr-for-r.org/reference/proportion.md),
[`sir_df()`](https://amr-for-r.org/reference/proportion.md),
[`ggplot_sir()`](https://amr-for-r.org/reference/ggplot_sir.md),
[`geom_sir()`](https://amr-for-r.org/reference/ggplot_sir.md),
[`labels_sir_count()`](https://amr-for-r.org/reference/ggplot_sir.md),
and
[`bug_drug_combinations()`](https://amr-for-r.org/reference/bug_drug_combinations.md).
Functions that return a single proportion or count, such as
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md),
`count_resistant()`,
[`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md),
[`wisca()`](https://amr-for-r.org/reference/antibiogram.md), and
[`format()`](https://rdrr.io/r/base/format.html) on the result of
[`bug_drug_combinations()`](https://amr-for-r.org/reference/bug_drug_combinations.md),
require 'I' to be considered either susceptible or resistant, and
return an error.
Use [`susceptibility()`](https://amr-for-r.org/reference/proportion.md)
and [`resistance()`](https://amr-for-r.org/reference/proportion.md) (or
`count_susceptible()` and `count_resistant()`) to follow the guideline,
or e.g.
[`proportion_SI()`](https://amr-for-r.org/reference/proportion.md) and
[`proportion_R()`](https://amr-for-r.org/reference/proportion.md) to be
explicit regardless of the guideline.
The `combine_SI` argument of the functions that return results per
category,
[`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md), and
[`wisca()`](https://amr-for-r.org/reference/antibiogram.md) is
deprecated in favour of `guideline`. If set, it is followed literally
and takes precedence over `guideline`.
## Combination Therapy
@@ -220,9 +284,10 @@ all antimicrobials, so that:
In [`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md) and
[`wisca()`](https://amr-for-r.org/reference/antibiogram.md), the result
of the combination therapy (`"most_susceptible"`) is used, the 'I' and
'SDD' categories are considered susceptible if `combine_SI = TRUE`
(default), and the result is then reduced to S or R.
of the combination therapy (`"most_susceptible"`) is used, the 'I'
category is considered susceptible or not following the `guideline`
argument ('SDD' is always considered susceptible), and the result is
then reduced to S or R.
## See also
@@ -237,8 +302,16 @@ calculate microbial resistance and susceptibility.
# base R ------------------------------------------------------------
count_resistant(example_isolates$AMX) # counts "R"
#> ℹ `count_resistant()` assumes the EUCAST guideline and thus considers the 'I'
#> category susceptible. Use `guideline = "CLSI"` to consider it resistant. Set
#> the `guideline` argument, or set the `AMR_guideline` option to change the
#> default (see `?AMR-options`). This message is shown once per session.
#> [1] 804
count_susceptible(example_isolates$AMX) # counts "S" and "I"
#> ℹ `count_susceptible()` assumes the EUCAST guideline and thus considers the 'I'
#> category susceptible. Use `guideline = "CLSI"` to consider it resistant. Set
#> the `guideline` argument, or set the `AMR_guideline` option to change the
#> default (see `?AMR-options`). This message is shown once per session.
#> [1] 546
count_all(example_isolates$AMX) # counts "S", "I" and "R"
#> [1] 1350
@@ -268,6 +341,10 @@ n_sir(example_isolates$AMX)
count_susceptible(example_isolates$AMX)
#> [1] 546
susceptibility(example_isolates$AMX) * n_sir(example_isolates$AMX)
#> ℹ `susceptibility()` assumes the EUCAST guideline and thus considers the 'I'
#> category susceptible. Use `guideline = "CLSI"` to consider it resistant. Set
#> the `guideline` argument, or set the `AMR_guideline` option to change the
#> default (see `?AMR-options`). This message is shown once per session.
#> [1] 546
# dplyr -------------------------------------------------------------
@@ -315,6 +392,11 @@ if (require("dplyr")) {
}
#> ℹ For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
#> (amikacin), and KAN (kanamycin)
#> ℹ `count_df()` assumes the EUCAST guideline and thus considers the 'I' category
#> susceptible (S+SDD+I vs. R). Use `guideline = "CLSI"` for S+SDD vs. I+R, or
#> `guideline = NULL` to keep S, I, and R separate. Set the `guideline`
#> argument, or set the `AMR_guideline` option to change the default (see
#> `?AMR-options`). This message is shown once per session.
#> # A tibble: 12 × 4
#> ward antibiotic interpretation value
#> <chr> <chr> <ord> <int>