diff --git a/DESCRIPTION b/DESCRIPTION index caf46570f..6cb646a5d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 3.0.1.9078 +Version: 3.0.1.9079 Date: 2026-06-27 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index d67ffe236..06b1b43b2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 3.0.1.9078 +# AMR 3.0.1.9079 Planned as v3.1.0, end of June 2026. diff --git a/R/amr_selectors.R b/R/amr_selectors.R index 183115405..fee6c4cdd 100755 --- a/R/amr_selectors.R +++ b/R/amr_selectors.R @@ -202,7 +202,7 @@ #' # data.table -------------------------------------------------------------- #' #' # data.table is supported as well, just use it in the same way as with -#' # base R, but add `with = FALSE` if using a single AB selector. +#' # base R, but add `with = FALSE` if using a single AMR selector. #' #' if (require("data.table")) { #' dt <- as.data.table(example_isolates) @@ -215,7 +215,7 @@ #' dt[, carbapenems(), with = FALSE] #' } #' -#' # for multiple selections or AB selectors, `with = FALSE` is not needed: +#' # for multiple selections or AMR selectors, `with = FALSE` is not needed: #' if (require("data.table")) { #' dt[, c("mo", aminoglycosides())] #' } diff --git a/R/sysdata.rda b/R/sysdata.rda index 6b90621ff..85ed4696c 100755 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/data/antibiotics.rda b/data/antibiotics.rda index 4b919f059..a9f6b7b8e 100644 Binary files a/data/antibiotics.rda and b/data/antibiotics.rda differ diff --git a/data/antimicrobials.rda b/data/antimicrobials.rda index 26199aa8c..6c2873788 100644 Binary files a/data/antimicrobials.rda and b/data/antimicrobials.rda differ diff --git a/man/antimicrobial_selectors.Rd b/man/antimicrobial_selectors.Rd index 72fc8f436..5b9005a67 100644 --- a/man/antimicrobial_selectors.Rd +++ b/man/antimicrobial_selectors.Rd @@ -437,7 +437,7 @@ example_isolates[, amr_selector(oral_ddd > 1 & oral_units == "g")] # data.table -------------------------------------------------------------- # data.table is supported as well, just use it in the same way as with -# base R, but add `with = FALSE` if using a single AB selector. +# base R, but add `with = FALSE` if using a single AMR selector. if (require("data.table")) { dt <- as.data.table(example_isolates) @@ -450,7 +450,7 @@ if (require("data.table")) { dt[, carbapenems(), with = FALSE] } -# for multiple selections or AB selectors, `with = FALSE` is not needed: +# for multiple selections or AMR selectors, `with = FALSE` is not needed: if (require("data.table")) { dt[, c("mo", aminoglycosides())] } diff --git a/man/plot.Rd b/man/plot.Rd index 947885075..325f9a242 100644 --- a/man/plot.Rd +++ b/man/plot.Rd @@ -36,21 +36,21 @@ scale_fill_mic(keep_operators = "edges", mic_range = NULL, ...) scale_x_sir( colours_SIR = c(S = "#3CAEA3", SDD = "#8FD6C4", I = "#F6D55C", R = "#ED553B"), language = get_AMR_locale(), - eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST", + eucast_I = getOption("AMR_guideline", "EUCAST") \%like\% "EUCAST", ... ) scale_colour_sir( colours_SIR = c(S = "#3CAEA3", SDD = "#8FD6C4", I = "#F6D55C", R = "#ED553B"), language = get_AMR_locale(), - eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST", + eucast_I = getOption("AMR_guideline", "EUCAST") \%like\% "EUCAST", ... ) scale_fill_sir( colours_SIR = c(S = "#3CAEA3", SDD = "#8FD6C4", I = "#F6D55C", R = "#ED553B"), language = get_AMR_locale(), - eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST", + eucast_I = getOption("AMR_guideline", "EUCAST") \%like\% "EUCAST", ... ) diff --git a/tests/testthat/test-amr_selectors.R b/tests/testthat/test-amr_selectors.R index 289c58820..6f3ff771b 100644 --- a/tests/testthat/test-amr_selectors.R +++ b/tests/testthat/test-amr_selectors.R @@ -88,7 +88,7 @@ test_that("test-amr selectors.R", { expect_equal(nrow(example_isolates[any(carbapenems() != "R"), ]), 910, tolerance = 0.5) expect_equal(nrow(example_isolates[carbapenems() != "R", ]), 704, tolerance = 0.5) - # filter with multiple antibiotic selectors using c() + # filter with multiple antimicrobial selectors using c() expect_equal(nrow(example_isolates[all(c(carbapenems(), aminoglycosides()) == "R"), ]), 26, tolerance = 0.5) # filter + select in one go: get penicillins in carbapenems-resistant strains diff --git a/vignettes/AMR.Rmd b/vignettes/AMR.Rmd index 64adee225..53e57f6a0 100755 --- a/vignettes/AMR.Rmd +++ b/vignettes/AMR.Rmd @@ -220,9 +220,9 @@ our_data_1st %>% count(mo_name(bacteria), sort = TRUE) ``` -## Select and filter with antibiotic selectors +## Select and filter with antimicrobial selectors -Using so-called antibiotic class selectors, you can select or filter columns based on the antibiotic class that your antibiotic results are in: +Using so-called antimicrobial class selectors, you can select or filter columns based on the antimicrobial class that your antimicrobial results are in: ```{r bug_drg 2a} our_data_1st %>% @@ -234,7 +234,7 @@ our_data_1st %>% our_data_1st %>% select(bacteria, where(is.sir)) -# filtering using AB selectors is also possible: +# filtering using antimicrobial selectors is also possible: our_data_1st %>% filter(any(aminoglycosides() == "R"))