diff --git a/DESCRIPTION b/DESCRIPTION index 4160aff7..67af8cb5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 2.0.0.9039 -Date: 2023-07-11 +Version: 2.0.0.9040 +Date: 2023-07-12 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 6d752653..5e8a6f52 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 2.0.0.9039 +# AMR 2.0.0.9040 ## New * Clinical breakpoints and intrinsic resistance of EUCAST 2023 and CLSI 2023 have been added for `as.sir()`. EUCAST 2023 (v13.0) is now the new default guideline for all MIC and disks diffusion interpretations diff --git a/R/ab.R b/R/ab.R index 64be3a43..f23728ae 100755 --- a/R/ab.R +++ b/R/ab.R @@ -548,7 +548,7 @@ pillar_shaft.ab <- function(x, ...) { # add the names to the drugs as mouse-over! if (tryCatch(isTRUE(getExportedValue("ansi_has_hyperlink_support", ns = asNamespace("cli"))()), error = function(e) FALSE)) { - out[!is.na(x)] <- font_url(url = ab_name(x[!is.na(x)]), + out[!is.na(x)] <- font_url(url = paste0(x[!is.na(x)], ": ", ab_name(x[!is.na(x)])), txt = out[!is.na(x)]) } diff --git a/R/mo.R b/R/mo.R index c562e13c..59a18661 100755 --- a/R/mo.R +++ b/R/mo.R @@ -583,7 +583,7 @@ mo_cleaning_regex <- function() { # will be exported using s3_register() in R/zzz.R pillar_shaft.mo <- function(x, ...) { add_MO_lookup_to_AMR_env() - out <- format(x) + out <- trimws(format(x)) # grey out the kingdom (part until first "_") out[!is.na(x)] <- gsub("^([A-Z]+_)(.*)", paste0(font_subtle("\\1"), "\\2"), out[!is.na(x)], perl = TRUE) # and grey out every _ @@ -630,7 +630,8 @@ pillar_shaft.mo <- function(x, ...) { # add the names to the bugs as mouse-over! if (tryCatch(isTRUE(getExportedValue("ansi_has_hyperlink_support", ns = asNamespace("cli"))()), error = function(e) FALSE)) { - out[!x %in% c("UNKNOWN", NA)] <- font_url(url = mo_name(x[!x %in% c("UNKNOWN", NA)], keep_synonyms = TRUE), + out[!x %in% c("UNKNOWN", NA)] <- font_url(url = paste0(x[!x %in% c("UNKNOWN", NA)], ": ", + mo_name(x[!x %in% c("UNKNOWN", NA)], keep_synonyms = TRUE)), txt = out[!x %in% c("UNKNOWN", NA)]) }