mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 22:41:52 +02:00
(v1.6.0.9041) filter_ab_class() fix
This commit is contained in:
@ -125,11 +125,11 @@ filter_ab_class <- function(x,
|
||||
group %like% ab_class |
|
||||
atc_group1 %like% ab_class |
|
||||
atc_group2 %like% ab_class)
|
||||
ab_group <- find_ab_group(ab_class)
|
||||
if (ab_group == "") {
|
||||
if (nrow(ab_reference) == 0) {
|
||||
message_("Unknown antimicrobial class '", ab_class.bak, "', data left unchanged.")
|
||||
return(x.bak)
|
||||
}
|
||||
ab_group <- find_ab_group(ab_class.bak)
|
||||
# get the columns with a group names in the chosen ab class
|
||||
agents <- ab_in_data[names(ab_in_data) %in% ab_reference$ab]
|
||||
if (length(agents) == 0) {
|
||||
|
@ -435,7 +435,7 @@ first_isolate <- function(x = NULL,
|
||||
if (length(c(row.start:row.end)) == pm_n_distinct(x[c(row.start:row.end), col_mo, drop = TRUE])) {
|
||||
if (info == TRUE) {
|
||||
message_("=> Found ", font_bold(paste(length(c(row.start:row.end)), "first isolates")),
|
||||
", as all isolates were different microorganisms",
|
||||
", as all isolates were different microbial species",
|
||||
add_fn = font_black,
|
||||
as_note = FALSE)
|
||||
}
|
||||
|
2
R/mdro.R
2
R/mdro.R
@ -306,7 +306,7 @@ mdro <- function(x = NULL,
|
||||
}
|
||||
if (is.null(col_mo) & guideline$code == "tb") {
|
||||
message_("No column found as input for `col_mo`, ",
|
||||
font_bold(paste0("assuming all records contain", font_italic("Mycobacterium tuberculosis"), ".")))
|
||||
font_bold(paste0("assuming all rows contain ", font_italic("Mycobacterium tuberculosis"), ".")))
|
||||
x$mo <- as.mo("Mycobacterium tuberculosis") # consider overkill at all times: MO_lookup[which(MO_lookup$fullname == "Mycobacterium tuberculosis"), "mo", drop = TRUE]
|
||||
col_mo <- "mo"
|
||||
}
|
||||
|
Reference in New Issue
Block a user