WHO update, antibiotics update

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2019-01-25 13:18:41 +01:00
1 parent 3ec44b6e0c
commit f4ff98b470
99 files changed
+1363 -737

No files matched your search

+5 -1
View File
@@ -707,7 +707,11 @@ exec_as.mo <- function(x, Becker = FALSE, Lancefield = FALSE,
if (n_distinct(failures) > 1) {
plural <- "s"
}
msg <- paste0("\n", n_distinct(failures), " unique value", plural, " could not be coerced to a valid MO code")
total_failures <- length(x_input[x_input %in% failures & !x_input %in% c(NA, NULL, NaN)])
total_n <- length(x_input[!x_input %in% c(NA, NULL, NaN)])
msg <- paste0("\n", n_distinct(failures), " unique value", plural,
" (^= ", percent(total_failures / total_n, round = 1, force_zero = TRUE),
") could not be coerced to a valid MO code")
if (n_distinct(failures) <= 10) {
msg <- paste0(msg, ": ", paste('"', unique(failures), '"', sep = "", collapse = ', '))
}