diff --git a/DESCRIPTION b/DESCRIPTION index 66844f443..1b57b68b4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 3.0.0.9028 +Version: 3.0.0.9029 Date: 2025-09-10 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index a7598d50b..5fe431bcc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 3.0.0.9028 +# 3.0.0.9029 This is a bugfix release following the release of v3.0.0 in June 2025. diff --git a/R/ab.R b/R/ab.R index c873935cb..c65bcdb97 100755 --- a/R/ab.R +++ b/R/ab.R @@ -203,7 +203,7 @@ as.ab <- function(x, flag_multiple_results = TRUE, language = get_AMR_locale(), progress <- progress_ticker(n = sum(!already_known), n_min = 25, print = info) # start if n >= 25 on.exit(close(progress)) if (any(x_new[!already_known & !is.na(x_new)] %in% unlist(AMR_env$AV_lookup$generalised_all, use.names = FALSE), na.rm = TRUE)) { - warning_("in `as.ab()`: some input seem to resemble antiviral drugs - use `as.av()` or e.g. `av_name()` for these, not `as.ab()` or e.g. `ab_name()`.") + warning_("in `as.ab()`: some input seems to resemble antiviral drugs - use `as.av()` or e.g. `av_name()` for these, not `as.ab()` or e.g. `ab_name()`.") } } diff --git a/tests/testthat/test-_misc.R b/tests/testthat/test-_misc.R index 25565ae08..024ae0518 100755 --- a/tests/testthat/test-_misc.R +++ b/tests/testthat/test-_misc.R @@ -70,14 +70,14 @@ test_that("test-misc.R", { } df <- example_isolates[, check_df("x")] - expect_true(is_right, info = "the environmental data cannot be found for base/x (1)") + expect_true(is_right, info = "the environmental data cannot be found for base `x`") - if (getRversion() < "4.0.0") { + # should work on R >=3.6.3 or so + df <- example_isolates[c(1:3), check_df("x")] + if (!is_right) { + # otherwise, this is needed for older versions df <- example_isolates[c(1:3), check_df("xx")] - expect_true(is_right, info = "the environmental data cannot be found for base/xx") - } else { - df <- example_isolates[c(1:3), check_df("x")] - expect_true(is_right, info = "the environmental data cannot be found for base/x (2)") + expect_true(is_right, info = "the environmental data cannot be found for base `x` or `xx`") } if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0", also_load = TRUE)) { diff --git a/vignettes/AMR_with_tidymodels.Rmd b/vignettes/AMR_with_tidymodels.Rmd index 938b97d7a..1f3fe87e1 100644 --- a/vignettes/AMR_with_tidymodels.Rmd +++ b/vignettes/AMR_with_tidymodels.Rmd @@ -225,148 +225,12 @@ This approach and idea formed the basis for the publication [DOI: 10.3389/fmicb. > > The new AMR package version will contain new tidymodels selectors such as `step_mic_log2()`. - + --- -## Example 3: Predicting AMR Over Time +## Example 2: Predicting AMR Over Time In this third example, we aim to predict antimicrobial resistance (AMR) trends over time using `tidymodels`. We will model resistance to three antibiotics (amoxicillin `AMX`, amoxicillin-clavulanic acid `AMC`, and ciprofloxacin `CIP`), based on historical data grouped by year and hospital ward.