mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 03:22:00 +02:00
new tibble export
This commit is contained in:
@ -429,10 +429,10 @@ ab_validate <- function(x, property, ...) {
|
||||
} else {
|
||||
# try to catch an error when inputting an invalid argument
|
||||
# so the 'call.' can be set to FALSE
|
||||
tryCatch(x[1L] %in% antibiotics[1, property],
|
||||
tryCatch(x[1L] %in% antibiotics[1, property, drop = TRUE],
|
||||
error = function(e) stop(e$message, call. = FALSE))
|
||||
|
||||
if (!all(x %in% AB_lookup[, property])) {
|
||||
if (!all(x %in% AB_lookup[, property, drop = TRUE])) {
|
||||
x <- as.ab(x, ...)
|
||||
x <- AB_lookup[match(x, AB_lookup$ab), property, drop = TRUE]
|
||||
}
|
||||
|
Reference in New Issue
Block a user