1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 18:41:58 +02:00

(v0.8.0.9005) fix unit tests

This commit is contained in:
2019-10-26 22:21:26 +02:00
parent d2e8249edd
commit 412077a6f2
15 changed files with 20 additions and 22 deletions

View File

@ -52,6 +52,7 @@ globalVariables(c(".",
"Last name",
"lookup",
"mdr",
"MDRO",
"median",
"microorganisms",
"microorganisms.codes",

View File

@ -461,7 +461,7 @@ mdro <- function(x,
left_join_microorganisms(by = col_mo) %>%
# add unconfirmed to where genus is available
mutate(MDRO = ifelse(!is.na(genus), 1, NA_integer_),
row_number = 1:nrow(x)) %>%
row_number = seq_len(nrow(x))) %>%
# transform to data.frame so subsetting is possible with x[y, z] (might not be the case with tibble/data.table/...)
as.data.frame(stringsAsFactors = FALSE)

2
R/mo.R
View File

@ -241,7 +241,6 @@ as.mo <- function(x, Becker = FALSE, Lancefield = FALSE, allow_uncertain = TRUE,
pull(mo)
# don't save valid fullnames to history (i.e. values that are in microorganisms$fullname)
# set_mo_history(x, y, 0, force = isTRUE(list(...)$force_mo_history), disable = isTRUE(list(...)$disable_mo_history))
} else {
# will be checked for mo class in validation and uses exec_as.mo internally if necessary
@ -636,7 +635,6 @@ exec_as.mo <- function(x,
x[i] <- found[1L]
if (initial_search == TRUE) {
# don't save valid fullnames to history (i.e. values that are in microorganisms$fullname)
# set_mo_history(x_backup[i], get_mo_code(x[i], property), 0, force = force_mo_history, disable = disable_mo_history)
}
next
}