summary(our_data_1st)
-#> patient_id hospital date
-#> Length:2724 Length:2724 Min. :2011-01-01
-#> Class :character Class :character 1st Qu.:2013-04-07
-#> Mode :character Mode :character Median :2015-06-03
-#> Mean :2015-06-09
-#> 3rd Qu.:2017-08-11
-#> Max. :2019-12-27
-#> bacteria AMX AMC
-#> Class :mo Class:sir Class:sir
-#> <NA> :0 %S :41.6% (n=1133) %S :52.6% (n=1432)
-#> Unique:4 %SDD : 0.0% (n=0) %SDD : 0.0% (n=0)
-#> #1 :B_ESCHR_COLI %I :16.4% (n=446) %I :12.2% (n=333)
-#> #2 :B_STPHY_AURS %R :42.0% (n=1145) %R :35.2% (n=959)
-#> #3 :B_STRPT_PNMN %NI : 0.0% (n=0) %NI : 0.0% (n=0)
-#> CIP GEN first
-#> Class:sir Class:sir Mode:logical
-#> %S :52.5% (n=1431) %S :61.0% (n=1661) TRUE:2724
-#> %SDD : 0.0% (n=0) %SDD : 0.0% (n=0)
-#> %I : 6.5% (n=176) %I : 3.0% (n=82)
-#> %R :41.0% (n=1117) %R :36.0% (n=981)
-#> %NI : 0.0% (n=0) %NI : 0.0% (n=0)
+#> patient_id hospital date bacteria
+#> Length :2724 Length :2724 Min. :2011-01-01 Class :mo
+#> N.unique : 260 N.unique : 3 1st Qu.:2013-04-07 <NA> :0
+#> N.blank : 0 N.blank : 0 Median :2015-06-03 Unique:4
+#> Min.nchar: 2 Min.nchar: 1 Mean :2015-06-09 #1 :B_ESCHR_COLI
+#> Max.nchar: 3 Max.nchar: 1 3rd Qu.:2017-08-11 #2 :B_STPHY_AURS
+#> Max. :2019-12-27 #3 :B_STRPT_PNMN
+#> AMX AMC CIP
+#> Class:sir Class:sir Class:sir
+#> %S :41.6% (n=1133) %S :52.6% (n=1432) %S :52.5% (n=1431)
+#> %SDD : 0.0% (n=0) %SDD : 0.0% (n=0) %SDD : 0.0% (n=0)
+#> %I :16.4% (n=446) %I :12.2% (n=333) %I : 6.5% (n=176)
+#> %R :42.0% (n=1145) %R :35.2% (n=959) %R :41.0% (n=1117)
+#> %NI : 0.0% (n=0) %NI : 0.0% (n=0) %NI : 0.0% (n=0)
+#> GEN first
+#> Class:sir Mode:logical
+#> %S :61.0% (n=1661) TRUE:2724
+#> %SDD : 0.0% (n=0)
+#> %I : 3.0% (n=82)
+#> %R :36.0% (n=981)
+#> %NI : 0.0% (n=0)
glimpse(our_data_1st)
#> Rows: 2,724
diff --git a/articles/AMR.md b/articles/AMR.md
index 0d50d64fd..3d89d6df1 100644
--- a/articles/AMR.md
+++ b/articles/AMR.md
@@ -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 24 April 2026.
+methodology remains unchanged. This page was generated on 25 April 2026.
## Introduction
@@ -51,9 +51,9 @@ structure of your data generally look like this:
| date | patient_id | mo | AMX | CIP |
|:----------:|:----------:|:----------------:|:---:|:---:|
-| 2026-04-24 | abcd | Escherichia coli | S | S |
-| 2026-04-24 | abcd | Escherichia coli | S | R |
-| 2026-04-24 | efgh | Escherichia coli | R | S |
+| 2026-04-25 | abcd | Escherichia coli | S | S |
+| 2026-04-25 | abcd | Escherichia coli | S | R |
+| 2026-04-25 | efgh | Escherichia coli | R | S |
### Needed R packages
@@ -367,27 +367,27 @@ and `sir` classes that we now have in our data set:
``` r
summary(our_data_1st)
-#> patient_id hospital date
-#> Length:2724 Length:2724 Min. :2011-01-01
-#> Class :character Class :character 1st Qu.:2013-04-07
-#> Mode :character Mode :character Median :2015-06-03
-#> Mean :2015-06-09
-#> 3rd Qu.:2017-08-11
-#> Max. :2019-12-27
-#> bacteria AMX AMC
-#> Class :mo Class:sir Class:sir
-#> :0 %S :41.6% (n=1133) %S :52.6% (n=1432)
-#> Unique:4 %SDD : 0.0% (n=0) %SDD : 0.0% (n=0)
-#> #1 :B_ESCHR_COLI %I :16.4% (n=446) %I :12.2% (n=333)
-#> #2 :B_STPHY_AURS %R :42.0% (n=1145) %R :35.2% (n=959)
-#> #3 :B_STRPT_PNMN %NI : 0.0% (n=0) %NI : 0.0% (n=0)
-#> CIP GEN first
-#> Class:sir Class:sir Mode:logical
-#> %S :52.5% (n=1431) %S :61.0% (n=1661) TRUE:2724
-#> %SDD : 0.0% (n=0) %SDD : 0.0% (n=0)
-#> %I : 6.5% (n=176) %I : 3.0% (n=82)
-#> %R :41.0% (n=1117) %R :36.0% (n=981)
-#> %NI : 0.0% (n=0) %NI : 0.0% (n=0)
+#> patient_id hospital date bacteria
+#> Length :2724 Length :2724 Min. :2011-01-01 Class :mo
+#> N.unique : 260 N.unique : 3 1st Qu.:2013-04-07 :0
+#> N.blank : 0 N.blank : 0 Median :2015-06-03 Unique:4
+#> Min.nchar: 2 Min.nchar: 1 Mean :2015-06-09 #1 :B_ESCHR_COLI
+#> Max.nchar: 3 Max.nchar: 1 3rd Qu.:2017-08-11 #2 :B_STPHY_AURS
+#> Max. :2019-12-27 #3 :B_STRPT_PNMN
+#> AMX AMC CIP
+#> Class:sir Class:sir Class:sir
+#> %S :41.6% (n=1133) %S :52.6% (n=1432) %S :52.5% (n=1431)
+#> %SDD : 0.0% (n=0) %SDD : 0.0% (n=0) %SDD : 0.0% (n=0)
+#> %I :16.4% (n=446) %I :12.2% (n=333) %I : 6.5% (n=176)
+#> %R :42.0% (n=1145) %R :35.2% (n=959) %R :41.0% (n=1117)
+#> %NI : 0.0% (n=0) %NI : 0.0% (n=0) %NI : 0.0% (n=0)
+#> GEN first
+#> Class:sir Mode:logical
+#> %S :61.0% (n=1661) TRUE:2724
+#> %SDD : 0.0% (n=0)
+#> %I : 3.0% (n=82)
+#> %R :36.0% (n=981)
+#> %NI : 0.0% (n=0)
glimpse(our_data_1st)
#> Rows: 2,724
diff --git a/articles/datasets.html b/articles/datasets.html
index da1b7a971..c5cde755f 100644
--- a/articles/datasets.html
+++ b/articles/datasets.html
@@ -80,7 +80,7 @@
Fixes
-
- Fixed multiple bugs in the
parallel = TRUE mode of as.sir() for data frames: (1) PSOCK workers (Windows / R < 4.0) now correctly load the AMR package before processing, with a graceful fallback to sequential mode when the package cannot be loaded; (2) resolved stale-environment issue where the PSOCK path read a frozen copy of AMR_env instead of the live one, causing the wrong log entries to be captured; (3) fixed log-entry duplication in the fork-based path (mclapply) where pre-existing sir_interpretation_history rows were included in every worker’s captured log; (4) removed use of non-exported internal functions (%pm>%, pm_pull, as.sir.default) from the worker closure, which made PSOCK workers fail; (5) suppressed per-column progress messages inside workers to prevent interleaved console output; (6) fixed a malformed Unicode escape \u00a (3 digits) in the “DONE” status message
+-
+
as.sir() with reference_data: custom guideline names now correctly classify values as R using EUCAST convention (> breakpoint_R for MIC, < breakpoint_R for disk); custom breakpoints with host = NA now serve as a host-agnostic fallback when no host-specific row matches (fixes #239)
+- Fixed multiple bugs in the
parallel = TRUE mode of as.sir() for data frames: (1) PSOCK workers (Windows / R < 4.0) now correctly load the AMR package before processing, with a graceful fallback to sequential mode when the package cannot be loaded; (2) resolved stale-environment issue where the PSOCK path read a frozen copy of AMR_env instead of the live one, causing the wrong log entries to be captured; (3) fixed log-entry duplication in the fork-based path (mclapply) where pre-existing sir_interpretation_history rows were included in every worker’s captured log; (4) removed use of non-exported internal functions (%pm>%, pm_pull, as.sir.default) from the worker closure, which made PSOCK workers fail; (5) suppressed per-column progress messages inside workers to prevent interleaved console output; (6) fixed a malformed Unicode escape \u00a (3 digits) in the “DONE” status message
- Fixed a bug in
as.sir() where values that were purely numeric (e.g., "1") and matched the broad SIR-matching regex would be incorrectly stripped of all content by the Unicode letter filter
- Fixed a bug in
as.mic() where MIC values in scientific notation (e.g., "1e-3") were incorrectly handled because the letter e was removed along with other Unicode letters; scientific notation e is now preserved
- Fixed a bug in
as.ab() where certain AB codes containing “PH” or “TH” (such as ETH, MTH, PHE, PHN, STH, THA, THI1) would incorrectly return NA when combined in a vector with any untranslatable value (#245)
diff --git a/news/index.md b/news/index.md
index 30639f31f..2fe3d2b45 100644
--- a/news/index.md
+++ b/news/index.md
@@ -63,6 +63,12 @@
#### Fixes
+- [`as.sir()`](https://amr-for-r.org/reference/as.sir.md) with
+ `reference_data`: custom guideline names now correctly classify values
+ as R using EUCAST convention (`> breakpoint_R` for MIC,
+ `< breakpoint_R` for disk); custom breakpoints with `host = NA` now
+ serve as a host-agnostic fallback when no host-specific row matches
+ (fixes [\#239](https://github.com/msberends/AMR/issues/239))
- Fixed multiple bugs in the `parallel = TRUE` mode of
[`as.sir()`](https://amr-for-r.org/reference/as.sir.md) for data
frames: (1) PSOCK workers (Windows / R \< 4.0) now correctly load the
diff --git a/pkgdown.yml b/pkgdown.yml
index 3f3e3ea1a..18c32d330 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -10,7 +10,7 @@ articles:
PCA: PCA.html
WHONET: WHONET.html
WISCA: WISCA.html
-last_built: 2026-04-24T22:40Z
+last_built: 2026-04-25T12:44Z
urls:
reference: https://amr-for-r.org/reference
article: https://amr-for-r.org/articles
diff --git a/reference/age.html b/reference/age.html
index e35f6f5fa..ff97bd5db 100644
--- a/reference/age.html
+++ b/reference/age.html
@@ -112,16 +112,16 @@
df
#> birth_date age age_exact age_at_y2k
-#> 1 1999-06-30 26 26.81644 0
-#> 2 1968-01-29 58 58.23288 31
-#> 3 1965-12-05 60 60.38356 34
-#> 4 1980-03-01 46 46.14795 19
-#> 5 1949-11-01 76 76.47671 50
-#> 6 1947-02-14 79 79.18904 52
-#> 7 1940-02-19 86 86.17534 59
-#> 8 1988-01-10 38 38.28493 11
-#> 9 1997-08-27 28 28.65753 2
-#> 10 1978-01-26 48 48.24110 21
+#> 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