diff --git a/DESCRIPTION b/DESCRIPTION index 9badbcd47..1c9b06c04 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 3.0.1.9031 +Version: 3.0.1.9032 Date: 2026-03-08 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index ebbfffc15..cd249636d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 3.0.1.9031 +# AMR 3.0.1.9032 ### New * Integration with the **tidymodels** framework to allow seamless use of SIR, MIC and disk data in modelling pipelines via `recipes` diff --git a/R/mdro.R b/R/mdro.R index a801b5c54..eef4d4ed3 100755 --- a/R/mdro.R +++ b/R/mdro.R @@ -506,7 +506,7 @@ mdro <- function(x = NULL, .new_col <- paste0(.base_code, ".inferred_sir_proxy_from#", paste0(.combos, collapse = "/"), "#") x[[.new_col]] <- ifelse(rowSums(.sir_chars == "R", na.rm = TRUE) > 0L, "R", NA_character_) cols_ab <- c(cols_ab, stats::setNames(.new_col, .base_code)) - if (info == TRUE) { + if (isTRUE(info.bak)) { message_( "Inferring resistance for ", ab_name(.base_code, language = NULL, tolower = TRUE), diff --git a/tests/testthat/test-zzz.R b/tests/testthat/test-zzz.R index a26ae3a43..b40e4fb92 100644 --- a/tests/testthat/test-zzz.R +++ b/tests/testthat/test-zzz.R @@ -178,9 +178,15 @@ test_that("test-zzz.R", { also_load = FALSE, min_version = if (pkg == "dplyr") "1.0.0" else NULL )) { - expect_true(!is.null(AMR:::import_fn(name = fn, pkg = pkg, error_on_fail = FALSE)), - info = paste0("Function does not exist (anymore): function `", pkg, "::", fn, "()`") - ) + if (pkg == "rstudioapi") { + expect_true(is.function(tryCatch(get(fn, envir = asNamespace(pkg)), error = function(e) NULL)), + info = paste0("Function does not exist (anymore): function `", pkg, "::", fn, "()`") + ) + } else { + expect_true(!is.null(AMR:::import_fn(name = fn, pkg = pkg, error_on_fail = FALSE)), + info = paste0("Function does not exist (anymore): function `", pkg, "::", fn, "()`") + ) + } } else if (pkg != "rstudioapi") { warning("Package '", pkg, "' not available") }