From 33fb1849eb5aa6d33828e643c8f5047dd93447e3 Mon Sep 17 00:00:00 2001 From: Matthijs Berends Date: Fri, 19 Sep 2025 12:23:59 +0100 Subject: [PATCH] (v3.0.0.9036) Prepare for v3.0.1 --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- R/plotting.R | 12 ++++++++---- cran-comments.md | 2 ++ 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 57a0f635d..7eac5f687 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 3.0.0.9035 -Date: 2025-09-18 +Version: 3.0.0.9036 +Date: 2025-09-19 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) data analysis and to work with microbial and antimicrobial properties by diff --git a/NEWS.md b/NEWS.md index 918a9fadb..dec039d0a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 3.0.0.9035 +# AMR 3.0.0.9036 This is a bugfix release following the release of v3.0.0 in June 2025. diff --git a/R/plotting.R b/R/plotting.R index 3e2e1c195..f6cb0d606 100755 --- a/R/plotting.R +++ b/R/plotting.R @@ -284,10 +284,14 @@ create_scale_mic <- function(aest, keep_operators, mic_range = NULL, ...) { self$mic_values_levels[1] <- paste0("<=", self$mic_values_levels[1]) self$mic_values_levels[length(self$mic_values_levels)] <- paste0(">=", self$mic_values_levels[length(self$mic_values_levels)]) } - self$mic_values_log <- log2(as.double(self$mic_values_rescaled)) - if (aest == "y" && "group" %in% colnames(df) && "x" %in% colnames(df)) { - out$group <- as.integer(factor(df$x)) + + if (aest == "y" && "group" %in% colnames(df)) { + if (!"x" %in% colnames(df) || all(is.na(df$x))) { + out$group <- 1 + } else { + out$group <- as.integer(factor(df$x)) + } } out[[aest]] <- self$mic_values_log } @@ -329,7 +333,7 @@ create_scale_mic <- function(aest, keep_operators, mic_range = NULL, ...) { rng <- range(log2(as.mic(self$mic_values_levels))) # add 0.5 extra space rng <- c(rng[1] - 0.5, rng[2] + 0.5) - if (!is.na(x[1]) && x[1] == 0) { + if (!is.null(x) && !is.na(x[1]) && x[1] == 0) { # scale that start at 0 must remain so, e.g. in case of geom_col() rng[1] <- 0 } diff --git a/cran-comments.md b/cran-comments.md index 9c7b4dba8..82e0f4bfb 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,3 +1,5 @@ +This version is a bugfix release (v3.0.1) following the release of v3.0.0 in June 2025. + As with all previous >20 releases, some CHECKs on `oldrel` may return a `NOTE` for narrowly exceeding the installation size limit. This has been reduced to a minimum in prior coordination with CRAN maintainers and currently returns only an `INFO` on `release` and `devel`. We treat this as a high-impact package: it was published in the *Journal of Statistical Software* (2022), is listed in the CRAN Task View "Epidemiology", and (based on cranlogs download statistics) is used globally. If there is anything to address, we would appreciate being informed before archiving the current version. We conduct extensive automated unit testing and have no indication of unresolved issues.