The AMR package supports four types of antibiograms, with support for 28 languages. If used inside R Markdown or Quarto, the table will be printed in the right output format automatically (such as markdown, LaTeX, HTML, etc.).
For empirical therapy guidance (i.e., coverage estimates), use WISCA (Weighted-Incidence Syndromic Combination Antibiogram). When a clinician starts empirical treatment, the causative pathogen is unknown. The relevant question is not “what percentage of E. coli is susceptible?” but “what is the probability that this regimen will cover whatever pathogen is causing the infection?”. WISCA answers that question directly, weighting susceptibility by pathogen incidence and providing credible intervals via Bayesian simulation. See vignette("WISCA") for the full explanation.
-wisca(example_isolates,
+wisca(top_n_microorganisms(example_isolates, n =10), # 10 most common species antimicrobials =c("TZP", "TZP+TOB", "TZP+GEN"), minimum =10)# Recommended threshold: >=30
@@ -187,23 +187,23 @@
Piperacillin/tazobactam + Tobramycin
-
72.5% (67.7-77.1%)
-
96% (95.1-96.9%)
-
92.1% (89.3-94.4%)
+
73% (67.7-79%)
+
98.7% (98-99.2%)
+
93.8% (90.5-96.6%)
WISCA supports stratification by any clinical variable, so you can generate syndrome-specific or ward-specific coverage estimates:
-wisca(example_isolates,
+wisca(top_n_microorganisms(example_isolates, n =10), antimicrobials =c("TZP", "TZP+TOB", "TZP+GEN"), syndromic_group ="ward", minimum =10)# Recommended threshold: >=30
-#> Warning: In 6 of 9 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen accounts for more than
-#> 5% of the pathogen incidence (up to 13.3%), since many pathogens occur only rarely. Because WISCA
-#> gives every pathogen a prior weight of 1 (Bielicki et al., 2016), such rare pathogens can strongly
-#> lower the estimated coverage without reflecting the clinical expectation. Consider limiting the
-#> analysis to the most common pathogens with `top_n_microorganisms()`, or grouping rare pathogens
-#> before running WISCA.
+#> Warning: In 3 of 9 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen accounts for more than
+#> 5% of the pathogen incidence (up to 6.4%), since there are few isolates relative to the number of
+#> pathogens, i.e., rare pathogens or a small group. Because WISCA gives every pathogen a prior weight
+#> of 1 (Bielicki et al., 2016), this can strongly lower the estimated coverage without reflecting the
+#> clinical expectation. Consider limiting the analysis to the most common pathogens with
+#> `top_n_microorganisms()`, or using fewer and larger groups.
@@ -220,21 +220,21 @@
Clinical
-
78% (72.7-83.4%)
-
96.3% (95.1-97.3%)
-
93% (89.4-95.7%)
+
78.9% (72.8-85.6%)
+
98.7% (97.8-99.3%)
+
94.5% (90.3-97.6%)
ICU
-
59.7% (53.5-67.9%)
-
92.2% (90-94.3%)
-
88.2% (83.4-92.2%)
+
57.3% (48.9-69.5%)
+
97.5% (95.7-98.8%)
+
91.7% (85.8-96.3%)
Outpatient
-
67.9% (51.9-84.7%)
-
92.8% (88.2-96.6%)
-
79.8% (64.9-92.9%)
+
68% (49.4-88.5%)
+
95.7% (90.7-98.7%)
+
79.3% (62.7-93.8%)
diff --git a/index.md b/index.md
index b58ed88d5..187c2fe2e 100644
--- a/index.md
+++ b/index.md
@@ -171,37 +171,37 @@ full explanation.
``` r
-wisca(example_isolates,
+wisca(top_n_microorganisms(example_isolates, n = 10), # 10 most common species
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
minimum = 10) # Recommended threshold: >=30
```
| Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|
-| 72.5% (67.7-77.1%) | 96% (95.1-96.9%) | 92.1% (89.3-94.4%) |
+| 73% (67.7-79%) | 98.7% (98-99.2%) | 93.8% (90.5-96.6%) |
WISCA supports stratification by any clinical variable, so you can
generate syndrome-specific or ward-specific coverage estimates:
``` r
-wisca(example_isolates,
+wisca(top_n_microorganisms(example_isolates, n = 10),
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
syndromic_group = "ward",
minimum = 10) # Recommended threshold: >=30
-#> Warning: In 6 of 9 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen accounts for more than
-#> 5% of the pathogen incidence (up to 13.3%), since many pathogens occur only rarely. Because WISCA
-#> gives every pathogen a prior weight of 1 (Bielicki et al., 2016), such rare pathogens can strongly
-#> lower the estimated coverage without reflecting the clinical expectation. Consider limiting the
-#> analysis to the most common pathogens with `top_n_microorganisms()`, or grouping rare pathogens
-#> before running WISCA.
+#> Warning: In 3 of 9 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen accounts for more than
+#> 5% of the pathogen incidence (up to 6.4%), since there are few isolates relative to the number of
+#> pathogens, i.e., rare pathogens or a small group. Because WISCA gives every pathogen a prior weight
+#> of 1 (Bielicki et al., 2016), this can strongly lower the estimated coverage without reflecting the
+#> clinical expectation. Consider limiting the analysis to the most common pathogens with
+#> `top_n_microorganisms()`, or using fewer and larger groups.
```
| Syndromic Group | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|:---|
-| Clinical | 78% (72.7-83.4%) | 96.3% (95.1-97.3%) | 93% (89.4-95.7%) |
-| ICU | 59.7% (53.5-67.9%) | 92.2% (90-94.3%) | 88.2% (83.4-92.2%) |
-| Outpatient | 67.9% (51.9-84.7%) | 92.8% (88.2-96.6%) | 79.8% (64.9-92.9%) |
+| Clinical | 78.9% (72.8-85.6%) | 98.7% (97.8-99.3%) | 94.5% (90.3-97.6%) |
+| ICU | 57.3% (48.9-69.5%) | 97.5% (95.7-98.8%) | 91.7% (85.8-96.3%) |
+| Outpatient | 68% (49.4-88.5%) | 95.7% (90.7-98.7%) | 79.3% (62.7-93.8%) |
**For AMR surveillance**, traditional antibiograms remain the right tool
for tracking resistance per species over time:
diff --git a/llms.txt b/llms.txt
index c1b3c1f9f..fb5c9941b 100644
--- a/llms.txt
+++ b/llms.txt
@@ -171,37 +171,37 @@ full explanation.
``` r
-wisca(example_isolates,
+wisca(top_n_microorganisms(example_isolates, n = 10), # 10 most common species
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
minimum = 10) # Recommended threshold: >=30
```
| Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|
-| 72.5% (67.7-77.1%) | 96% (95.1-96.9%) | 92.1% (89.3-94.4%) |
+| 73% (67.7-79%) | 98.7% (98-99.2%) | 93.8% (90.5-96.6%) |
WISCA supports stratification by any clinical variable, so you can
generate syndrome-specific or ward-specific coverage estimates:
``` r
-wisca(example_isolates,
+wisca(top_n_microorganisms(example_isolates, n = 10),
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
syndromic_group = "ward",
minimum = 10) # Recommended threshold: >=30
-#> Warning: In 6 of 9 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen accounts for more than
-#> 5% of the pathogen incidence (up to 13.3%), since many pathogens occur only rarely. Because WISCA
-#> gives every pathogen a prior weight of 1 (Bielicki et al., 2016), such rare pathogens can strongly
-#> lower the estimated coverage without reflecting the clinical expectation. Consider limiting the
-#> analysis to the most common pathogens with `top_n_microorganisms()`, or grouping rare pathogens
-#> before running WISCA.
+#> Warning: In 3 of 9 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen accounts for more than
+#> 5% of the pathogen incidence (up to 6.4%), since there are few isolates relative to the number of
+#> pathogens, i.e., rare pathogens or a small group. Because WISCA gives every pathogen a prior weight
+#> of 1 (Bielicki et al., 2016), this can strongly lower the estimated coverage without reflecting the
+#> clinical expectation. Consider limiting the analysis to the most common pathogens with
+#> `top_n_microorganisms()`, or using fewer and larger groups.
```
| Syndromic Group | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|:---|
-| Clinical | 78% (72.7-83.4%) | 96.3% (95.1-97.3%) | 93% (89.4-95.7%) |
-| ICU | 59.7% (53.5-67.9%) | 92.2% (90-94.3%) | 88.2% (83.4-92.2%) |
-| Outpatient | 67.9% (51.9-84.7%) | 92.8% (88.2-96.6%) | 79.8% (64.9-92.9%) |
+| Clinical | 78.9% (72.8-85.6%) | 98.7% (97.8-99.3%) | 94.5% (90.3-97.6%) |
+| ICU | 57.3% (48.9-69.5%) | 97.5% (95.7-98.8%) | 91.7% (85.8-96.3%) |
+| Outpatient | 68% (49.4-88.5%) | 95.7% (90.7-98.7%) | 79.3% (62.7-93.8%) |
**For AMR surveillance**, traditional antibiograms remain the right tool
for tracking resistance per species over time:
diff --git a/news/index.html b/news/index.html
index 4a24ecc46..d029d5359 100644
--- a/news/index.html
+++ b/news/index.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
@@ -49,22 +49,22 @@
-
AMR 3.1.0.9010
+
AMR 3.1.0.9011
This version fixes a critical bug in WISCA that biased all coverage estimates of wisca() and antibiogram(..., wisca = TRUE) downwards since AMR 3.0.0. Users are strongly advised to re-run their WISCA analyses.
-
Changed
+
Changed
WISCA (wisca() and antibiogram(..., wisca = TRUE))
Fixed a critical bug that systematically underestimated the coverage of every WISCA since AMR 3.0.0. Pathogens absent from a syndromic group, and pathogens without any test result for a regimen, were still included in the model with only prior information: each added a prior weight of 1 to the pathogen incidence, and untested pathogens kept their full incidence weight while counting as about 50% susceptible. The bias was largest for stratified analyses (e.g., up to 14 percentage points for meropenem in random strata of example_isolates). Now, only pathogens that occur in a group and have at least one test result for the regimen are included. Please re-run all WISCA analyses (#337)
retrieve_wisca_parameters() now returns only the parameters actually used in the model, and n_total in the long_numeric attribute now counts only isolates of the pathogens included for that regimen
-
A new warning is given when the prior weight of 1 per pathogen (Bielicki et al., 2016) accounts for more than 5% of the pathogen incidence, as many rare pathogens can then strongly lower the estimated coverage; consider top_n_microorganisms() in that case
+
A new warning is given when the prior weight of 1 per pathogen (Bielicki et al., 2016) accounts for more than 5% of the pathogen incidence, i.e., with rare pathogens or small groups, as this can strongly lower the estimated coverage; consider top_n_microorganisms() or fewer and larger groups in that case
Fixed the misaligned arrows in the message on taxonomically renamed microorganisms in colour-supporting consoles, for old names whose author reference lacks “et al.” (#336)
-
Other
+
Other
The manual index on the website was rewritten to improve findability, with sections ordered by task and a filter field
Fixed the link to the copyright section and added MycoBank as a taxonomy source in the Welcome to AMR vignette (#325)
diff --git a/news/index.md b/news/index.md
index c039d1385..d6b8e90c8 100644
--- a/news/index.md
+++ b/news/index.md
@@ -1,6 +1,6 @@
# Changelog
-## AMR 3.1.0.9010
+## AMR 3.1.0.9011
This version fixes a critical bug in WISCA that biased all coverage
estimates of [`wisca()`](https://amr-for-r.org/reference/antibiogram.md)
@@ -29,10 +29,10 @@ are strongly advised to re-run their WISCA analyses.
of the pathogens included for that regimen
- A new warning is given when the prior weight of 1 per pathogen
(Bielicki *et al.*, 2016) accounts for more than 5% of the pathogen
- incidence, as many rare pathogens can then strongly lower the
- estimated coverage; consider
+ incidence, i.e., with rare pathogens or small groups, as this can
+ strongly lower the estimated coverage; consider
[`top_n_microorganisms()`](https://amr-for-r.org/reference/top_n_microorganisms.md)
- in that case
+ or fewer and larger groups in that case
- Microorganism coercion
([`as.mo()`](https://amr-for-r.org/reference/as.mo.md))
- Fixed the misaligned arrows in the message on taxonomically renamed
diff --git a/pkgdown.yml b/pkgdown.yml
index 2c9f774db..7a683e32a 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -10,7 +10,7 @@ articles:
PCA: PCA.html
WHONET: WHONET.html
WISCA: WISCA.html
-last_built: 2026-10-30T11:41Z
+last_built: 2026-10-30T11:49Z
urls:
reference: https://amr-for-r.org/reference
article: https://amr-for-r.org/articles
diff --git a/reference/AMR-deprecated.html b/reference/AMR-deprecated.html
index 2395d5718..caab105c3 100644
--- a/reference/AMR-deprecated.html
+++ b/reference/AMR-deprecated.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/AMR-options.html b/reference/AMR-options.html
index 3b66c4adb..43f05a1f2 100644
--- a/reference/AMR-options.html
+++ b/reference/AMR-options.html
@@ -9,7 +9,7 @@ options(AMR_guideline = "CLSI")">AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/AMR.html b/reference/AMR.html
index 5fb00d64e..f03412996 100644
--- a/reference/AMR.html
+++ b/reference/AMR.html
@@ -21,7 +21,7 @@ The AMR package is available in English, Arabic, Bengali, Chinese, Czech, Danish
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/WHOCC.html b/reference/WHOCC.html
index 994ad0829..23d9a5596 100644
--- a/reference/WHOCC.html
+++ b/reference/WHOCC.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/WHONET.html b/reference/WHONET.html
index cac080339..56700d01c 100644
--- a/reference/WHONET.html
+++ b/reference/WHONET.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/ab_from_text.html b/reference/ab_from_text.html
index 3775d28ec..6c3a2e672 100644
--- a/reference/ab_from_text.html
+++ b/reference/ab_from_text.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/ab_property.html b/reference/ab_property.html
index 5c4963e22..e5da55c96 100644
--- a/reference/ab_property.html
+++ b/reference/ab_property.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/add_custom_antimicrobials.html b/reference/add_custom_antimicrobials.html
index ea4ec7877..810b6759b 100644
--- a/reference/add_custom_antimicrobials.html
+++ b/reference/add_custom_antimicrobials.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/add_custom_microorganisms.html b/reference/add_custom_microorganisms.html
index 70229607d..96b6b6066 100644
--- a/reference/add_custom_microorganisms.html
+++ b/reference/add_custom_microorganisms.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/age.html b/reference/age.html
index 5b4b2b983..8c63a0016 100644
--- a/reference/age.html
+++ b/reference/age.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/age_groups.html b/reference/age_groups.html
index 621a09ddb..0aef9319a 100644
--- a/reference/age_groups.html
+++ b/reference/age_groups.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/amr-tidymodels.html b/reference/amr-tidymodels.html
index 022db4cbb..ceeafbe16 100644
--- a/reference/amr-tidymodels.html
+++ b/reference/amr-tidymodels.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/amr_course.html b/reference/amr_course.html
index 2dce41d0f..f69e175ee 100644
--- a/reference/amr_course.html
+++ b/reference/amr_course.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/antibiogram-1.png b/reference/antibiogram-1.png
index 828a88227..b1e8d5489 100644
Binary files a/reference/antibiogram-1.png and b/reference/antibiogram-1.png differ
diff --git a/reference/antibiogram-3.png b/reference/antibiogram-3.png
index 9fdb8f55f..91bcfb916 100644
Binary files a/reference/antibiogram-3.png and b/reference/antibiogram-3.png differ
diff --git a/reference/antibiogram-5.png b/reference/antibiogram-5.png
index 9a9f901a7..4675bebf5 100644
Binary files a/reference/antibiogram-5.png and b/reference/antibiogram-5.png differ
diff --git a/reference/antibiogram-6.png b/reference/antibiogram-6.png
index 94c88f24d..fbaccb21e 100644
Binary files a/reference/antibiogram-6.png and b/reference/antibiogram-6.png differ
diff --git a/reference/antibiogram.html b/reference/antibiogram.html
index 74a646ea2..ec93fd6cd 100644
--- a/reference/antibiogram.html
+++ b/reference/antibiogram.html
@@ -13,7 +13,7 @@ All antibiogram types adhere to previously described approaches (see Source), an
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
@@ -378,7 +378,7 @@ All antibiogram types adhere to previously described approaches (see Source), an
It does so by combining two quantities: the relative incidence of each pathogen within the syndrome (modelled as a Dirichlet distribution) and the susceptibility of each pathogen to the regimen (modelled as Beta distributions). These are combined via Monte Carlo simulation to produce a coverage estimate with a credible interval.
Prior distributions: Pathogen incidence uses a non-informative \(Dirichlet(1, 1, \ldots, 1)\) prior. Susceptibility proportions use the Jeffreys prior, \(\beta(0.5, 0.5)\), except for pathogen-drug combinations with known intrinsic resistance, which use a strongly informative \(\beta(1, 9999)\) prior that forces near-zero susceptibility regardless of observed data. Intrinsic resistance is determined using the intrinsic_resistant data set, which is based on 'EUCAST Expected Resistant Phenotypes' v1.2 (2023).
Pathogens included in the model: For each regimen (and group), only pathogens that occur in the data and have at least one test result for the regimen are included. Pathogens without any test result for a regimen do not contribute to its coverage, nor to its n_total in long_numeric. Use retrieve_wisca_parameters() to get the parameters that were used.
-
Rare pathogens: Since every pathogen receives a prior weight of 1 in the Dirichlet distribution, pathogens found only once or a few times are given relatively much weight, which pulls the incidence towards a uniform distribution. Their very uncertain susceptibility can then strongly lower the estimated coverage, without reflecting the clinical expectation. A warning is therefore given when this prior weight accounts for more than 5% of the pathogen incidence in any regimen (or group). Consider limiting the analysis to the most common pathogens using top_n_microorganisms(), or grouping rare pathogens before running WISCA.
+
Rare pathogens and small groups: Since every pathogen receives a prior weight of 1 in the Dirichlet distribution, the prior weighs heavily when there are few isolates relative to the number of pathogens, i.e., with pathogens found only once or a few times, or in small groups. This pulls the incidence towards a uniform distribution, and the very uncertain susceptibility of rare pathogens can then strongly lower the estimated coverage, without reflecting the clinical expectation. A warning is therefore given when this prior weight accounts for more than 5% of the pathogen incidence in any regimen (or group). Consider limiting the analysis to the most common pathogens using top_n_microorganisms(), or using fewer and larger groups.
Interpreting the output: Overlapping credible intervals between regimens indicate no significant difference in coverage; if a narrower-spectrum regimen overlaps with a broader one, the narrower-spectrum option may be preferred on stewardship grounds. Non-overlapping intervals indicate a clinically meaningful difference. For small sample sizes, consider pooling data from multiple sites to improve precision, provided pathogen distributions are sufficiently similar (Bielicki et al., 2016).
For the full mathematical derivation and worked examples, see the WISCA vignette.
@@ -474,7 +474,8 @@ All antibiogram types adhere to previously described approaches (see Source), an
# basic WISCA: empirical coverage per regimen, weighted by pathogen# incidence, with 95% credible intervals
-wisca(example_isolates,
+# (10 most common species, since rare species can distort coverage estimates)
+wisca(top_n_microorganisms(example_isolates, n =10), antimicrobials =c("AMC", "AMC+CIP", "AMC+GEN"))#>ℹ `wisca()` assumes the EUCAST guideline and thus considers the 'I' category
@@ -482,13 +483,14 @@ All antibiogram types adhere to previously described approaches (see Source), an
#> only count S and SDD as covered. Set the `guideline` argument, or set the#> `AMR_guideline` option to change the default (see `?AMR-options`). This#> message is shown once per session.
+#>ℹ Using column mo as input for `col_mo`.#># A tibble: 1 × 3#># Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)#># Cred. interval: 95%#># Simulations: 1000 per stratum#> `Amoxicillin/clavulanic acid` Amoxicillin/clavulanic …¹ Amoxicillin/clavulan…²#><chr><chr><chr>
-#>1 74.9% (72.9-76.9%) 89.7% (88.3-91.1%) 91.9% (90.6-93.1%)
+#>1 76.9% (74.7-79%) 89.5% (88-91.1%) 93.6% (92.4-94.8%) #># ℹ abbreviated names: ¹`Amoxicillin/clavulanic acid + Ciprofloxacin`,#># ²`Amoxicillin/clavulanic acid + Gentamicin`#># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
@@ -496,7 +498,7 @@ All antibiogram types adhere to previously described approaches (see Source), an
#># Or, use it directly in R Markdown or Quarto, see `antibiogram()`.# equivalent using antibiogram():
-antibiogram(example_isolates,
+antibiogram(top_n_microorganisms(example_isolates, n =10), antimicrobials =c("AMC", "AMC+CIP", "AMC+GEN"), wisca =TRUE)
@@ -506,7 +508,7 @@ All antibiogram types adhere to previously described approaches (see Source), an
#># Simulations: 1000 per stratum#> `Amoxicillin/clavulanic acid` Amoxicillin/clavulanic …¹ Amoxicillin/clavulan…²#><chr><chr><chr>
-#>1 74.9% (72.9-76.9%) 89.7% (88.1-91.1%) 91.9% (90.5-93%)
+#>1 76.8% (74.8-78.9%) 89.6% (88-91.1%) 93.7% (92.4-94.9%) #># ℹ abbreviated names: ¹`Amoxicillin/clavulanic acid + Ciprofloxacin`,#># ²`Amoxicillin/clavulanic acid + Gentamicin`#># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
@@ -518,14 +520,14 @@ All antibiogram types adhere to previously described approaches (see Source), an
antimicrobials =c("TZP", "TZP+TOB", "TZP+GEN"), syndromic_group ="ward")
-#>ℹ Using column mo as input for `col_mo`.#>Warning: In 2 of 9 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen
-#> accounts for more than 5% of the pathogen incidence (up to 5.1%), since many
-#> pathogens occur only rarely. Because WISCA gives every pathogen a prior weight
-#> of 1 (Bielicki et al., 2016), such rare pathogens can strongly lower the
-#> estimated coverage without reflecting the clinical expectation. Consider
-#> limiting the analysis to the most common pathogens with
-#> `top_n_microorganisms()`, or grouping rare pathogens before running WISCA.
+#> accounts for more than 5% of the pathogen incidence (up to 5.1%), since there
+#> are few isolates relative to the number of pathogens, i.e., rare pathogens or a
+#> small group. Because WISCA gives every pathogen a prior weight of 1 (Bielicki
+#> et al., 2016), this can strongly lower the estimated coverage without
+#> reflecting the clinical expectation. Consider limiting the analysis to the most
+#> common pathogens with `top_n_microorganisms()`, or using fewer and larger
+#> groups.out#># A tibble: 3 × 4#># Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)
@@ -533,9 +535,9 @@ All antibiogram types adhere to previously described approaches (see Source), an
#># Simulations: 1000 per stratum#> `Syndromic Group` `Piperacillin/tazobactam` Piperacillin/tazobactam + Gentam…¹#><chr><chr><chr>
-#>1 Clinical 76.4% (68.6-83.9%) 99% (98.2-99.6%)
-#>2 ICU 54.4% (45.4-67.2%) 98.4% (96.8-99.4%)
-#>3 Outpatient 67% (47.6-88.5%) 96.2% (91.4-99%)
+#>1 Clinical 76.1% (69-83.5%) 99% (98.2-99.6%)
+#>2 ICU 54% (45.3-66.7%) 98.4% (96.9-99.5%)
+#>3 Outpatient 68.4% (47.5-89.2%) 96.1% (91-99%) #># ℹ 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,
@@ -560,26 +562,27 @@ All antibiogram types adhere to previously described approaches (see Source), an
#>Warning: Number of tested isolates should exceed 30 for each regimen (and group). WISCA#> coverage estimates might be inaccurate.#>Warning: In 12 of 24 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen
-#> accounts for more than 5% of the pathogen incidence (up to 33.3%), since many
-#> pathogens occur only rarely. Because WISCA gives every pathogen a prior weight
-#> of 1 (Bielicki et al., 2016), such rare pathogens can strongly lower the
-#> estimated coverage without reflecting the clinical expectation. Consider
-#> limiting the analysis to the most common pathogens with
-#> `top_n_microorganisms()`, or grouping rare pathogens before running WISCA.
+#> accounts for more than 5% of the pathogen incidence (up to 33.3%), since there
+#> are few isolates relative to the number of pathogens, i.e., rare pathogens or a
+#> small group. Because WISCA gives every pathogen a prior weight of 1 (Bielicki
+#> et al., 2016), this can strongly lower the estimated coverage without
+#> reflecting the clinical expectation. Consider limiting the analysis to the most
+#> common pathogens with `top_n_microorganisms()`, or using fewer and larger
+#> groups.#># A tibble: 8 × 5#># Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)#># Cred. interval: 95%#># Simulations: 1000 per stratum#> age_group gender `Piperacillin/tazobactam` Piperacillin/tazobactam + Gentami…¹#><chr><chr><chr><chr>
-#>1 0-24 F 75.5% (14.7-100%) 81.6% (54.9-97.3%)
-#>2 0-24 M 83.2% (45.8-99.5%) 86.6% (65.9-98.2%)
-#>3 25-49 F 92% (80.3-98.7%) 95.3% (89.1-98.8%)
-#>4 25-49 M 80.8% (57.8-96.3%) 93.3% (85-98.3%)
-#>5 50-74 F 75.4% (66.2-86.5%) 97% (94.9-98.7%)
-#>6 50-74 M 68.4% (58-78.4%) 96.8% (94.2-98.7%)
-#>7 75+ F 75% (63.9-84.4%) 97.8% (96.1-99%)
-#>8 75+ M 75% (65.1-83.6%) 97.9% (96-99.1%)
+#>1 0-24 F 74.7% (16.9-100%) 81.5% (54.9-97.3%)
+#>2 0-24 M 83.5% (50.2-99.1%) 86.7% (66.6-98.3%)
+#>3 25-49 F 92.1% (80.9-98.6%) 95.2% (88.9-98.7%)
+#>4 25-49 M 80.5% (57.5-95.8%) 93.3% (85.3-98.4%)
+#>5 50-74 F 75.6% (65.4-88%) 97% (94.7-98.6%)
+#>6 50-74 M 68.1% (56.7-78.9%) 96.7% (94.1-98.6%)
+#>7 75+ F 75.1% (63.6-85.5%) 97.8% (96-99%)
+#>8 75+ M 74.9% (64.4-84.2%) 97.8% (96.1-99.1%) #># ℹ 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,
@@ -751,18 +754,19 @@ All antibiogram types adhere to previously described approaches (see Source), an
# Print the output for R Markdown / Quarto -----------------------------
-ureido<-wisca(example_isolates,
+ureido<-wisca(top_n_microorganisms(example_isolates, n =10), antimicrobials =ureidopenicillins(), syndromic_group ="ward")#>ℹ For `ureidopenicillins()` using column TZP (piperacillin/tazobactam)
-#>Warning: In 2 of 3 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen
-#> accounts for more than 5% of the pathogen incidence (up to 13.3%), since many
-#> pathogens occur only rarely. Because WISCA gives every pathogen a prior weight
-#> of 1 (Bielicki et al., 2016), such rare pathogens can strongly lower the
-#> estimated coverage without reflecting the clinical expectation. Consider
-#> limiting the analysis to the most common pathogens with
-#> `top_n_microorganisms()`, or grouping rare pathogens before running WISCA.
+#>Warning: In 1 of 3 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen
+#> accounts for more than 5% of the pathogen incidence (up to 5.6%), since there
+#> are few isolates relative to the number of pathogens, i.e., rare pathogens or a
+#> small group. Because WISCA gives every pathogen a prior weight of 1 (Bielicki
+#> et al., 2016), this can strongly lower the estimated coverage without
+#> reflecting the clinical expectation. Consider limiting the analysis to the most
+#> common pathogens with `top_n_microorganisms()`, or using fewer and larger
+#> groups.# in an Rmd file, you would just need to return `ureido` in a chunk,# but to be explicit here:
@@ -773,9 +777,9 @@ All antibiogram types adhere to previously described approaches (see Source), an
#>#> |Syndromic Group |Piperacillin/tazobactam |#> |:---------------|:-----------------------|
-#> |Clinical |77.8% (72.6-83.1%) |
-#> |ICU |59.8% (53.9-67.7%) |
-#> |Outpatient |68.4% (52.2-84.6%) |
+#> |Clinical |79.1% (72.2-85.8%) |
+#> |ICU |57.3% (48.9-69%) |
+#> |Outpatient |67.8% (49.1-87.9%) |# Generate plots with ggplot2 or base R --------------------------------
@@ -784,17 +788,18 @@ All antibiogram types adhere to previously described approaches (see Source), an
antimicrobials =c("AMC", "CIP", "TZP", "TZP+TOB"), mo_transform ="gramstain")
-ab2<-wisca(example_isolates,
+ab2<-wisca(top_n_microorganisms(example_isolates, n =10), antimicrobials =c("AMC", "CIP", "TZP", "TZP+TOB"), syndromic_group ="ward")
-#>Warning: In 8 of 12 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen
-#> accounts for more than 5% of the pathogen incidence (up to 13.3%), since many
-#> pathogens occur only rarely. Because WISCA gives every pathogen a prior weight
-#> of 1 (Bielicki et al., 2016), such rare pathogens can strongly lower the
-#> estimated coverage without reflecting the clinical expectation. Consider
-#> limiting the analysis to the most common pathogens with
-#> `top_n_microorganisms()`, or grouping rare pathogens before running WISCA.
+#>Warning: In 4 of 12 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen
+#> accounts for more than 5% of the pathogen incidence (up to 6.4%), since there
+#> are few isolates relative to the number of pathogens, i.e., rare pathogens or a
+#> small group. Because WISCA gives every pathogen a prior weight of 1 (Bielicki
+#> et al., 2016), this can strongly lower the estimated coverage without
+#> reflecting the clinical expectation. Consider limiting the analysis to the most
+#> common pathogens with `top_n_microorganisms()`, or using fewer and larger
+#> groups.if(requireNamespace("ggplot2")){ggplot2::autoplot(ab1)
diff --git a/reference/antibiogram.md b/reference/antibiogram.md
index dce74a991..8e5130056 100644
--- a/reference/antibiogram.md
+++ b/reference/antibiogram.md
@@ -572,17 +572,18 @@ regimen do not contribute to its coverage, nor to its `n_total` in
`long_numeric`. Use `retrieve_wisca_parameters()` to get the parameters
that were used.
-**Rare pathogens:** Since every pathogen receives a prior weight of 1 in
-the Dirichlet distribution, pathogens found only once or a few times are
-given relatively much weight, which pulls the incidence towards a
-uniform distribution. Their very uncertain susceptibility can then
-strongly lower the estimated coverage, without reflecting the clinical
-expectation. A warning is therefore given when this prior weight
-accounts for more than 5% of the pathogen incidence in any regimen (or
-group). Consider limiting the analysis to the most common pathogens
-using
+**Rare pathogens and small groups:** Since every pathogen receives a
+prior weight of 1 in the Dirichlet distribution, the prior weighs
+heavily when there are few isolates relative to the number of pathogens,
+i.e., with pathogens found only once or a few times, or in small groups.
+This pulls the incidence towards a uniform distribution, and the very
+uncertain susceptibility of rare pathogens can then strongly lower the
+estimated coverage, without reflecting the clinical expectation. A
+warning is therefore given when this prior weight accounts for more than
+5% of the pathogen incidence in any regimen (or group). Consider
+limiting the analysis to the most common pathogens using
[`top_n_microorganisms()`](https://amr-for-r.org/reference/top_n_microorganisms.md),
-or grouping rare pathogens before running WISCA.
+or using fewer and larger groups.
**Interpreting the output:** Overlapping credible intervals between
regimens indicate no significant difference in coverage; if a
@@ -819,7 +820,8 @@ example_isolates
# basic WISCA: empirical coverage per regimen, weighted by pathogen
# incidence, with 95% credible intervals
-wisca(example_isolates,
+# (10 most common species, since rare species can distort coverage estimates)
+wisca(top_n_microorganisms(example_isolates, n = 10),
antimicrobials = c("AMC", "AMC+CIP", "AMC+GEN")
)
#> ℹ `wisca()` assumes the EUCAST guideline and thus considers the 'I' category
@@ -827,13 +829,14 @@ wisca(example_isolates,
#> only count S and SDD as covered. Set the `guideline` argument, or set the
#> `AMR_guideline` option to change the default (see `?AMR-options`). This
#> message is shown once per session.
+#> ℹ Using column mo as input for `col_mo`.
#> # A tibble: 1 × 3
#> # Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)
#> # Cred. interval: 95%
#> # Simulations: 1000 per stratum
#> `Amoxicillin/clavulanic acid` Amoxicillin/clavulanic …¹ Amoxicillin/clavulan…²
#>
-#> 1 74.9% (72.9-76.9%) 89.7% (88.3-91.1%) 91.9% (90.6-93.1%)
+#> 1 76.9% (74.7-79%) 89.5% (88-91.1%) 93.6% (92.4-94.8%)
#> # ℹ abbreviated names: ¹`Amoxicillin/clavulanic acid + Ciprofloxacin`,
#> # ²`Amoxicillin/clavulanic acid + Gentamicin`
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
@@ -841,7 +844,7 @@ wisca(example_isolates,
#> # Or, use it directly in R Markdown or Quarto, see `antibiogram()`.
# equivalent using antibiogram():
-antibiogram(example_isolates,
+antibiogram(top_n_microorganisms(example_isolates, n = 10),
antimicrobials = c("AMC", "AMC+CIP", "AMC+GEN"),
wisca = TRUE
)
@@ -851,7 +854,7 @@ antibiogram(example_isolates,
#> # Simulations: 1000 per stratum
#> `Amoxicillin/clavulanic acid` Amoxicillin/clavulanic …¹ Amoxicillin/clavulan…²
#>
-#> 1 74.9% (72.9-76.9%) 89.7% (88.1-91.1%) 91.9% (90.5-93%)
+#> 1 76.8% (74.8-78.9%) 89.6% (88-91.1%) 93.7% (92.4-94.9%)
#> # ℹ abbreviated names: ¹`Amoxicillin/clavulanic acid + Ciprofloxacin`,
#> # ²`Amoxicillin/clavulanic acid + Gentamicin`
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
@@ -863,14 +866,14 @@ out <- wisca(top_n_microorganisms(example_isolates, n = 5),
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
syndromic_group = "ward"
)
-#> ℹ Using column mo as input for `col_mo`.
#> Warning: In 2 of 9 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen
-#> accounts for more than 5% of the pathogen incidence (up to 5.1%), since many
-#> pathogens occur only rarely. Because WISCA gives every pathogen a prior weight
-#> of 1 (Bielicki et al., 2016), such rare pathogens can strongly lower the
-#> estimated coverage without reflecting the clinical expectation. Consider
-#> limiting the analysis to the most common pathogens with
-#> `top_n_microorganisms()`, or grouping rare pathogens before running WISCA.
+#> accounts for more than 5% of the pathogen incidence (up to 5.1%), since there
+#> are few isolates relative to the number of pathogens, i.e., rare pathogens or a
+#> small group. Because WISCA gives every pathogen a prior weight of 1 (Bielicki
+#> et al., 2016), this can strongly lower the estimated coverage without
+#> reflecting the clinical expectation. Consider limiting the analysis to the most
+#> common pathogens with `top_n_microorganisms()`, or using fewer and larger
+#> groups.
out
#> # A tibble: 3 × 4
#> # Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)
@@ -878,9 +881,9 @@ out
#> # Simulations: 1000 per stratum
#> `Syndromic Group` `Piperacillin/tazobactam` Piperacillin/tazobactam + Gentam…¹
#>
-#> 1 Clinical 76.4% (68.6-83.9%) 99% (98.2-99.6%)
-#> 2 ICU 54.4% (45.4-67.2%) 98.4% (96.8-99.4%)
-#> 3 Outpatient 67% (47.6-88.5%) 96.2% (91.4-99%)
+#> 1 Clinical 76.1% (69-83.5%) 99% (98.2-99.6%)
+#> 2 ICU 54% (45.3-66.7%) 98.4% (96.9-99.5%)
+#> 3 Outpatient 68.4% (47.5-89.2%) 96.1% (91-99%)
#> # ℹ abbreviated name: ¹`Piperacillin/tazobactam + Gentamicin`
#> # ℹ 1 more variable: `Piperacillin/tazobactam + Tobramycin`
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
@@ -905,26 +908,27 @@ if (requireNamespace("dplyr")) {
#> Warning: Number of tested isolates should exceed 30 for each regimen (and group). WISCA
#> coverage estimates might be inaccurate.
#> Warning: In 12 of 24 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen
-#> accounts for more than 5% of the pathogen incidence (up to 33.3%), since many
-#> pathogens occur only rarely. Because WISCA gives every pathogen a prior weight
-#> of 1 (Bielicki et al., 2016), such rare pathogens can strongly lower the
-#> estimated coverage without reflecting the clinical expectation. Consider
-#> limiting the analysis to the most common pathogens with
-#> `top_n_microorganisms()`, or grouping rare pathogens before running WISCA.
+#> accounts for more than 5% of the pathogen incidence (up to 33.3%), since there
+#> are few isolates relative to the number of pathogens, i.e., rare pathogens or a
+#> small group. Because WISCA gives every pathogen a prior weight of 1 (Bielicki
+#> et al., 2016), this can strongly lower the estimated coverage without
+#> reflecting the clinical expectation. Consider limiting the analysis to the most
+#> common pathogens with `top_n_microorganisms()`, or using fewer and larger
+#> groups.
#> # A tibble: 8 × 5
#> # Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)
#> # Cred. interval: 95%
#> # Simulations: 1000 per stratum
#> age_group gender `Piperacillin/tazobactam` Piperacillin/tazobactam + Gentami…¹
#>
-#> 1 0-24 F 75.5% (14.7-100%) 81.6% (54.9-97.3%)
-#> 2 0-24 M 83.2% (45.8-99.5%) 86.6% (65.9-98.2%)
-#> 3 25-49 F 92% (80.3-98.7%) 95.3% (89.1-98.8%)
-#> 4 25-49 M 80.8% (57.8-96.3%) 93.3% (85-98.3%)
-#> 5 50-74 F 75.4% (66.2-86.5%) 97% (94.9-98.7%)
-#> 6 50-74 M 68.4% (58-78.4%) 96.8% (94.2-98.7%)
-#> 7 75+ F 75% (63.9-84.4%) 97.8% (96.1-99%)
-#> 8 75+ M 75% (65.1-83.6%) 97.9% (96-99.1%)
+#> 1 0-24 F 74.7% (16.9-100%) 81.5% (54.9-97.3%)
+#> 2 0-24 M 83.5% (50.2-99.1%) 86.7% (66.6-98.3%)
+#> 3 25-49 F 92.1% (80.9-98.6%) 95.2% (88.9-98.7%)
+#> 4 25-49 M 80.5% (57.5-95.8%) 93.3% (85.3-98.4%)
+#> 5 50-74 F 75.6% (65.4-88%) 97% (94.7-98.6%)
+#> 6 50-74 M 68.1% (56.7-78.9%) 96.7% (94.1-98.6%)
+#> 7 75+ F 75.1% (63.6-85.5%) 97.8% (96-99%)
+#> 8 75+ M 74.9% (64.4-84.2%) 97.8% (96.1-99.1%)
#> # ℹ abbreviated name: ¹`Piperacillin/tazobactam + Gentamicin`
#> # ℹ 1 more variable: `Piperacillin/tazobactam + Tobramycin`
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
@@ -1096,18 +1100,19 @@ antibiogram(ex1,
# Print the output for R Markdown / Quarto -----------------------------
-ureido <- wisca(example_isolates,
+ureido <- wisca(top_n_microorganisms(example_isolates, n = 10),
antimicrobials = ureidopenicillins(),
syndromic_group = "ward"
)
#> ℹ For `ureidopenicillins()` using column TZP (piperacillin/tazobactam)
-#> Warning: In 2 of 3 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen
-#> accounts for more than 5% of the pathogen incidence (up to 13.3%), since many
-#> pathogens occur only rarely. Because WISCA gives every pathogen a prior weight
-#> of 1 (Bielicki et al., 2016), such rare pathogens can strongly lower the
-#> estimated coverage without reflecting the clinical expectation. Consider
-#> limiting the analysis to the most common pathogens with
-#> `top_n_microorganisms()`, or grouping rare pathogens before running WISCA.
+#> Warning: In 1 of 3 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen
+#> accounts for more than 5% of the pathogen incidence (up to 5.6%), since there
+#> are few isolates relative to the number of pathogens, i.e., rare pathogens or a
+#> small group. Because WISCA gives every pathogen a prior weight of 1 (Bielicki
+#> et al., 2016), this can strongly lower the estimated coverage without
+#> reflecting the clinical expectation. Consider limiting the analysis to the most
+#> common pathogens with `top_n_microorganisms()`, or using fewer and larger
+#> groups.
# in an Rmd file, you would just need to return `ureido` in a chunk,
# but to be explicit here:
@@ -1118,9 +1123,9 @@ if (requireNamespace("knitr")) {
#>
#> |Syndromic Group |Piperacillin/tazobactam |
#> |:---------------|:-----------------------|
-#> |Clinical |77.8% (72.6-83.1%) |
-#> |ICU |59.8% (53.9-67.7%) |
-#> |Outpatient |68.4% (52.2-84.6%) |
+#> |Clinical |79.1% (72.2-85.8%) |
+#> |ICU |57.3% (48.9-69%) |
+#> |Outpatient |67.8% (49.1-87.9%) |
# Generate plots with ggplot2 or base R --------------------------------
@@ -1129,17 +1134,18 @@ ab1 <- antibiogram(example_isolates,
antimicrobials = c("AMC", "CIP", "TZP", "TZP+TOB"),
mo_transform = "gramstain"
)
-ab2 <- wisca(example_isolates,
+ab2 <- wisca(top_n_microorganisms(example_isolates, n = 10),
antimicrobials = c("AMC", "CIP", "TZP", "TZP+TOB"),
syndromic_group = "ward"
)
-#> Warning: In 8 of 12 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen
-#> accounts for more than 5% of the pathogen incidence (up to 13.3%), since many
-#> pathogens occur only rarely. Because WISCA gives every pathogen a prior weight
-#> of 1 (Bielicki et al., 2016), such rare pathogens can strongly lower the
-#> estimated coverage without reflecting the clinical expectation. Consider
-#> limiting the analysis to the most common pathogens with
-#> `top_n_microorganisms()`, or grouping rare pathogens before running WISCA.
+#> Warning: In 4 of 12 WISCA regimen(s) or group(s), the prior weight of 1 per pathogen
+#> accounts for more than 5% of the pathogen incidence (up to 6.4%), since there
+#> are few isolates relative to the number of pathogens, i.e., rare pathogens or a
+#> small group. Because WISCA gives every pathogen a prior weight of 1 (Bielicki
+#> et al., 2016), this can strongly lower the estimated coverage without
+#> reflecting the clinical expectation. Consider limiting the analysis to the most
+#> common pathogens with `top_n_microorganisms()`, or using fewer and larger
+#> groups.
if (requireNamespace("ggplot2")) {
ggplot2::autoplot(ab1)
diff --git a/reference/antimicrobial_selectors.html b/reference/antimicrobial_selectors.html
index 53645c306..c499d4c29 100644
--- a/reference/antimicrobial_selectors.html
+++ b/reference/antimicrobial_selectors.html
@@ -17,7 +17,7 @@ my_data_with_all_these_columns %>%
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/antimicrobials.html b/reference/antimicrobials.html
index a52cd35ad..a2dfafa00 100644
--- a/reference/antimicrobials.html
+++ b/reference/antimicrobials.html
@@ -9,7 +9,7 @@ The antibiotics data set has been renamed to antimicrobials. The old name will b
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/as.ab.html b/reference/as.ab.html
index 62e48e5ad..d6ca24123 100644
--- a/reference/as.ab.html
+++ b/reference/as.ab.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/as.av.html b/reference/as.av.html
index 1e485e864..1d71ce90b 100644
--- a/reference/as.av.html
+++ b/reference/as.av.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/as.disk.html b/reference/as.disk.html
index 1f1a67593..c5f75e6e8 100644
--- a/reference/as.disk.html
+++ b/reference/as.disk.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/as.mic.html b/reference/as.mic.html
index 6abe48fb8..f8ecf366d 100644
--- a/reference/as.mic.html
+++ b/reference/as.mic.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/as.mo.html b/reference/as.mo.html
index a2e3a5e76..b62e36c94 100644
--- a/reference/as.mo.html
+++ b/reference/as.mo.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/as.sir.html b/reference/as.sir.html
index 065e6b79c..14bd25de5 100644
--- a/reference/as.sir.html
+++ b/reference/as.sir.html
@@ -9,7 +9,7 @@ Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026,
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
@@ -469,10 +469,10 @@ Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026,
#># A tibble: 4 × 18#> datetime index method ab_given mo_given host_given input_given#><dttm><int><chr><chr><chr><chr><chr>
-#>1 2026-10-30 11:42:12 1 MIC amoxicillin Escherich… human 8
-#>2 2026-10-30 11:42:12 1 MIC cipro Escherich… human 0.256
-#>3 2026-10-30 11:42:12 1 DISK tobra Escherich… human 16
-#>4 2026-10-30 11:42:12 1 DISK genta Escherich… human 18
+#>1 2026-10-30 11:50:46 1 MIC amoxicillin Escherich… human 8
+#>2 2026-10-30 11:50:46 1 MIC cipro Escherich… human 0.256
+#>3 2026-10-30 11:50:46 1 DISK tobra Escherich… human 16
+#>4 2026-10-30 11:50:46 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>
diff --git a/reference/as.sir.md b/reference/as.sir.md
index 899d387fe..4e3f56d9f 100644
--- a/reference/as.sir.md
+++ b/reference/as.sir.md
@@ -790,10 +790,10 @@ sir_interpretation_history()
#> # A tibble: 4 × 18
#> datetime index method ab_given mo_given host_given input_given
#>
-#> 1 2026-10-30 11:42:12 1 MIC amoxicillin Escherich… human 8
-#> 2 2026-10-30 11:42:12 1 MIC cipro Escherich… human 0.256
-#> 3 2026-10-30 11:42:12 1 DISK tobra Escherich… human 16
-#> 4 2026-10-30 11:42:12 1 DISK genta Escherich… human 18
+#> 1 2026-10-30 11:50:46 1 MIC amoxicillin Escherich… human 8
+#> 2 2026-10-30 11:50:46 1 MIC cipro Escherich… human 0.256
+#> 3 2026-10-30 11:50:46 1 DISK tobra Escherich… human 16
+#> 4 2026-10-30 11:50:46 1 DISK genta Escherich… human 18
#> # ℹ 11 more variables: ab , mo , host , input ,
#> # outcome , notes , guideline , ref_table , uti ,
#> # breakpoint_S_R , site
diff --git a/reference/atc_online.html b/reference/atc_online.html
index d201e0f1a..44b0a3f0f 100644
--- a/reference/atc_online.html
+++ b/reference/atc_online.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/av_from_text.html b/reference/av_from_text.html
index 2081e3f91..3abfaea87 100644
--- a/reference/av_from_text.html
+++ b/reference/av_from_text.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/av_property.html b/reference/av_property.html
index 0a0883e6c..7ec5c7bdf 100644
--- a/reference/av_property.html
+++ b/reference/av_property.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/availability.html b/reference/availability.html
index 0ea00f4b0..81728a291 100644
--- a/reference/availability.html
+++ b/reference/availability.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/bug_drug_combinations.html b/reference/bug_drug_combinations.html
index b7e34468a..25911fd88 100644
--- a/reference/bug_drug_combinations.html
+++ b/reference/bug_drug_combinations.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/clinical_breakpoints.html b/reference/clinical_breakpoints.html
index 11a839a25..119bd64e7 100644
--- a/reference/clinical_breakpoints.html
+++ b/reference/clinical_breakpoints.html
@@ -21,7 +21,7 @@ Use as.sir() to transform MICs or disks measurements to SIR values.">AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/count.html b/reference/count.html
index 7ebc0f729..3d85625d0 100644
--- a/reference/count.html
+++ b/reference/count.html
@@ -9,7 +9,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/custom_interpretive_rules.html b/reference/custom_interpretive_rules.html
index b572de150..6e3a8baf7 100644
--- a/reference/custom_interpretive_rules.html
+++ b/reference/custom_interpretive_rules.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/custom_mdro_guideline.html b/reference/custom_mdro_guideline.html
index a21d39f5f..18a210bdb 100644
--- a/reference/custom_mdro_guideline.html
+++ b/reference/custom_mdro_guideline.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/dosage.html b/reference/dosage.html
index e77ae8942..ec6d63e62 100644
--- a/reference/dosage.html
+++ b/reference/dosage.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/esbl_isolates.html b/reference/esbl_isolates.html
index 8dcf1c22c..c2735b0b2 100644
--- a/reference/esbl_isolates.html
+++ b/reference/esbl_isolates.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/example_isolates.html b/reference/example_isolates.html
index 1c8e343ea..3792afd9b 100644
--- a/reference/example_isolates.html
+++ b/reference/example_isolates.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/example_isolates_unclean.html b/reference/example_isolates_unclean.html
index 2ec6ea686..0d33e0b12 100644
--- a/reference/example_isolates_unclean.html
+++ b/reference/example_isolates_unclean.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/export_ncbi_biosample.html b/reference/export_ncbi_biosample.html
index 3a73cd1da..37531a9b1 100644
--- a/reference/export_ncbi_biosample.html
+++ b/reference/export_ncbi_biosample.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/first_isolate.html b/reference/first_isolate.html
index 42e5000a0..9e869ac44 100644
--- a/reference/first_isolate.html
+++ b/reference/first_isolate.html
@@ -9,7 +9,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/g.test.html b/reference/g.test.html
index ed6521ad1..1b8e325a4 100644
--- a/reference/g.test.html
+++ b/reference/g.test.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/get_episode.html b/reference/get_episode.html
index 870da1f7d..a80bd42de 100644
--- a/reference/get_episode.html
+++ b/reference/get_episode.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
@@ -154,27 +154,28 @@
df<-example_isolates[sample(seq_len(2000), size =100), ]get_episode(df$date, episode_days =60)# indices
-#> [1] 47 42 29 42 34 46 24 12 12 45 22 36 43 12 8 15 36 39 24 16 32 32 46 13 35
-#> [26] 5 18 39 23 40 11 13 40 49 41 47 12 15 19 27 7 5 47 2 23 21 6 48 16 27
-#> [51] 48 37 9 31 44 36 4 2 7 27 47 30 10 28 20 19 9 26 47 25 23 25 48 33 47
-#> [76] 9 17 2 46 24 47 27 43 38 26 41 6 9 25 43 1 5 3 48 14 5 21 17 28 48
+#> [1] 10 47 27 19 35 45 20 18 28 1 20 34 11 31 9 44 6 5 27 42 2 19 33 39 7
+#> [26] 18 21 35 7 45 12 4 16 29 32 23 30 37 25 38 22 41 30 27 22 47 33 10 14 29
+#> [51] 44 40 17 42 35 5 6 13 8 38 45 37 1 43 45 10 46 38 19 43 10 21 44 37 44
+#> [76] 5 33 3 10 43 36 31 27 3 43 13 15 23 32 26 41 13 16 37 16 18 24 26 24 27is_new_episode(df$date, episode_days =60)# TRUE/FALSE
-#> [1] TRUE TRUE TRUE FALSE TRUE TRUE TRUE TRUE FALSE TRUE TRUE TRUE
-#> [13] TRUE FALSE TRUE TRUE FALSE TRUE FALSE TRUE TRUE FALSE FALSE TRUE
-#> [25] TRUE TRUE TRUE FALSE TRUE TRUE TRUE FALSE FALSE TRUE TRUE FALSE
-#> [37] FALSE FALSE TRUE TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE TRUE
-#> [49] FALSE FALSE FALSE TRUE TRUE TRUE TRUE FALSE TRUE FALSE FALSE FALSE
-#> [61] FALSE TRUE TRUE TRUE TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE
-#> [73] FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE TRUE
-#> [85] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE
-#> [97] FALSE FALSE FALSE FALSE
+#> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE
+#> [13] TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE FALSE TRUE TRUE
+#> [25] TRUE FALSE TRUE FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE
+#> [37] TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE
+#> [49] TRUE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE
+#> [61] FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE
+#> [73] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE
+#> [85] FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE
+#> [97] TRUE FALSE FALSE FALSE# filter on results from the third 60-day episode only, using base Rdf[which(get_episode(df$date, 60)==3), ]
-#># A tibble: 1 × 46
+#># A tibble: 2 × 46#> date patient age gender ward mo PEN OXA FLC AMX #><date><chr><dbl><chr><chr><mo><sir><sir><sir><sir>
-#>1 2002-11-14 058917 76 F ICU B_STPHY_HMNS R NA S NA
+#>1 2002-08-14 785317 51 F ICU B_ESCHR_COLI R NA NA NA
+#>2 2002-06-22 FD8039 75 F ICU B_ESCHR_COLI R NA NA NA#># ℹ 36 more variables: AMC <sir>, AMP <sir>, TZP <sir>, CZO <sir>, FEP <sir>,#># CXM <sir>, FOX <sir>, CTX <sir>, CAZ <sir>, CRO <sir>, GEN <sir>,#># TOB <sir>, AMK <sir>, KAN <sir>, TMP <sir>, SXT <sir>, NIT <sir>,
@@ -208,19 +209,19 @@
arrange(patient, condition, date)}#># A tibble: 100 × 4
-#># Groups: patient, condition [98]
+#># Groups: patient, condition [100]#> patient date condition new_episode#><chr><date><chr><lgl>
-#> 1 008218 2009-04-27 A TRUE
-#> 2 058917 2002-11-14 B TRUE
-#> 3 074321 2015-09-20 B TRUE
-#> 4 078381 2014-08-17 A TRUE
-#> 5 080086 2007-10-26 C TRUE
-#> 6 0D7D34 2011-03-16 C TRUE
-#> 7 0DBB93 2003-10-02 A TRUE
-#> 8 110918 2016-05-08 A TRUE
-#> 9 156730 2012-04-12 C TRUE
-#>10 175532 2010-04-10 C TRUE
+#> 1 001213 2009-08-03 A TRUE
+#> 2 067927 2002-01-07 C TRUE
+#> 3 078381 2014-07-17 C TRUE
+#> 4 0DBF93 2015-12-03 C TRUE
+#> 5 105248 2005-06-16 C TRUE
+#> 6 110918 2016-05-08 C TRUE
+#> 7 130252 2002-04-08 A TRUE
+#> 8 16F0F7 2010-01-17 C TRUE
+#> 9 189795 2008-10-19 B TRUE
+#>10 207752 2008-07-11 B TRUE #># ℹ 90 more rowsif(require("dplyr")){
@@ -237,16 +238,16 @@
#># Groups: ward, patient [95]#> ward date patient new_index new_logical#><chr><date><chr><int><lgl>
-#> 1 Clinical 2009-04-27 008218 1 TRUE
-#> 2 ICU 2002-11-14 058917 1 TRUE
-#> 3 ICU 2015-09-20 074321 1 TRUE
-#> 4 ICU 2014-08-17 078381 1 TRUE
-#> 5 Clinical 2007-10-26 080086 1 TRUE
-#> 6 ICU 2011-03-16 0D7D34 1 TRUE
-#> 7 ICU 2003-10-02 0DBB93 1 TRUE
-#> 8 ICU 2016-05-08 110918 1 TRUE
-#> 9 Clinical 2012-04-12 156730 1 TRUE
-#>10 ICU 2010-04-10 175532 1 TRUE
+#> 1 Clinical 2009-08-03 001213 1 TRUE
+#> 2 ICU 2002-01-07 067927 1 TRUE
+#> 3 ICU 2014-07-17 078381 1 TRUE
+#> 4 ICU 2015-12-03 0DBF93 1 TRUE
+#> 5 Clinical 2005-06-16 105248 1 TRUE
+#> 6 ICU 2016-05-08 110918 1 TRUE
+#> 7 ICU 2002-04-08 130252 1 TRUE
+#> 8 Clinical 2010-01-17 16F0F7 1 TRUE
+#> 9 Clinical 2008-10-19 189795 1 TRUE
+#>10 ICU 2008-07-11 207752 1 TRUE #># ℹ 90 more rowsif(require("dplyr")){
@@ -262,9 +263,9 @@
#># A tibble: 3 × 5#> ward n_patients n_episodes_365 n_episodes_60 n_episodes_30#><chr><int><int><int><int>
-#>1 Clinical 58 13 37 42
-#>2 ICU 29 11 21 26
-#>3 Outpatient 8 5 8 8
+#>1 Clinical 57 13 36 42
+#>2 ICU 32 11 24 29
+#>3 Outpatient 6 4 7 7# grouping on patients and microorganisms leads to the same# results as first_isolate() when using 'episode-based':
@@ -293,19 +294,19 @@
select(group_vars(.), flag_episode)}#># A tibble: 100 × 4
-#># Groups: patient, mo, ward [96]
-#> patient mo ward flag_episode
-#><chr><mo><chr><lgl>
-#> 1 340066 B_ESCHR_COLI Clinical TRUE
-#> 2 904640 B_PROTS_MRBL Clinical TRUE
-#> 3 E31724 B_STPHY_CONS ICU TRUE
-#> 4 074321 B_STPHY_HMLY ICU TRUE
-#> 5 660761 B_STRPT_DYSG Clinical TRUE
-#> 6 D39422 B_KLBSL_PNMN Clinical TRUE
-#> 7 408807 B_STPHY_CONS Clinical TRUE
-#> 8 438596 B_HMPHL_INFL ICU TRUE
-#> 9 964998 B_STRPT_PNMN Clinical TRUE
-#>10 D08278 B_ESCHR_COLI ICU TRUE
+#># Groups: patient, mo, ward [97]
+#> patient mo ward flag_episode
+#><chr><mo><chr><lgl>
+#> 1 C82046 B_PANTO ICU TRUE
+#> 2 C80762 B_ESCHR_COLI ICU TRUE
+#> 3 A81782 B_STPHY_EPDR Clinical TRUE
+#> 4 534816 F_CANDD_ALBC Clinical TRUE
+#> 5 A3C336 B_KLBSL_OXYT Clinical TRUE
+#> 6 BF4515 B_ESCHR_COLI ICU TRUE
+#> 7 CD4354 B_ESCHR_COLI ICU TRUE
+#> 8 C25784 B_STRPT_PNMN Outpatient TRUE
+#> 9 874171 B_STRPT_PNMN Clinical TRUE
+#>10 067927 B_STPHY_EPDR ICU TRUE #># ℹ 90 more rows# }
diff --git a/reference/get_episode.md b/reference/get_episode.md
index ead6bd152..fc838517f 100644
--- a/reference/get_episode.md
+++ b/reference/get_episode.md
@@ -178,27 +178,28 @@ x
df <- example_isolates[sample(seq_len(2000), size = 100), ]
get_episode(df$date, episode_days = 60) # indices
-#> [1] 47 42 29 42 34 46 24 12 12 45 22 36 43 12 8 15 36 39 24 16 32 32 46 13 35
-#> [26] 5 18 39 23 40 11 13 40 49 41 47 12 15 19 27 7 5 47 2 23 21 6 48 16 27
-#> [51] 48 37 9 31 44 36 4 2 7 27 47 30 10 28 20 19 9 26 47 25 23 25 48 33 47
-#> [76] 9 17 2 46 24 47 27 43 38 26 41 6 9 25 43 1 5 3 48 14 5 21 17 28 48
+#> [1] 10 47 27 19 35 45 20 18 28 1 20 34 11 31 9 44 6 5 27 42 2 19 33 39 7
+#> [26] 18 21 35 7 45 12 4 16 29 32 23 30 37 25 38 22 41 30 27 22 47 33 10 14 29
+#> [51] 44 40 17 42 35 5 6 13 8 38 45 37 1 43 45 10 46 38 19 43 10 21 44 37 44
+#> [76] 5 33 3 10 43 36 31 27 3 43 13 15 23 32 26 41 13 16 37 16 18 24 26 24 27
is_new_episode(df$date, episode_days = 60) # TRUE/FALSE
-#> [1] TRUE TRUE TRUE FALSE TRUE TRUE TRUE TRUE FALSE TRUE TRUE TRUE
-#> [13] TRUE FALSE TRUE TRUE FALSE TRUE FALSE TRUE TRUE FALSE FALSE TRUE
-#> [25] TRUE TRUE TRUE FALSE TRUE TRUE TRUE FALSE FALSE TRUE TRUE FALSE
-#> [37] FALSE FALSE TRUE TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE TRUE
-#> [49] FALSE FALSE FALSE TRUE TRUE TRUE TRUE FALSE TRUE FALSE FALSE FALSE
-#> [61] FALSE TRUE TRUE TRUE TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE
-#> [73] FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE TRUE
-#> [85] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE
-#> [97] FALSE FALSE FALSE FALSE
+#> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE
+#> [13] TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE FALSE TRUE TRUE
+#> [25] TRUE FALSE TRUE FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE
+#> [37] TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE
+#> [49] TRUE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE
+#> [61] FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE
+#> [73] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE
+#> [85] FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE
+#> [97] TRUE FALSE FALSE FALSE
# filter on results from the third 60-day episode only, using base R
df[which(get_episode(df$date, 60) == 3), ]
-#> # A tibble: 1 × 46
+#> # A tibble: 2 × 46
#> date patient age gender ward mo PEN OXA FLC AMX
#>
-#> 1 2002-11-14 058917 76 F ICU B_STPHY_HMNS R NA S NA
+#> 1 2002-08-14 785317 51 F ICU B_ESCHR_COLI R NA NA NA
+#> 2 2002-06-22 FD8039 75 F ICU B_ESCHR_COLI R NA NA NA
#> # ℹ 36 more variables: AMC , AMP , TZP , CZO , FEP ,
#> # CXM , FOX , CTX , CAZ , CRO , GEN ,
#> # TOB , AMK , KAN , TMP , SXT , NIT ,
@@ -232,19 +233,19 @@ if (require("dplyr")) {
arrange(patient, condition, date)
}
#> # A tibble: 100 × 4
-#> # Groups: patient, condition [98]
+#> # Groups: patient, condition [100]
#> patient date condition new_episode
#>
-#> 1 008218 2009-04-27 A TRUE
-#> 2 058917 2002-11-14 B TRUE
-#> 3 074321 2015-09-20 B TRUE
-#> 4 078381 2014-08-17 A TRUE
-#> 5 080086 2007-10-26 C TRUE
-#> 6 0D7D34 2011-03-16 C TRUE
-#> 7 0DBB93 2003-10-02 A TRUE
-#> 8 110918 2016-05-08 A TRUE
-#> 9 156730 2012-04-12 C TRUE
-#> 10 175532 2010-04-10 C TRUE
+#> 1 001213 2009-08-03 A TRUE
+#> 2 067927 2002-01-07 C TRUE
+#> 3 078381 2014-07-17 C TRUE
+#> 4 0DBF93 2015-12-03 C TRUE
+#> 5 105248 2005-06-16 C TRUE
+#> 6 110918 2016-05-08 C TRUE
+#> 7 130252 2002-04-08 A TRUE
+#> 8 16F0F7 2010-01-17 C TRUE
+#> 9 189795 2008-10-19 B TRUE
+#> 10 207752 2008-07-11 B TRUE
#> # ℹ 90 more rows
if (require("dplyr")) {
@@ -261,16 +262,16 @@ if (require("dplyr")) {
#> # Groups: ward, patient [95]
#> ward date patient new_index new_logical
#>
-#> 1 Clinical 2009-04-27 008218 1 TRUE
-#> 2 ICU 2002-11-14 058917 1 TRUE
-#> 3 ICU 2015-09-20 074321 1 TRUE
-#> 4 ICU 2014-08-17 078381 1 TRUE
-#> 5 Clinical 2007-10-26 080086 1 TRUE
-#> 6 ICU 2011-03-16 0D7D34 1 TRUE
-#> 7 ICU 2003-10-02 0DBB93 1 TRUE
-#> 8 ICU 2016-05-08 110918 1 TRUE
-#> 9 Clinical 2012-04-12 156730 1 TRUE
-#> 10 ICU 2010-04-10 175532 1 TRUE
+#> 1 Clinical 2009-08-03 001213 1 TRUE
+#> 2 ICU 2002-01-07 067927 1 TRUE
+#> 3 ICU 2014-07-17 078381 1 TRUE
+#> 4 ICU 2015-12-03 0DBF93 1 TRUE
+#> 5 Clinical 2005-06-16 105248 1 TRUE
+#> 6 ICU 2016-05-08 110918 1 TRUE
+#> 7 ICU 2002-04-08 130252 1 TRUE
+#> 8 Clinical 2010-01-17 16F0F7 1 TRUE
+#> 9 Clinical 2008-10-19 189795 1 TRUE
+#> 10 ICU 2008-07-11 207752 1 TRUE
#> # ℹ 90 more rows
if (require("dplyr")) {
@@ -286,9 +287,9 @@ if (require("dplyr")) {
#> # A tibble: 3 × 5
#> ward n_patients n_episodes_365 n_episodes_60 n_episodes_30
#>
-#> 1 Clinical 58 13 37 42
-#> 2 ICU 29 11 21 26
-#> 3 Outpatient 8 5 8 8
+#> 1 Clinical 57 13 36 42
+#> 2 ICU 32 11 24 29
+#> 3 Outpatient 6 4 7 7
# grouping on patients and microorganisms leads to the same
# results as first_isolate() when using 'episode-based':
@@ -317,19 +318,19 @@ if (require("dplyr")) {
select(group_vars(.), flag_episode)
}
#> # A tibble: 100 × 4
-#> # Groups: patient, mo, ward [96]
-#> patient mo ward flag_episode
-#>
-#> 1 340066 B_ESCHR_COLI Clinical TRUE
-#> 2 904640 B_PROTS_MRBL Clinical TRUE
-#> 3 E31724 B_STPHY_CONS ICU TRUE
-#> 4 074321 B_STPHY_HMLY ICU TRUE
-#> 5 660761 B_STRPT_DYSG Clinical TRUE
-#> 6 D39422 B_KLBSL_PNMN Clinical TRUE
-#> 7 408807 B_STPHY_CONS Clinical TRUE
-#> 8 438596 B_HMPHL_INFL ICU TRUE
-#> 9 964998 B_STRPT_PNMN Clinical TRUE
-#> 10 D08278 B_ESCHR_COLI ICU TRUE
+#> # Groups: patient, mo, ward [97]
+#> patient mo ward flag_episode
+#>
+#> 1 C82046 B_PANTO ICU TRUE
+#> 2 C80762 B_ESCHR_COLI ICU TRUE
+#> 3 A81782 B_STPHY_EPDR Clinical TRUE
+#> 4 534816 F_CANDD_ALBC Clinical TRUE
+#> 5 A3C336 B_KLBSL_OXYT Clinical TRUE
+#> 6 BF4515 B_ESCHR_COLI ICU TRUE
+#> 7 CD4354 B_ESCHR_COLI ICU TRUE
+#> 8 C25784 B_STRPT_PNMN Outpatient TRUE
+#> 9 874171 B_STRPT_PNMN Clinical TRUE
+#> 10 067927 B_STPHY_EPDR ICU TRUE
#> # ℹ 90 more rows
# }
```
diff --git a/reference/ggplot_pca.html b/reference/ggplot_pca.html
index 2381cfe90..225891dec 100644
--- a/reference/ggplot_pca.html
+++ b/reference/ggplot_pca.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/ggplot_sir.html b/reference/ggplot_sir.html
index 07bedf5a9..a9b58968e 100644
--- a/reference/ggplot_sir.html
+++ b/reference/ggplot_sir.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/guess_ab_col.html b/reference/guess_ab_col.html
index 87030111b..4ad4bf6d7 100644
--- a/reference/guess_ab_col.html
+++ b/reference/guess_ab_col.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/index.html b/reference/index.html
index daba0d018..adf5f1f51 100644
--- a/reference/index.html
+++ b/reference/index.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/interpretive_rules.html b/reference/interpretive_rules.html
index c90249d45..c70db5d29 100644
--- a/reference/interpretive_rules.html
+++ b/reference/interpretive_rules.html
@@ -9,7 +9,7 @@ To improve the interpretation of the antibiogram before CLSI/EUCAST interpretive
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/intrinsic_resistant.html b/reference/intrinsic_resistant.html
index da53e914c..a076a4046 100644
--- a/reference/intrinsic_resistant.html
+++ b/reference/intrinsic_resistant.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/italicise_taxonomy.html b/reference/italicise_taxonomy.html
index f6c2e7ec5..72585f04b 100644
--- a/reference/italicise_taxonomy.html
+++ b/reference/italicise_taxonomy.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/join.html b/reference/join.html
index b36b4b5c2..daf78c54c 100644
--- a/reference/join.html
+++ b/reference/join.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/key_antimicrobials.html b/reference/key_antimicrobials.html
index cb4b2f189..3760f14a5 100644
--- a/reference/key_antimicrobials.html
+++ b/reference/key_antimicrobials.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
diff --git a/reference/kurtosis.html b/reference/kurtosis.html
index ec5721aeb..f9ffdf8f3 100644
--- a/reference/kurtosis.html
+++ b/reference/kurtosis.html
@@ -7,7 +7,7 @@
AMR (for R)
- 3.1.0.9010
+ 3.1.0.9011
@@ -91,9 +91,9 @@