1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 10:31:53 +02:00

speed improvement eucast_rules(), support more old MO codes

This commit is contained in:
2019-05-20 12:00:18 +02:00
parent b0033dae1b
commit 4ca00e1868
35 changed files with 590 additions and 683 deletions

View File

@ -56,15 +56,15 @@ guess_ab_col <- function(x = NULL, search_string = NULL, verbose = FALSE) {
if (is.null(x) & is.null(search_string)) {
return(as.name("guess_ab_col"))
}
if (!is.data.frame(x)) {
stop("`x` must be a data.frame")
}
if (length(search_string) > 1) {
warning("argument 'search_string' has length > 1 and only the first element will be used")
search_string <- search_string[1]
}
search_string <- as.character(search_string)
if (!is.data.frame(x)) {
stop("`x` must be a data.frame")
}
if (search_string %in% colnames(x)) {
ab_result <- search_string