From 74a172ef55f49a7f9721292e42b4ce3fd98871fc Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Fri, 28 Aug 2020 21:55:47 +0200 Subject: [PATCH] (v1.3.0.9010) S3 extensions without dependencies --- DESCRIPTION | 4 +- NAMESPACE | 10 --- NEWS.md | 11 +-- R/aa_helper_functions.R | 58 +++++++++++++++ R/ab.R | 18 ++--- R/disk.R | 12 +-- R/mic.R | 12 +-- R/mo.R | 69 +++++++++++------- R/rsi.R | 36 ++++++--- R/zzz.R | 61 +++------------- data-raw/antibiotics.dta | Bin 329492 -> 329492 bytes data-raw/antibiotics.sas | Bin 1880064 -> 1880064 bytes data-raw/antibiotics.sav | Bin 1406605 -> 1406605 bytes data-raw/antibiotics.xlsx | Bin 66083 -> 66083 bytes data-raw/antivirals.dta | Bin 68841 -> 68841 bytes data-raw/antivirals.sas | Bin 81920 -> 81920 bytes data-raw/antivirals.sav | Bin 69306 -> 69306 bytes data-raw/antivirals.xlsx | Bin 13935 -> 13935 bytes data-raw/intrinsic_resistant.dta | Bin 3909333 -> 3909333 bytes data-raw/intrinsic_resistant.sas | Bin 3985408 -> 3985408 bytes data-raw/intrinsic_resistant.sav | Bin 4353410 -> 4353410 bytes data-raw/intrinsic_resistant.xlsx | Bin 524510 -> 524510 bytes data-raw/microorganisms.dta | Bin 26468289 -> 26468289 bytes data-raw/microorganisms.old.dta | Bin 1896607 -> 1896607 bytes data-raw/microorganisms.old.sas | Bin 1941504 -> 1941504 bytes data-raw/microorganisms.old.sav | Bin 2034367 -> 2034367 bytes data-raw/microorganisms.old.xlsx | Bin 453024 -> 453024 bytes data-raw/microorganisms.sas | Bin 27521024 -> 27521024 bytes data-raw/microorganisms.sav | Bin 29548953 -> 29548953 bytes data-raw/microorganisms.xlsx | Bin 6401595 -> 6401596 bytes data-raw/rsi_translation.dta | Bin 3121505 -> 3121505 bytes data-raw/rsi_translation.sas | Bin 3334144 -> 3334144 bytes data-raw/rsi_translation.sav | Bin 3582161 -> 3582161 bytes data-raw/rsi_translation.xlsx | Bin 656226 -> 656226 bytes docs/404.html | 2 +- docs/LICENSE-text.html | 2 +- docs/articles/index.html | 2 +- docs/authors.html | 2 +- docs/index.html | 2 +- docs/news/index.html | 19 ++--- docs/pkgdown.yml | 2 +- .../reference/antibiotic_class_selectors.html | 2 +- docs/reference/as.mo.html | 2 +- docs/reference/bug_drug_combinations.html | 2 +- docs/reference/eucast_rules.html | 2 +- docs/reference/index.html | 2 +- docs/reference/microorganisms.codes.html | 2 +- docs/survey.html | 2 +- tests/testthat/test-import_fn.R | 47 ++++++++++++ 49 files changed, 227 insertions(+), 156 deletions(-) create mode 100644 tests/testthat/test-import_fn.R diff --git a/DESCRIPTION b/DESCRIPTION index bf4c251ad..93a620041 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 1.3.0.9009 -Date: 2020-08-26 +Version: 1.3.0.9010 +Date: 2020-08-28 Title: Antimicrobial Resistance Analysis Authors@R: c( person(role = c("aut", "cre"), diff --git a/NAMESPACE b/NAMESPACE index 967d8a920..d189314fa 100755 --- a/NAMESPACE +++ b/NAMESPACE @@ -40,11 +40,6 @@ S3method(format,bug_drug_combinations) S3method(kurtosis,data.frame) S3method(kurtosis,default) S3method(kurtosis,matrix) -S3method(pillar_shaft,ab) -S3method(pillar_shaft,disk) -S3method(pillar_shaft,mic) -S3method(pillar_shaft,mo) -S3method(pillar_shaft,rsi) S3method(plot,mic) S3method(plot,resistance_predict) S3method(plot,rsi) @@ -63,11 +58,6 @@ S3method(skewness,matrix) S3method(summary,mic) S3method(summary,mo) S3method(summary,rsi) -S3method(type_sum,ab) -S3method(type_sum,disk) -S3method(type_sum,mic) -S3method(type_sum,mo) -S3method(type_sum,rsi) export("%like%") export("%like_case%") export(ab_atc) diff --git a/NEWS.md b/NEWS.md index 9325353b8..5beff68ad 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,8 @@ -# AMR 1.3.0.9009 -## Last updated: 26 August 2020 +# AMR 1.3.0.9010 +## Last updated: 28 August 2020 ### New +* A new vignette and website page with info about all our public and freely available data sets, that can be downloaded as flat files or in formats for use in R, SPSS, SAS, Stata and Excel: https://msberends.github.io/AMR/articles/datasets.html * Data set `intrinsic_resistant`. This data set contains all bug-drug combinations where the 'bug' is intrinsic resistant to the 'drug' according to the latest EUCAST insights. It contains just two columns: `microorganism` and `antibiotic`. Curious about which enterococci are actually intrinsic resistant to vancomycin? @@ -38,7 +39,7 @@ * Overall speed improvement by tweaking joining functions * Function `mo_shortname()` now returns the genus for input where the species is unknown * BORSA is now recognised as an abbreviation for *Staphylococcus aureus*, meaning that e.g. `mo_genus("BORSA")` will return "Staphylococcus" -* Support for coloured `tibble` printing of classes `ab`, `mo`, `rsi`, `mic` and `disk` +* Added a feature from AMR 1.1.0 and earlier again, but now without other package dependencies: `tibble` printing support for classes ``, ``, ``, `` and ``. When using `tibble`s containing antimicrobial columns (class ``), "S" will print in green, "I" will print in yellow and "R" will print in red. Microbial IDs (class ``) will emphasise on the genus and species, not on the kingdom. # AMR 1.3.0 @@ -102,8 +103,8 @@ Negative effects of this change are: * Function `freq()` that was borrowed from the `cleaner` package was removed. Use `cleaner::freq()`, or run `library("cleaner")` before you use `freq()`. - * Printing values of class `mo` or `rsi` in a tibble will no longer be in colour and printing `rsi` in a tibble will show the class ``, not `` anymore. This is purely a visual effect. - * All functions from the `mo_*` family (like `mo_name()` and `mo_gramstain()`) are noticeably slower when running on hundreds of thousands of rows. + * ~~Printing values of class `mo` or `rsi` in a tibble will no longer be in colour and printing `rsi` in a tibble will show the class ``, not `` anymore. This is purely a visual effect.~~ + * ~~All functions from the `mo_*` family (like `mo_name()` and `mo_gramstain()`) are noticeably slower when running on hundreds of thousands of rows.~~ * For developers: classes `mo` and `ab` now both also inherit class `character`, to support any data transformation. This change invalidates code that checks for class length == 1. ### Changed diff --git a/R/aa_helper_functions.R b/R/aa_helper_functions.R index 9c00ce8c2..d163e286a 100755 --- a/R/aa_helper_functions.R +++ b/R/aa_helper_functions.R @@ -444,6 +444,9 @@ font_red_bg <- function(..., collapse = " ") { font_yellow_bg <- function(..., collapse = " ") { try_colour(..., before = "\033[43m", after = "\033[49m", collapse = collapse) } +font_na <- function(..., collapse = " ") { + font_red(..., collapse = collapse) +} font_bold <- function(..., collapse = " ") { try_colour(..., before = "\033[1m", after = "\033[22m", collapse = collapse) } @@ -477,6 +480,61 @@ progress_estimated <- function(n = 1, n_min = 0, ...) { } } +create_pillar_column <- function(x, ...) { + new_pillar_shaft_simple <- import_fn("new_pillar_shaft_simple", "pillar", error_on_fail = FALSE) + if (!is.null(new_pillar_shaft_simple)) { + new_pillar_shaft_simple(x, ...) + } else { + # does not exist in package 'pillar' anymore + structure(list(x), + class = "pillar_shaft_simple", + ...) + } +} + +# copied from vctrs::s3_register by their permission +s3_register <- function(generic, class, method = NULL) { + stopifnot(is.character(generic), length(generic) == 1) + stopifnot(is.character(class), length(class) == 1) + pieces <- strsplit(generic, "::")[[1]] + stopifnot(length(pieces) == 2) + package <- pieces[[1]] + generic <- pieces[[2]] + caller <- parent.frame() + get_method_env <- function() { + top <- topenv(caller) + if (isNamespace(top)) { + asNamespace(environmentName(top)) + } + else { + caller + } + } + get_method <- function(method, env) { + if (is.null(method)) { + get(paste0(generic, ".", class), envir = get_method_env()) + } + else { + method + } + } + method_fn <- get_method(method) + stopifnot(is.function(method_fn)) + setHook(packageEvent(package, "onLoad"), function(...) { + ns <- asNamespace(package) + method_fn <- get_method(method) + registerS3method(generic, class, method_fn, envir = ns) + }) + if (!isNamespaceLoaded(package)) { + return(invisible()) + } + envir <- asNamespace(package) + if (exists(generic, envir)) { + registerS3method(generic, class, method_fn, envir = envir) + } + invisible() +} + # works exactly like round(), but rounds `round2(44.55, 1)` to 44.6 instead of 44.5 # and adds decimal zeroes until `digits` is reached when force_zero = TRUE round2 <- function(x, digits = 0, force_zero = TRUE) { diff --git a/R/ab.R b/R/ab.R index 52469f9ed..93220bf27 100755 --- a/R/ab.R +++ b/R/ab.R @@ -467,22 +467,14 @@ is.ab <- function(x) { inherits(x, "ab") } - -#' @method pillar_shaft ab -#' @export +# will be exported using s3_register() in R/zzz.R pillar_shaft.ab <- function(x, ...) { - # import from the pillar package, without being dependent on it! - style_na <- import_fn("style_na", "pillar", error_on_fail = FALSE) - new_pillar_shaft_simple <- import_fn("new_pillar_shaft_simple", "pillar", error_on_fail = FALSE) - out <- format(x) - out[is.na(x)] <- style_na(NA) - new_pillar_shaft_simple(out, - align = "left", - min_width = 4) + out <- trimws(format(x)) + out[is.na(x)] <- font_na(NA) + create_pillar_column(out, align = "left", min_width = 4) } -#' @method type_sum ab -#' @export +# will be exported using s3_register() in R/zzz.R type_sum.ab <- function(x, ...) { "ab" } diff --git a/R/disk.R b/R/disk.R index fadbabcea..50f331f5a 100644 --- a/R/disk.R +++ b/R/disk.R @@ -114,18 +114,14 @@ is.disk <- function(x) { inherits(x, "disk") } -#' @method pillar_shaft disk -#' @export +# will be exported using s3_register() in R/zzz.R pillar_shaft.disk <- function(x, ...) { - style_na <- import_fn("style_na", "pillar", error_on_fail = FALSE) - new_pillar_shaft_simple <- import_fn("new_pillar_shaft_simple", "pillar", error_on_fail = FALSE) out <- trimws(format(x)) - out[is.na(x)] <- style_na(NA) - new_pillar_shaft_simple(out, align = "right", min_width = 3) + out[is.na(x)] <- font_na(NA) + create_pillar_column(out, align = "right", width = 2) } -#' @method type_sum disk -#' @export +# will be exported using s3_register() in R/zzz.R type_sum.disk <- function(x, ...) { "disk" } diff --git a/R/mic.R b/R/mic.R index daa796354..1118c5e58 100755 --- a/R/mic.R +++ b/R/mic.R @@ -171,18 +171,14 @@ droplevels.mic <- function(x, exclude = ifelse(anyNA(levels(x)), NULL, NA), ...) x } -#' @method pillar_shaft mic -#' @export +# will be exported using s3_register() in R/zzz.R pillar_shaft.mic <- function(x, ...) { - style_na <- import_fn("style_na", "pillar", error_on_fail = FALSE) - new_pillar_shaft_simple <- import_fn("new_pillar_shaft_simple", "pillar", error_on_fail = FALSE) out <- trimws(format(x)) - out[is.na(x)] <- style_na(NA) - new_pillar_shaft_simple(out, align = "right", min_width = 4) + out[is.na(x)] <- font_na(NA) + create_pillar_column(out, align = "right", min_width = 4) } -#' @method type_sum mic -#' @export +# will be exported using s3_register() in R/zzz.R type_sum.mic <- function(x, ...) { "mic" } diff --git a/R/mo.R b/R/mo.R index 0a0486548..3af0e7055 100755 --- a/R/mo.R +++ b/R/mo.R @@ -181,7 +181,7 @@ as.mo <- function(x, x <- parse_and_convert(x) # replace mo codes used in older package versions x <- replace_old_mo_codes(x, property = "mo") - + # WHONET: xxx = no growth x[tolower(as.character(paste0(x, ""))) %in% c("", "xxx", "na", "nan")] <- NA_character_ # Laboratory systems: remove entries like "no growth" etc @@ -384,7 +384,7 @@ exec_as.mo <- function(x, x <- data.frame(fullname = x, stringsAsFactors = FALSE) %>% left_join_MO_lookup(by = "fullname") %>% pull(property) - + } else if (all(toupper(x) %in% microorganisms.codes$code)) { # commonly used MO codes x <- data.frame(code = toupper(x), stringsAsFactors = FALSE) %>% @@ -1526,41 +1526,54 @@ format_uncertainty_as_df <- function(uncertainty_level, df } -#' @method pillar_shaft mo -#' @export +# will be exported using s3_register() in R/zzz.R pillar_shaft.mo <- function(x, ...) { - # import from the pillar package, without being dependent on it! - style_na <- import_fn("style_na", "pillar", error_on_fail = FALSE) - style_subtle <- import_fn("style_subtle", "pillar", error_on_fail = FALSE) - new_pillar_shaft_simple <- import_fn("new_pillar_shaft_simple", "pillar", error_on_fail = FALSE) - if (is.null(style_na) | is.null(style_subtle) | is.null(new_pillar_shaft_simple)) { - return(x) - } - out <- format(x) # grey out the kingdom (part until first "_") - out[!is.na(x)] <- gsub("^([A-Z]+_)(.*)", paste0(style_subtle("\\1"), "\\2"), out[!is.na(x)]) + out[!is.na(x)] <- gsub("^([A-Z]+_)(.*)", paste0(font_subtle("\\1"), "\\2"), out[!is.na(x)]) # and grey out every _ - out[!is.na(x)] <- gsub("_", style_subtle("_"), out[!is.na(x)]) + out[!is.na(x)] <- gsub("_", font_subtle("_"), out[!is.na(x)]) # markup NA and UNKNOWN - out[is.na(x)] <- style_na(" NA") - out[x == "UNKNOWN"] <- style_na(" UNKNOWN") + out[is.na(x)] <- font_na(" NA") + out[x == "UNKNOWN"] <- font_na(" UNKNOWN") # make it always fit exactly - new_pillar_shaft_simple(out, - align = "left", - width = max(nchar(x)) + ifelse(length(x[x %in% c(NA, "UNKNOWN")]) > 0, - 2, - 0)) + create_pillar_column(out, + align = "left", + width = max(nchar(x)) + ifelse(any(x %in% c(NA, "UNKNOWN")), 2, 0)) } -#' @method type_sum mo -#' @export +# will be exported using s3_register() in R/zzz.R type_sum.mo <- function(x, ...) { "mo" } +# will be exported using s3_register() in R/zzz.R +freq.mo <- function(x, ...) { + x_noNA <- as.mo(x[!is.na(x)]) # as.mo() to get the newest mo codes + grams <- mo_gramstain(x_noNA, language = NULL) + digits <- list(...)$digits + if (is.null(digits)) { + digits <- 2 + } + freq.default <- import_fn("freq.default", "cleaner", error_on_fail = FALSE) + freq.default(x = x, ..., + .add_header = list(`Gram-negative` = paste0(format(sum(grams == "Gram-negative", na.rm = TRUE), + big.mark = ",", + decimal.mark = "."), + " (", percentage(sum(grams == "Gram-negative", na.rm = TRUE) / length(grams), digits = digits), + ")"), + `Gram-positive` = paste0(format(sum(grams == "Gram-positive", na.rm = TRUE), + big.mark = ",", + decimal.mark = "."), + " (", percentage(sum(grams == "Gram-positive", na.rm = TRUE) / length(grams), digits = digits), + ")"), + `No. of genera` = n_distinct(mo_genus(x_noNA, language = NULL)), + `No. of species` = n_distinct(paste(mo_genus(x_noNA, language = NULL), + mo_species(x_noNA, language = NULL))))) +} + #' @method print mo #' @export #' @noRd @@ -1584,11 +1597,11 @@ summary.mo <- function(object, ...) { top <- as.data.frame(table(x), responseName = "n", stringsAsFactors = FALSE) top_3 <- top[order(-top$n), 1][1:3] value <- c("Class" = "mo", - "" = length(x[is.na(x)]), - "Unique" = n_distinct(x[!is.na(x)]), - "#1" = top_3[1], - "#2" = top_3[2], - "#3" = top_3[3]) + "" = length(x[is.na(x)]), + "Unique" = n_distinct(x[!is.na(x)]), + "#1" = top_3[1], + "#2" = top_3[2], + "#3" = top_3[3]) class(value) <- c("summaryDefault", "table") value } diff --git a/R/rsi.R b/R/rsi.R index 5af30b38f..2698a445e 100755 --- a/R/rsi.R +++ b/R/rsi.R @@ -670,24 +670,42 @@ exec_as.rsi <- function(method, class = c("rsi", "ordered", "factor")) } -#' @method pillar_shaft rsi -#' @export +# will be exported using s3_register() in R/zzz.R pillar_shaft.rsi <- function(x, ...) { out <- trimws(format(x)) out[is.na(x)] <- font_grey(" NA") - out[x == "S"] <- font_green_bg(font_white(" S ")) - out[x == "I"] <- font_yellow_bg(font_black(" I ")) - out[x == "R"] <- font_red_bg(font_white(" R ")) - new_pillar_shaft_simple <- import_fn("new_pillar_shaft_simple", "pillar", error_on_fail = FALSE) - new_pillar_shaft_simple(out, align = "left", width = 3) + out[x == "S"] <- font_green_bg(font_white(" S ")) + out[x == "I"] <- font_yellow_bg(font_black(" I ")) + out[x == "R"] <- font_red_bg(font_white(" R ")) + create_pillar_column(out, align = "left", width = 5) } -#' @method type_sum rsi -#' @export +# will be exported using s3_register() in R/zzz.R type_sum.rsi <- function(x, ...) { "rsi" } +# will be exported using s3_register() in R/zzz.R +freq.rsi <- function(x, ...) { + x_name <- deparse(substitute(x)) + x_name <- gsub(".*[$]", "", x_name) + ab <- suppressMessages(suppressWarnings(as.ab(x_name))) + freq.default <- import_fn("freq.default", "cleaner", error_on_fail = FALSE) + digits <- list(...)$digits + if (is.null(digits)) { + digits <- 2 + } + if (!is.na(ab)) { + freq.default(x = x, ..., + .add_header = list(Drug = paste0(ab_name(ab, language = NULL), " (", ab, ", ", ab_atc(ab), ")"), + `Drug group` = ab_group(ab, language = NULL), + `%SI` = percentage(susceptibility(x, minimum = 0, as_percent = FALSE), digits = digits))) + } else { + freq.default(x = x, ..., + .add_header = list(`%SI` = percentage(susceptibility(x, minimum = 0, as_percent = FALSE), digits = digits))) + } +} + #' @method print rsi #' @export #' @noRd diff --git a/R/zzz.R b/R/zzz.R index 1e0738015..49375558f 100755 --- a/R/zzz.R +++ b/R/zzz.R @@ -29,6 +29,7 @@ envir = asNamespace("AMR")) # support for tibble headers (type_sum) and tibble columns content (pillar_shaft) + # without the need to depend on other packages s3_register("pillar::pillar_shaft", "ab") s3_register("tibble::type_sum", "ab") s3_register("pillar::pillar_shaft", "mo") @@ -39,9 +40,10 @@ s3_register("tibble::type_sum", "mic") s3_register("pillar::pillar_shaft", "disk") s3_register("tibble::type_sum", "disk") + # support for frequency tables + s3_register("cleaner::freq", "mo") + s3_register("cleaner::freq", "rsi") } -pillar_shaft <- import_fn("pillar_shaft", "pillar", error_on_fail = FALSE) -type_sum <- import_fn("type_sum", "tibble", error_on_fail = FALSE) .onAttach <- function(...) { if (!interactive() || stats::runif(1) > 0.1 || isTRUE(as.logical(Sys.getenv("AMR_silentstart", FALSE)))) { @@ -66,9 +68,9 @@ create_MO_lookup <- function() { MO_lookup$fullname_lower <- tolower(trimws(paste(MO_lookup$genus, MO_lookup$species, MO_lookup$subspecies))) - MO_lookup[MO_lookup$genus == "" | grepl("^[(]unknown ", MO_lookup$fullname), "fullname_lower"] <- tolower(trimws(MO_lookup[MO_lookup$genus == "" | grepl("^[(]unknown ", MO_lookup$fullname), - "fullname"])) - MO_lookup$fullname_lower <- gsub("[^.a-z0-9/ \\-]+", "", MO_lookup$fullname_lower) + ind <- MO_lookup$genus == "" | grepl("^[(]unknown ", MO_lookup$fullname) + MO_lookup[ind, "fullname_lower"] <- tolower(MO_lookup[ind, "fullname"]) + MO_lookup$fullname_lower <- trimws(gsub("[^.a-z0-9/ \\-]+", "", MO_lookup$fullname_lower)) # add a column with only "e coli" like combinations MO_lookup$g_species <- gsub("^([a-z])[a-z]+ ([a-z]+) ?.*", "\\1 \\2", MO_lookup$fullname_lower) @@ -79,54 +81,11 @@ create_MO_lookup <- function() { create_MO.old_lookup <- function() { MO.old_lookup <- AMR::microorganisms.old - MO.old_lookup$fullname_lower <- gsub("[^.a-z0-9/ \\-]+", "", tolower(trimws(MO.old_lookup$fullname))) + MO.old_lookup$fullname_lower <- trimws(gsub("[^.a-z0-9/ \\-]+", "", tolower(trimws(MO.old_lookup$fullname)))) - # add a column with only "e coli" like combinations - MO.old_lookup$g_species <- gsub("^([a-z])[a-z]+ ([a-z]+) ?.*", "\\1 \\2", MO.old_lookup$fullname_lower) + # add a column with only "e coli"-like combinations + MO.old_lookup$g_species <- trimws(gsub("^([a-z])[a-z]+ ([a-z]+) ?.*", "\\1 \\2", MO.old_lookup$fullname_lower)) # so arrange data on prevalence first, then full name MO.old_lookup[order(MO.old_lookup$prevalence, MO.old_lookup$fullname_lower), ] } - -# copied from vctrs::s3_register -s3_register <- function(generic, class, method = NULL) { - stopifnot(is.character(generic), length(generic) == 1) - stopifnot(is.character(class), length(class) == 1) - pieces <- strsplit(generic, "::")[[1]] - stopifnot(length(pieces) == 2) - package <- pieces[[1]] - generic <- pieces[[2]] - caller <- parent.frame() - get_method_env <- function() { - top <- topenv(caller) - if (isNamespace(top)) { - asNamespace(environmentName(top)) - } - else { - caller - } - } - get_method <- function(method, env) { - if (is.null(method)) { - get(paste0(generic, ".", class), envir = get_method_env()) - } - else { - method - } - } - method_fn <- get_method(method) - stopifnot(is.function(method_fn)) - setHook(packageEvent(package, "onLoad"), function(...) { - ns <- asNamespace(package) - method_fn <- get_method(method) - registerS3method(generic, class, method_fn, envir = ns) - }) - if (!isNamespaceLoaded(package)) { - return(invisible()) - } - envir <- asNamespace(package) - if (exists(generic, envir)) { - registerS3method(generic, class, method_fn, envir = envir) - } - invisible() -} diff --git a/data-raw/antibiotics.dta b/data-raw/antibiotics.dta index 65a39711871f618225c8d0d4a87027cd72b445ce..e945d313e80446958b6bdcee055c82810dbd0fee 100644 GIT binary patch delta 44 zcmbQzCo-i^WJ0BYg@R*gx`L5`k%5Adp_QpgV`pn8V{0cDY(hDL(>k;yNf^d>-PvD u{C|oQoZ<}UxWEXPxWYAVFvbK^%rM6Sx46SSmUzG;p74wpyyC6*UVTRugD&;} delta 108 zcmWN?yA6U+06@{FC?JU755LQ>fWt5W7Pof*drOm>xD6zXf~Ps%*mh(4`sBl#z6l}x te~L4lV}uJ_VvGrJYtO}JmUqgc>8&Od?$5%FZuug diff --git a/data-raw/antibiotics.sav b/data-raw/antibiotics.sav index 9ed8bad5fb46c090671629a0feff2b4fa086636f..4e750fe4b3e8591e1d7a8d05fc13fd8f0c31dfcc 100644 GIT binary patch delta 97 zcmV~$yA6U+06@_o{_u+;J#HW`niyVkRB{ diff --git a/data-raw/antibiotics.xlsx b/data-raw/antibiotics.xlsx index 744fbc7b40274e186f241515414eddc49aa42b29..9c2bfa2ef3a95bbca5037e485aa5a2ec3ce789ff 100644 GIT binary patch delta 468 zcmZ47!m_x9g*U*PnMH(wgM)+N*gBbwyvmHsKzg$=;|efi@;#;(Ac4sznGNcLB^SPR zNcHDq(eBDu-1)lcto)>m>-qV&GD|nO%jcilxxf0vN;CJn>GK~nZ(8QIL?e*REn=ll z_~Pefv)2cTDVb0De$AoRjU(f7$f2r=FV`CTxtyjcs9kv>usB(Qy^!Io^Td?NQ}%wH zb=>3^pS9k-O76`;-l@ zwcTFaF8P#GZ&ehQ@tHNio1NoZ1zUq4BLjm369WTEkZhJ@)q;eH8(SxYafy9ZD>#(u zdtX9Cvitj4!6JXB_(4Scrs+Z$b<<1J!6EqVpBb3e|8EDT3;tVk07EtqWb@?B|INXI vZ~wc3=&7cRL14Oz(H=~nVYC3z)7cpr!Mdk=Ffv+!MOqmd{lJWCjEuej$4tY* delta 468 zcmZ47!m_x9g*U*PnMH(wgM))%R-@ELUS&pRAidd`aRrz$`5w~?kig`V%m(#`4V`W` zo|-4a5hilqspvZEY+av%a`{z4zumn##r5AO1n2tiI&XK7J=M3@BXAK<&xW9x z>)g)2)w{ny$0bkY{n|#UUV#hSRp0D**tmke{-_v((k%C diff --git a/data-raw/antivirals.dta b/data-raw/antivirals.dta index adfb02c639f7efa60f5e8725ed2e45a6d46a5d0f..218c46d6ff16df9074d2d4472833d46746de6655 100644 GIT binary patch delta 32 ncmaDkljY@1mI;*t77C7~=?X>$Mg|H-hE}E~jh$ON854K_ywD0- delta 32 ncmaDkljY@1mI;*tW(tm_=?X>$Mg|IoW>$tqjh$ON854K_yqOAC diff --git a/data-raw/antivirals.sas b/data-raw/antivirals.sas index e6dab17da948d945bef0c0d349952c0903d20fbe..6ad865b28ce01c9c71a7d3dcdcd3a9b84c58b76f 100644 GIT binary patch delta 27 hcmZo@U~On%ov@sHZe-gXM+OE4Aln27&djOKn3W@*# delta 27 hcmZo@U~On%ov@ty?wr;;jtmS8K)P|$)=i9l_5h%R3yuH) diff --git a/data-raw/antivirals.sav b/data-raw/antivirals.sav index 5a96ebca151065cb0c5a47dc56d2c666b95c30ea..a5d07a1c3164fa595d065f55eb4f21e37af8f53c 100644 GIT binary patch delta 36 scmdlrmu1&nmI<)}77C7~=?X>$Mut|VCRT<$hGtfVMpmXqlNALW8rN=J%gD4jLblKvoYfeFk|vPrWYWA$tRf&>VqX0zI90T z=VQ_C%2(X^y6LR^q>StN`L{AlH@M5^pWC^=`ou~z_q*xyA2e@T=C(v5kj*V(rBC?c z=Vi0k2Z||~Px^k%q1TNg<8sKMs){ey8vD7NrYWdhc_FYkS%STg;jHt-l*v=}ew}sP zz0bTWTb!HGIslv4X?G` zUfeGElv8h26qfOsHNcyl<68w=gCHXVg9H-;14@u=mSoj}goztlCxmf{-GCn)O0429 zAtE0o`dPsu&2oMakt_1L5C)5)wGcQ2os7-EbhWV^nBHS-%>fMAK#^@k0eZa1Eq zC&LjYa^I=wI_qqEm5b}{-`jHeRYJery*b78-zNm;`tLe#caS~Rx7Q1IfD$B|C0Vr~VdBQt31M7fH{b_{607)2 zh{#8YepawZvz#A9aQwuO1Yzoml#ncMSzi8?Qrj^Wm0dq#PPXGV_ diff --git a/data-raw/intrinsic_resistant.dta b/data-raw/intrinsic_resistant.dta index 41548e7946b986c2a9c6f2f39c05473773172c9e..a8f1af78f623f4b52d094faa97d3f7357e0f4548 100644 GIT binary patch delta 208 zcmWN=yH&yf06@`$p!`IFs3b)0FF*0u-R?xuE;2V51t7r$7VQ3qzq3${Nc=$~n z|L-=XBv^f~gE)-CAW9ZdycJWJ#uGfn3}*2R&+!6tn8yNMViB*fgx7e3WvpNoZ?T4V zSjPt5V-s80#s>_rgI(<5BR=6X_Hlqi9N`!z_=2zah9O26<2z1qh6&E`13z)Gclq`6 E2QQvc2LJ#7 diff --git a/data-raw/intrinsic_resistant.sas b/data-raw/intrinsic_resistant.sas index 0e1782e188339f15082cfc2225d59af7d60f675c..f340dbd92bdc1ce9e49238fdab0266ac0b8feb71 100644 GIT binary patch delta 207 zcmWl~OICpa0Dw_{NhOaYRPrc<@+x{z12)jS-DvO`+kkT#S-^LWb=ZJi*Z>XgxzoRG zFx{IkW8=loY%>Xk{{IyNJitQ?;}J&i7*FsNqj-ifjAH_mc#bK&z%*WB2D6yME4;=V z%;PN#ux140AKM9-|+*7IKt1BU*GE; D#6et& delta 207 zcmWl~OEy9Q0D$3p6@^ksBE6_o^e#PQVguH64gR?WG%#ub|2fvt23SQKz~DPy^tlhC zKOfsv@U!9jH37sk1&BrJjN3|#T2IT3^SO;9G+tyFR*}@Si~#5#uDCO z87o-D8rJa^@34VQY~ek&v4dTFz(?$19|t(Z5sq#U!p_3fFN1H*pKMF^w7A!ClN^4)eH& z`&hsOJj5eB#uGfnBA#Ih&oRIYyu>nIVFjyL!#Xzb8k=~7w|Iy5*uoGaY-0zz_<)bt V!#>71z#)!sj1zpq>9@~6uYc+rWa0n- delta 235 zcmWN=%QgZ50D$2mgCvxDB~2Ii&vPb@SXEbey5qq z|L7fEirG0GDtXS1^mKn8P*9<2r8OCKj-WTeyuo zxQlzZj|W)7GFI>qt9XPp46%+4Y+?(K@dQut4A1cbFR_hRc#SvM!3bl##XIa`g7^4< VkC@^U_V5{B@D=+wnEUoK`UB}PWZ?h+ diff --git a/data-raw/intrinsic_resistant.xlsx b/data-raw/intrinsic_resistant.xlsx index 4a428bce6c6308fefdc382f8e6a6d8e1d1ad9d45..609e1aa8d44bed710c259b404b24471aeaa56110 100644 GIT binary patch delta 558 zcmccDsBo`Qfj7XLnMH(wgM)+N*gBbwyvmHsKzg$=;|efi@;#;(Ac4sznN{k~dL1zk zX^mf+a(`K7s8@#d0wZm97VWOx6YjiZnJqslV|jl5t&6V?=)~TeQ@p?W#7c8_QVNWv3Cu`nd^mI3Ezx#An^SN1E3?K={C1d^ z+o6DmS>wXN+sX?$~y$o;~m7ftnjfnZ5}fc`NdjJOBPgziNd^5)Ex9kJZ&pnf~eBzT1noo#?hX zyL!utU3yIyUTb@u+Wzy&&3`pd)?E0;9pKH*@iPA#gCHXVg9H-;14>wKmSoj}1g0BX zCxmf{-TMwWcom+!goyAw>t_Xv%zNzz5qbYc7tCmuf7dSmjuD8NfS4JGS%8=oh}pKw zzhm#`2WgwW@h`g>nDOc_yB(OJ{g2(611J>;a@h2|f9&R9;T8YbUBQeG|JZ}T4A=kc g_FzW)e|8Hn`#tUv-&9XR~J^h6F{0FY?-ng9R* delta 558 zcmccDsBo`Qfj7XLnMH(wgM))%R-@ELUS&pRAidd`aRrz$`5w~?kig`V%qsQq-iHlD zj_&t5Sv_0ru%XlK##8fTIKo8kI~84Loo%mjaozoUTQ0v!=(oE!r?~$6gy3BNUFYo% zvZwm?dIT=w>Ddr8bDi7yw|e&%=(yymykFZW)hlpe+sc-&A6~3wmKSZ&ar9Yn(a`O< z0pBBzS?x+E)il{(oAzgZku8ha^O?^;xBj&0HG!Q^CO+<*wwty6oQ>L@{mM%tCcHcR z-PnPP$2P;jFd<0b&+Fa?r8{;RXm@`Wx$;P=ZJ|WiW_?wqAEp04n6#gtI@2zQAxleh z#)kuozxuZR=R34XMPZ zxn=Bjy_B;YspemDttvO#%kI?J@{=jRo1J6M>g;MkMg|56CI$wSu-q)kss#y5H?~d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V42R*ZsI1b0-1e}PIa57H8sW=U%;|x3oXX3Fq3uogT zJPzmLJUkvx!1;J0F2IF&5-!5UxCEEtGF*-;a3!w7)wl-N;yMJ^;|AP_;>malZovv7x5*08DGIy@ilxM-@rHVEqoi_!FTaJ+>P(!2lyd=gdgK4_$hvd zpW_$!C4Plp<2U#%euv-V5BMYggg@gi_$&T~zvCbHC;o+h<3IQ>{-*_-Eyz8xOqR`Z zSw1Ud#jKQ-vr1OYYFRyNWX;?&_sUvXJL_cKte5q(K{m`r**N#kCfPI#bDwOM`)2dp zFI(jP*)m&Y>pURaWZOJ2+htJ}XGylt4tY?PX2nT#nBPIWZ^YIb^Yg@9kPGvqT$GD*NiNN0xja|o%3PJJb4{+z ibxE$z4Y@JRlk=3^l$-O^+>%>!Tb@?1-O~#??fxIhnPc(* diff --git a/data-raw/microorganisms.old.dta b/data-raw/microorganisms.old.dta index 0251d0aa615b08ddaa3ffc45a1806f54d8699419..bde82fd107d20a1dc49895d39dd2953c839caeef 100644 GIT binary patch delta 113 zcmV~$yA6U+06@|B|0^osw|FDqizbB5X&iu9SX$iTc5c8F4#WnI;5kiOH*NiSC1toj zA0Za82=P+gu5Yn}UF=~W2ROtLj&XuhoZ%c7xWpAExW)}`F~tmX+~FP%c*N7!bN>4S DH8CmO delta 113 zcmV~$xei)v&|rhj?0_mPhz=~l_qx9A`u6ims?a#qBOK!dr#QnoE^vt}T;m3}xWfeZc)%m3m|>15JmUqgc>8+Ke}6N! BDcJx3 diff --git a/data-raw/microorganisms.old.sas b/data-raw/microorganisms.old.sas index 4f5fbec71df04a7ea859eb152f4458afa2f77c34..30572c9412e9381daf3ac3bc4e6cd45bdf964ac7 100644 GIT binary patch delta 112 zcmWl~xeD=e|XHEwW=JFIb!2Rz~l&tEUM_aBjPFaiJo delta 112 zcmWl~xeX3T#f6vME|cA@P;+yC+~d>Ecl wH2oH57-NESTwsbz%y5Nk++dCcZgGcuJYb0x9`S@{ykL!2yx|=mf1B5L1c*U0ga7~l diff --git a/data-raw/microorganisms.old.sav b/data-raw/microorganisms.old.sav index 6d47a322b263b221d43d071ee7f014360386ac3d..5c0655d54e53adc156d733dd069de6a501745345 100644 GIT binary patch delta 128 zcmV~$ITFDD06@{P6T}|-)+@*`W70W@+6i^mPr-o6G&S ziTCj#IUSSF_FIVFkKI!&U=d4L#tK%khIMRUfK6;+8$;}17kk*p0S_f}<5mBsrOWrxe- zen?N}EI+6DH@F7L=XrdI0oJgN4Qyfy+t|S_hS7dOmL11T;dAX MxWO&%e(vM&4`t&rg8%>k diff --git a/data-raw/microorganisms.old.xlsx b/data-raw/microorganisms.old.xlsx index 426744d8b4047a98662af04f069f33bce96447a6..34a70422b50489d480d2eeecfbbc3572ec95939b 100644 GIT binary patch delta 551 zcmZ2*S$e@`Y2E;DW)=|!4h{~6W9wu#@+vbj1L@7ij4Qy5$@iFEfCMI=WY(`&3zl5? z)*;oOk43vHUvcN_rnB;sGOp+6-^wiA;4YtkZs-2$6D!T!@21ax(7b7x+Y*gHHn)hC zKH-a>m(5-uD5hjS>H9T@UN?@6%OQuVD!yE6?B{Ztrl5A^g}~xu3HCyUv(6J!CQsS> zb=Gl{Uwqbj_bS#DsT;zZ*Mn@z`b<7$yV> z{CVB`pmfI$1MTk55?3BcwJnqg+pMpu^rQ6q2b1>mQ)k)*F=T0J&iHU(@mJs0|9pow z&THS{&H6_4#BIZu;`jC~p8L%qO_QN}vG?CU8v3hu|1Rs6in?T^f88>6`;-l@wcTFa zF8P#GuWVHmmhqW2z?+@pTLoK#AR_~V1QP=TN&s$_WYvO%pc`8!n9+QRz5Nn9BM>uf zzr@aLAOZ@`?W{7)FTv8=Kgu%qvx3E%m6`n@Vpmj{b-}E57ByxdW&vW>?JR0+IR`*0 zrx!nCGXpc$JY%y1Gu}R9v*rLw1%g~Q-QYQ!IaoOBIh!k(vFSNm5SYRKg3TVx@O;5$ b0cNzkfSPgi1)CLEgy|)lAD9vRlFb(Y8?WWi delta 551 zcmZ2*S$e@`Y2E;D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xb=WOT9++ie#12UT=Hvz4uaS@3i;& z`f;99xMx+l!dShlY~edw*xj{Ak^f&H7T`Wu6pLYTEP*Al6qd$)u?&{Qa#$Ys!wOgt zE8+fF8LMDbJOHa2`2peHzJQxqbCfF1Y#lx@}9*)hi z1s;Jdu@$z)HrN*1VSDU=M`B0pgq`sy?1Ejf8y=0_u?P0VUf3J^;4yeC_QihKACJT1 z@dO-zC*nXHgoE)UJQ;`JDL52Q#bG!cPs0&75>LlbI2zBuF*p{-;dq>Y6LAtw#wj=z zr{S469cSQ7JPT*x**F{L;5m3Mo`-XB9?r)?T!0Jle7pd`MYtH3;8MI0m*H|;fh%zp zuEsUE7T4i=+<+J1M%;uK<7T`Bx8PRXhTCxmUW%9DPP`niz+HGHUWHfVHFzyvhu7l` zcq86~H=}q9-io*3?RW>?iFe`Mcn{u-_u>8c06vHh;lua{K8law-Yw~iErWC_zv#Ickw-ZANSw~_#u9TALA$ZDSn2Z;}`fP zeuZD-H~1~?#qaQY`~iQ&pYUh=1%Jig@OS(J|HQxWZ~O=UU24G!3u2!r8pWb`l!%g1 zDoV$`Q6|bpxhNm|MTMvsm16&>995!f91zu_dK?%vqGr^J+EFL!M!l#X4WeNj6pf;B z92|#4lV}=;#$nMc4v*&1B94fb(JER;n`j&DqJ4CTBco$3)5Vth=9i7_cA$CQ{F)8fpS9y4NQoE5X;?3f*M;+!})&WpJ*FXl&KEQp11eq0d5 zqF5YDVrg6$%VK$~h?TJ_R>zuH8|z|yY>10uV{D3xV{=>*TViW$i|w%^E{)3y?sI2B H|GobK7r(@b diff --git a/data-raw/microorganisms.sav b/data-raw/microorganisms.sav index 0a776bd0c2937448f88b8bd8ffd7522978db8b39..5ca51f1ff2f16f5be962605941c9653a8077656c 100644 GIT binary patch delta 1581 zcmWN=2ec3Z0EW@?q(n(bktTItfDN$`o`#LF2{y%M*c?yC7T6M7;ThN( z+hAKf6Wd{XJPSKuN9=@WV`n@EyI@!BhTX9To{K%P7xuybHJB-FOe)i}&GH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iy1 zRkCVU%j$Vd9-GJI@p(d?m^HFy*2>yhC+lXtte*|CVK&N>^5krsO|oe=%Tuy>w#b&* zDqH8Nd0Mu~w%IOE&olDOJS*F0hdetwW~V$SJLkFCCC|&Qd467y7v@FTEicaQ*&};q zuk4+D@{;VE{qoYhEc@qx9GHXh@*JF3K$&yBe$@5noIbDDSMmb^Rf$$N8aZp-a?U*4ZPa%Vn} X59Y4ioqO`3d^jH|*zMke10Vhml6m;$ diff --git a/data-raw/microorganisms.xlsx b/data-raw/microorganisms.xlsx index 96ec13409983090845b994a40f19dc0e4e13d3c1..a6fe8c1f4f492902e9fdd0f9298ba5714b52a300 100644 GIT binary patch delta 1077 zcmZA0dq`7J90%|_uXEF!+FF}AbDG_J%``Qqt7%p`bGhcUa%Jg-ptL`tB0|Ybd#Df< zEV?BYmSTdBGObyeEJ`iNX0Do#D0@j}_QwJ-it4)?26o}Y`Tfp0zk4p{o^$ur39=Ie zIt}S8BKUkh(cR+PDhT9|XxpMW4Qyb1?exjfVSG$3F6q-gi1a#^OW9SeM*BR&x=_yN z%CuDH(hkE^?9Gaj9nyhLmDa5^O*PeVX=so7QbDn<*v@^bsoi~cr!!S^d#?WA@}hi2 zex*=$UfiVcDTpakPt?Ebxo?aX=bRZe@}G63{P2=@4}MbxkF^C)G<-RkDS!Cvz+lv` z`${vnBtVg!lvl<*5wxX1;;Xa=nIehYh=Sa3$Th<}1Jv=rU zG`!byt&r@G93He>v){Q>vP;nrlA5H~*C!7}h~w{dUHLFotSr2dxG+AX{kw}!!{fI< z41X`=5QMiALCo6BwgueKzq^^@QppBK2YBTJJPtSk3C_R;7jTU6!4=$K4!DB=JirsY zU@iz@9*AH*h(QA0umF5O3cj!q{6Gf&5CDrH5Eh#Tc+~H1$1gTL@1w@q&or4W)M+l; zr+-0d|Mu0sq{7*#+-jp>2?Rkfgg_{SfgHkNDMUadEQ2VBh8S25v7mrBhzBLCfR&(v z1W1HckOZq?4XlM^NC7pZ!a7I;4XlTB(831LK?dj{6S80w{-9*uM?8>k!U1U9H>q*u6ND1$u#%o9wIIZ~_ovgjj05FI!WK4@p2x>5lX z&_su@#pzA7l%r(wo9I}7N72MceSx`~B3i3#glMJ$ZCz;(&-j)n4%2BkP7?CpP0g@c z^X08Lc0D9P2xb*LI@e75vWv)?X(`!mp_qOPCG!054NM+JIVsGcX4;RPebJFK%b%7 delta 1070 zcmY+@dq`7J90%}wcbm@UTGsNhEmOB!z90F>w`SR_`OLC+^VT1kRAkTttYns&h*VR$ zrDT+*(Pkwp78%(H4TD&9Eh%M+5t&6rk`-C@-3|Zn!iRHz=bU@)Ilue6_XjJfPLSkk zsaY~YBoYzl_3{phili>+<>pB88cCs}&Mp|`+g?gtrqezOmvwio=`C$+t&2|^&_8KX ziV9>yX$Sg+jVbEqH-_xDxv|32rT63B|NZRS_C~q>(oy~Ri&6R6V2w-BzLS01YPY}H zdv8^>G*kRaA&Hh-o3rvu-VXPAi9<8Ku0C0$YhEEbx8u_9r2utN9qTRDxvPo1ou5Mb-!zp|1;}OgWKeL$#8ww-SD8A z@zHl9@=9MtfjMlk-_N~2ekNAsTy07=P{o1PfWr^VOR_4aq=PS-e%-1OexgrxMvQsb zk6*bsk*ba$B+a#dCIfF8e^(u1+zd1PT&|5feXwAF}Q*R=71FD zf*Z_(`5=P@;0_+(30@!v1t?)5c*7#_0blR~6{szoGd!sQ*8?;|L5!$#nKuJLAnC dsmT$aWAC*yOZoVVBkp0vH<%!&sp|}0@(-d_(cb_7 diff --git a/data-raw/rsi_translation.dta b/data-raw/rsi_translation.dta index 9b1db51607bb4659059ddc3a67d58145e56e0d1d..80950c971f3689b86ebb23fb7e8b7812b9050afb 100644 GIT binary patch delta 172 zcmWN=IZgrr06@_Uo2&vNAd4_80)nzkG%<9Xh7(XwQvBj~9>Gh{Qg8~|xrw~w#n(#^ z-~S#fKjH4M52JOo4x`QX`|BhIn7|~aFpU{}z%1r4j|D7Z2_LbH6|CYD*6Q3VH^{f#1y76gIWB<9OkirMJ(YLma&3WtYIC$@dq2& j#1^)(gIx@;hkYF25PxxmW1Qd=XE?_NE^&2r{kXgUpFctc diff --git a/data-raw/rsi_translation.sas b/data-raw/rsi_translation.sas index 5967099445c3e8913a81e7e5f71a177be19a4797..ab5d21b0d655c18ceb6887619b7bcab0ccb607d7 100644 GIT binary patch delta 176 zcmWN?Npb-J06@`hF@zQo5`-Xz7$U|K$OY`(rY*j;y#r+btL*JvAyuxz;?;}KmoUCN z{6)v@{{J@!*7tW}hzWeaB&INp8GOVn<}kuMK4Af$v4}5N!ZN<%8& delta 176 zcmWN?xlsZE06@`Q0R>hLx$!_jxo;|f2B>KXer^HgrVI3RT#1^*k72oh3Kd^(J h_=R2U;Wz$Z9|t(Z5sqv7GPWb=; diff --git a/data-raw/rsi_translation.sav b/data-raw/rsi_translation.sav index e28c702eb657973fa535ff18934622819e93751d..f7ea73e7d7b964ecbb3bade8bf52e1c3341a0832 100644 GIT binary patch delta 198 zcmWN=Jx;;^0D#dTA|NPW6$KG1KjJU8g%ZLf2VwREt|ScK&c+p7zLA4;^)&F3mu3IC z?0CDX&%@>KPnbkWyhx{uDBZ>D;CmzH@C5UCiUmBwB9^d>=UBliUf?Cxu#OG9!T_)F z2Ag<`ci6%<-eU(Ju#1lv;uH3;j{_XyGmh{DU-1p!@dH0`j9(aGj0sL~is|0j;O_ua C=2Nf$ delta 198 zcmWN=J5s_>06@{*g9izdpfpYb4wSJ*45ydIeGq9 z$p7y?T4}WT+(z*-q*;iwRk9CXo%Od^z#^8gj7M0(Djwqr*63?3iZh(!0^e|n0b_i}6(+x?>vgl?F?jD*IAozrfyw)@$fdV6(ZlfK9Am%k(x zEZXEmUOXtA_w>hk=>wYeg^6Ke&o7=nYRcnmwk9p!r+&)g?ROu4ma&^!^~-~A#Y&dt zcNn>knTr0iFYvB@c34kr!*qpr$5zBw{O&Bf#XRu{gGrCsx6iBhta~SaOE-%vXu^~! znSt9}{jQr&S#y8+x3{au~+ke!!1DMB}BwVte+Jua!%S0A|fxV3uZL?%eDKu*_4?)_ensS+e={znwFuk73ngb{v2y*GvPh938!Rb1TT&`e72_sh!m~oPk i%O1?&X5z8{Gu)UUCQNT<;<5sZ9AV<}12aUKxqJcF#LY|q delta 526 zcmaFVrtzpvgEzpNnMH(wgM))%TBFoPUS&pRAidd`aRrz$`5w~?kig`V%=*mBE*nk$ z&8$;DQOBJ#Bd_I3Y;WAH++A*+{65^*q<* z?s{|5q)AQp?(FkdKmTpHa(b)T{Qz%vj)nFY4+%0dFi0>lFrWlXAOiwyR%MlggpwOu zCxmf{y_yFcZUG`MAtE+n{j6Y-bJBhg5qVi%Fr(RDuH9db5r~<9m>Gy!fS47C*?^cG zh&i_V%W*z_2+}^)l*GfRJ96<3vkV~h2;xY#bPS;`Nas@L=7`cMLjFXI9 i_Fx7#6PE>;;l>0pVR}0gmlas#2oskdm?6r{ AMR (for R) - 1.3.0.9009 + 1.3.0.9010 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 5d38cbaf1..0de18688d 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.3.0.9009 + 1.3.0.9010 diff --git a/docs/articles/index.html b/docs/articles/index.html index 0c6d799bb..af3bb758a 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.3.0.9009 + 1.3.0.9010 diff --git a/docs/authors.html b/docs/authors.html index d2a570c00..ea305e82b 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@ AMR (for R) - 1.3.0.9009 + 1.3.0.9010 diff --git a/docs/index.html b/docs/index.html index 2793708dd..fee483d93 100644 --- a/docs/index.html +++ b/docs/index.html @@ -43,7 +43,7 @@ AMR (for R) - 1.3.0.9009 + 1.3.0.9010 diff --git a/docs/news/index.html b/docs/news/index.html index 5ed025704..771aa3e1e 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.3.0.9009 + 1.3.0.9010 @@ -236,18 +236,19 @@ Source: NEWS.md -
-

-AMR 1.3.0.9009 Unreleased +
+

+AMR 1.3.0.9010 Unreleased

-
+

-Last updated: 26 August 2020 +Last updated: 28 August 2020

New

    +
  • A new vignette and website page with info about all our public and freely available data sets, that can be downloaded as flat files or in formats for use in R, SPSS, SAS, Stata and Excel: https://msberends.github.io/AMR/articles/datasets.html

  • Data set intrinsic_resistant. This data set contains all bug-drug combinations where the ‘bug’ is intrinsic resistant to the ‘drug’ according to the latest EUCAST insights. It contains just two columns: microorganism and antibiotic.

    Curious about which enterococci are actually intrinsic resistant to vancomycin?

    @@ -297,7 +298,7 @@
  • Overall speed improvement by tweaking joining functions

  • Function mo_shortname() now returns the genus for input where the species is unknown

  • BORSA is now recognised as an abbreviation for Staphylococcus aureus, meaning that e.g. mo_genus("BORSA") will return “Staphylococcus”

  • -
  • Support for coloured tibble printing of classes ab, mo, rsi, mic and disk

  • +
  • Added a feature from AMR 1.1.0 and earlier again, but now without other package dependencies: tibble printing support for classes <rsi>, <mic>, <disk>, <ab> and <mo>. When using tibbles containing antimicrobial columns (class <rsi>), “S” will print in green, “I” will print in yellow and “R” will print in red. Microbial IDs (class <mo>) will emphasise on the genus and species, not on the kingdom.

@@ -399,8 +400,8 @@

Negative effects of this change are:

  • Function freq() that was borrowed from the cleaner package was removed. Use cleaner::freq(), or run library("cleaner") before you use freq().
  • -
  • Printing values of class mo or rsi in a tibble will no longer be in colour and printing rsi in a tibble will show the class <ord>, not <rsi> anymore. This is purely a visual effect.
  • -
  • All functions from the mo_* family (like mo_name() and mo_gramstain()) are noticeably slower when running on hundreds of thousands of rows.
  • +
  • Printing values of class mo or rsi in a tibble will no longer be in colour and printing rsi in a tibble will show the class <ord>, not <rsi> anymore. This is purely a visual effect.
  • +
  • All functions from the mo_* family (like mo_name() and mo_gramstain()) are noticeably slower when running on hundreds of thousands of rows.
  • For developers: classes mo and ab now both also inherit class character, to support any data transformation. This change invalidates code that checks for class length == 1.
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 89692fc9d..2206fdffb 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 2.7.3 pkgdown: 1.5.1.9000 pkgdown_sha: eae56f08694abebf93cdfc0dd8e9ede06d8c815f articles: [] -last_built: 2020-08-26T14:13Z +last_built: 2020-08-28T19:54Z urls: reference: https://msberends.github.io/AMR/reference article: https://msberends.github.io/AMR/articles diff --git a/docs/reference/antibiotic_class_selectors.html b/docs/reference/antibiotic_class_selectors.html index ee9c10906..c685b61c4 100644 --- a/docs/reference/antibiotic_class_selectors.html +++ b/docs/reference/antibiotic_class_selectors.html @@ -82,7 +82,7 @@ AMR (for R) - 1.3.0.9009 + 1.3.0.9010
diff --git a/docs/reference/as.mo.html b/docs/reference/as.mo.html index 221077b32..8b167a169 100644 --- a/docs/reference/as.mo.html +++ b/docs/reference/as.mo.html @@ -82,7 +82,7 @@ AMR (for R) - 1.3.0.9007 + 1.3.0.9010
diff --git a/docs/reference/bug_drug_combinations.html b/docs/reference/bug_drug_combinations.html index 90a1a538e..60bdbea37 100644 --- a/docs/reference/bug_drug_combinations.html +++ b/docs/reference/bug_drug_combinations.html @@ -82,7 +82,7 @@ AMR (for R) - 1.3.0.9009 + 1.3.0.9010

diff --git a/docs/reference/eucast_rules.html b/docs/reference/eucast_rules.html index f43976ce0..fb0c7d22a 100644 --- a/docs/reference/eucast_rules.html +++ b/docs/reference/eucast_rules.html @@ -83,7 +83,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied AMR (for R) - 1.3.0.9008 + 1.3.0.9010 diff --git a/docs/reference/index.html b/docs/reference/index.html index 4d15e24c1..ee58310da 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.3.0.9009 + 1.3.0.9010 diff --git a/docs/reference/microorganisms.codes.html b/docs/reference/microorganisms.codes.html index 1656464f8..1d5be99c4 100644 --- a/docs/reference/microorganisms.codes.html +++ b/docs/reference/microorganisms.codes.html @@ -82,7 +82,7 @@ AMR (for R) - 1.3.0.9007 + 1.3.0.9010 diff --git a/docs/survey.html b/docs/survey.html index cccb70a9a..cb919ef22 100644 --- a/docs/survey.html +++ b/docs/survey.html @@ -81,7 +81,7 @@ AMR (for R) - 1.3.0.9009 + 1.3.0.9010 diff --git a/tests/testthat/test-import_fn.R b/tests/testthat/test-import_fn.R new file mode 100644 index 000000000..ce1fed337 --- /dev/null +++ b/tests/testthat/test-import_fn.R @@ -0,0 +1,47 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# SOURCE # +# https://github.com/msberends/AMR # +# # +# LICENCE # +# (c) 2018-2020 Berends MS, Luz CF et al. # +# # +# This R package is free software; you can freely use and distribute # +# it for both personal and commercial purposes under the terms of the # +# GNU General Public License version 2.0 (GNU GPL-2), as published by # +# the Free Software Foundation. # +# # +# We created this package for both routine data analysis and academic # +# research and it was publicly released in the hope that it will be # +# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # +# Visit our website for more info: https://msberends.github.io/AMR. # +# ==================================================================== # + +test_that("imports work", { + skip_on_cran() + + import_functions <- c( + cleaner = "freq.default", + curl = "has_internet", + dplyr = "cur_column", + dplyr = "peek_mask", + readxl = "read_excel", + rstudioapi = "showQuestion", + rvest = "html_attr", + rvest = "html_children", + rvest = "html_node", + rvest = "html_nodes", + rvest = "html_table", + rvest = "html_text", + tidyselect = "peek_vars", + xml2 = "read_html") + + for (i in seq_len(length(import_functions))) { + pkg <- names(import_functions)[i] + fn <- unname(import_functions[i]) + expect(!is.null(import_fn(name = fn, pkg = pkg, error_on_fail = FALSE)), + failure_message = paste0("Function ", pkg, "::", fn, "() does not exist")) + } +})