1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-10 06:21:50 +02:00

(v2.1.1.9220) unit test

This commit is contained in:
2025-03-19 16:13:43 +01:00
parent 755e6f43b7
commit 79f56ad8a4
6 changed files with 6 additions and 6 deletions

2
R/ab.R
View File

@ -358,7 +358,7 @@ as.ab <- function(x, flag_multiple_results = TRUE, language = get_AMR_locale(),
FUN.VALUE = double(1),
ab_df$generalised_synonyms,
function(y) {
ifelse(length(y[nchar(y) >= 5]) == 0,
ifelse(all(is.na(y)) || length(y[nchar(y) >= 5]) == 0,
999,
min(as.double(utils::adist(x[i], y[nchar(y) >= 5],
ignore.case = FALSE,

View File

@ -955,7 +955,7 @@ any.amr_selector_any_all <- function(..., na.rm = FALSE) {
`+.amr_selector` <- function(e1, e2) {
# this is useful for `antibiogram()`: antibiogram(example_isolates, carbapenems() + c("", "GEN", "TOB"))
structure(as.character(outer(e1, e2, paste, sep = " + ")),
class = c("amr_selector", "character")
class = c("amr_selector", "character")
)
}

View File

@ -336,7 +336,7 @@
#' antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
#' mo_transform = "gramstain"
#' )
#'
#'
#' # you can use any antimicrobial selector with `+` too:
#' antibiogram(example_isolates,
#' antimicrobials = ureidopenicillins() + c("", "GEN", "tobra"),