mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 04:20:53 +01:00
use dplyr where available, new antibiogram() for WISCA, fixed Salmonella Typhi/Paratyphi
This commit is contained in:
1 parent
4b133d4c96
commit
9e99e66f01
69 files changed
+1670
-650
No files matched your search
@@ -219,14 +219,14 @@ as.mic <- function(x, na.rm = FALSE) {
|
||||
## previously unempty values now empty - should return a warning later on
|
||||
x[x.bak != "" & x == ""] <- "invalid"
|
||||
|
||||
na_before <- x[is.na(x) | x == ""] %pm>% length()
|
||||
na_before <- x[is.na(x) | x == ""] %>% length()
|
||||
x[!x %in% valid_mic_levels] <- NA
|
||||
na_after <- x[is.na(x) | x == ""] %pm>% length()
|
||||
na_after <- x[is.na(x) | x == ""] %>% length()
|
||||
|
||||
if (na_before != na_after) {
|
||||
list_missing <- x.bak[is.na(x) & !is.na(x.bak) & x.bak != ""] %pm>%
|
||||
unique() %pm>%
|
||||
sort() %pm>%
|
||||
list_missing <- x.bak[is.na(x) & !is.na(x.bak) & x.bak != ""] %>%
|
||||
unique() %>%
|
||||
sort() %>%
|
||||
vector_and(quotes = TRUE)
|
||||
cur_col <- get_current_column()
|
||||
warning_("in `as.mic()`: ", na_after - na_before, " result",
|
||||
|
||||
Reference in new issue
Block a user