diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index d46756d5..160c5d6d 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # on: diff --git a/.github/workflows/codecovr.yaml b/.github/workflows/codecovr.yaml index 571a93c1..a8ab5ba7 100644 --- a/.github/workflows/codecovr.yaml +++ b/.github/workflows/codecovr.yaml @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # on: diff --git a/.github/workflows/lintr.yaml b/.github/workflows/lintr.yaml index 1cfd27df..0cc16834 100644 --- a/.github/workflows/lintr.yaml +++ b/.github/workflows/lintr.yaml @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # on: diff --git a/DESCRIPTION b/DESCRIPTION index ef2ab328..361e0a89 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: AMR -Version: 1.5.0.9013 -Date: 2021-01-28 -Title: Antimicrobial Resistance Analysis +Version: 1.5.0.9014 +Date: 2021-02-02 +Title: Antimicrobial Resistance Data Analysis Authors@R: c( person(role = c("aut", "cre"), family = "Berends", given = c("Matthijs", "S."), email = "m.s.berends@umcg.nl", comment = c(ORCID = "0000-0001-7620-1800")), diff --git a/NEWS.md b/NEWS.md index a8ebedc9..389e5dfc 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,25 @@ -# AMR 1.5.0.9013 -## Last updated: 28 January 2021 +# AMR 1.5.0.9014 +## Last updated: 2 February 2021 + +### Breaking +* Functions that are applied to a data set containing antibiotic columns gained the argument `only_rsi_columns`, which defaults to `TRUE` if any of the columns are of class `` (i.e., transformed with `as.rsi()`). This increases reliability of automatic determination of antibiotic columns (so only columns that are defined to be `` will be affected). + + This change might invalidate existing code. But since the new argument always returns `FALSE` when no `` column can be found in the data, this chance is low. + + Affected functions are: + * All antibiotic selector functions (`ab_class()` and its wrappers, such as `aminoglocysides()`, `carbapenems()`, `penicillins()`) + * All antibiotic filter functions (`filter_ab_class()` and its wrappers, such as `filter_aminoglocysides()`, `filter_carbapenems()`, `filter_penicillins()`) + * `eucast_rules()` + * `mdro()` (including wrappers such as `brmo()`, `mrgn` and `eucast_exceptional_phenotypes()`) + * `guess_ab_col()` + + You can quickly transform all your eligible columns using either: + + ```r + library(dplyr) + your_date %>% mutate_if(is.rsi.eligible, as.rsi) # old dplyr + your_date %>% mutate(across((is.rsi.eligible), as.rsi)) # new dplyr + ``` ### New * Support for EUCAST Clinical Breakpoints v11.0 (2021), effective in the `eucast_rules()` function and in `as.rsi()` to interpret MIC and disk diffusion values. This is now the default guideline in this package. @@ -28,21 +48,22 @@ ``` ### Changed +* `is.rsi()` now returns a vector of `TRUE`/`FALSE` when the input is a data set, in case it will iterate over all columns * Using functions without setting a data set (e.g., `mo_is_gram_negative()`, `mo_is_gram_positive()`, `mo_is_intrinsic_resistant()`, `first_isolate()`, `mdro()`) now work with `dplyr`s `group_by()` again * Updated the data set `microorganisms.codes` (which contains popular LIS and WHONET codes for microorganisms) for some species of *Mycobacterium* that previously incorrectly returned *M. africanum* * Added Pretomanid (PMD, J04AK08) to the `antibiotics` data set * WHONET code `"PNV"` will now correctly be interpreted as `PHN`, the antibiotic code for phenoxymethylpenicillin ('peni V') * Fix for verbose output of `mdro(..., verbose = TRUE)` for German guideline (3MGRN and 4MGRN) and Dutch guideline (BRMO, only *P. aeruginosa*) -* `is.rsi.eligible()` now returns `FALSE` immediately if the input does not contain any of the values "R", "S" or "I". This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns. +* `is.rsi.eligible()` now detects if the column name resembles an antibiotic name or code and now returns `TRUE` immediately if the input contains any of the values "R", "S" or "I". This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns. * Functions `get_episode()` and `is_new_episode()` now support less than a day as value for argument `episode_days` (e.g., to include one patient/test per hour) * Argument `ampc_cephalosporin_resistance` in `eucast_rules()` now also applies to value "I" (not only "S") * Updated colours of values R, S and I in tibble printing * Functions `print()` and `summary()` on a Principal Components Analysis object (`pca()`) now print additional group info if the original data was grouped using `dplyr::group_by()` - +* Improved speed of `guess_ab_col()` ### Other * Big documentation updates -* Loading the package (i.e., `library(AMR)`) now is ~50 times faster than before, in costs of package size (increased with ~3 MB) +* Loading the package (i.e., `library(AMR)`) now is ~50 times faster than before, in costs of package size (which increased by ~3 MB) # AMR 1.5.0 @@ -698,7 +719,7 @@ This software is now out of beta and considered stable. Nonetheless, this packag We've got a new website: [https://msberends.gitlab.io/AMR](https://msberends.gitlab.io/AMR/) (built with the great [`pkgdown`](https://pkgdown.r-lib.org/)) * Contains the complete manual of this package and all of its functions with an explanation of their arguments -* Contains a comprehensive tutorial about how to conduct antimicrobial resistance analysis, import data from WHONET or SPSS and many more. +* Contains a comprehensive tutorial about how to conduct AMR data analysis, import data from WHONET or SPSS and many more. #### New * **BREAKING**: removed deprecated functions, arguments and references to 'bactid'. Use `as.mo()` to identify an MO code. @@ -757,7 +778,7 @@ We've got a new website: [https://msberends.gitlab.io/AMR](https://msberends.git * New function `mo_uncertainties()` to review values that could be coerced to a valid MO code using `as.mo()`, but with uncertainty. * New function `mo_renamed()` to get a list of all returned values from `as.mo()` that have had taxonomic renaming * New function `age()` to calculate the (patients) age in years -* New function `age_groups()` to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group. +* New function `age_groups()` to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic AMR data analysis per age group. * New function `ggplot_rsi_predict()` as well as the base R `plot()` function can now be used for resistance prediction calculated with `resistance_predict()`: ```r x <- resistance_predict(septic_patients, col_ab = "amox") diff --git a/R/aa_helper_functions.R b/R/aa_helper_functions.R index b405680b..e3287c38 100755 --- a/R/aa_helper_functions.R +++ b/R/aa_helper_functions.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # # faster implementation of left_join than using merge() by poorman - we use match(): @@ -673,6 +673,45 @@ get_current_data <- function(arg_name, call) { } } +get_current_column <- function() { + # try dplyr::cur_columns() first + cur_column <- import_fn("cur_column", "dplyr", error_on_fail = FALSE) + if (!is.null(cur_column)) { + out <- tryCatch(cur_column(), error = function(e) NULL) + if (!is.null(out)) { + return(out) + } + } + + # cur_column() doesn't always work (only allowed for conditions set by dplyr), but it's probably still possible: + frms <- lapply(sys.frames(), function(el) { + if ("i" %in% names(el)) { + if ("tibble_vars" %in% names(el)) { + # for mutate_if() + el$tibble_vars[el$i] + } else { + # for mutate(across()) + df <- tryCatch(get_current_data(NA, 0), error = function(e) NULL) + if (is.data.frame(df)) { + colnames(df)[el$i] + } else { + el$i + } + } + } else { + NULL + } + }) + + vars <- unlist(frms) + if (length(vars) > 0) { + vars[length(vars)] + } else { + # not found, so: + NULL + } +} + unique_call_id <- function(entire_session = FALSE) { if (entire_session == TRUE) { c(envir = "session", diff --git a/R/aa_helper_pm_functions.R b/R/aa_helper_pm_functions.R index d5f8c199..43767a04 100644 --- a/R/aa_helper_pm_functions.R +++ b/R/aa_helper_pm_functions.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # # ------------------------------------------------ diff --git a/R/ab.R b/R/ab.R index 2adf3545..8c8f617a 100755 --- a/R/ab.R +++ b/R/ab.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Transform Input to an Antibiotic ID @@ -103,19 +103,20 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = TRUE, ...) { initial_search <- is.null(list(...)$initial_search) already_regex <- isTRUE(list(...)$already_regex) + fast_mode <- isTRUE(list(...)$fast_mode) if (all(toupper(x) %in% antibiotics$ab)) { # valid AB code, but not yet right class return(set_clean_class(toupper(x), new_class = c("ab", "character"))) } - + x_bak <- x x <- toupper(x) # remove diacritics x <- iconv(x, from = "UTF-8", to = "ASCII//TRANSLIT") x <- gsub('"', "", x, fixed = TRUE) - x <- gsub("(specimen|specimen date|specimen_date|spec_date)", "", x, ignore.case = TRUE, perl = TRUE) + x <- gsub("(specimen|specimen date|specimen_date|spec_date|^dates?$)", "", x, ignore.case = TRUE, perl = TRUE) x_bak_clean <- x if (already_regex == FALSE) { x_bak_clean <- generalise_antibiotic_name(x_bak_clean) @@ -145,6 +146,7 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = TRUE, ...) { } for (i in seq_len(length(x))) { + if (initial_search == TRUE) { progress$tick() } @@ -161,7 +163,7 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = TRUE, ...) { next } - if (isTRUE(flag_multiple_results) & x[i] %like% "[ ]") { + if (fast_mode == FALSE && flag_multiple_results == TRUE && x[i] %like% "[ ]") { from_text <- tryCatch(suppressWarnings(ab_from_text(x[i], initial_search = FALSE, translate_ab = FALSE)[[1]]), error = function(e) character(0)) } else { @@ -282,8 +284,8 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = TRUE, ...) { } # INITIAL SEARCH - More uncertain results ---- - - if (initial_search == TRUE) { + + if (initial_search == TRUE && fast_mode == FALSE) { # only run on first try # try by removing all spaces @@ -358,7 +360,7 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = TRUE, ...) { # try from a bigger text, like from a health care record, see ?ab_from_text # already calculated above if flag_multiple_results = TRUE - if (isTRUE(flag_multiple_results)) { + if (flag_multiple_results == TRUE) { found <- from_text[1L] } else { found <- tryCatch(suppressWarnings(ab_from_text(x[i], initial_search = FALSE, translate_ab = FALSE)[[1]][1L]), @@ -457,7 +459,7 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = TRUE, ...) { call = FALSE) } - if (length(x_unknown) > 0) { + if (length(x_unknown) > 0 & fast_mode == FALSE) { warning_("These values could not be coerced to a valid antimicrobial ID: ", paste('"', sort(unique(x_unknown)), '"', sep = "", collapse = ", "), ".", @@ -466,7 +468,7 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = TRUE, ...) { x_result <- data.frame(x = x_bak_clean, stringsAsFactors = FALSE) %pm>% pm_left_join(data.frame(x = x, x_new = x_new, stringsAsFactors = FALSE), by = "x") %pm>% - pm_pull(x_new) + pm_pull(x_new) if (length(x_result) == 0) { x_result <- NA_character_ diff --git a/R/ab_class_selectors.R b/R/ab_class_selectors.R index f0226178..aa5e5ee7 100644 --- a/R/ab_class_selectors.R +++ b/R/ab_class_selectors.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,13 +20,14 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Antibiotic Class Selectors #' #' These functions help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. \strong{\Sexpr{ifelse(as.double(R.Version()$major) + (as.double(R.Version()$minor) / 10) < 3.2, paste0("NOTE: THESE FUNCTIONS DO NOT WORK ON YOUR CURRENT R VERSION. These functions require R version 3.2 or later - you have ", R.version.string, "."), "")}} #' @inheritSection lifecycle Stable Lifecycle +#' @param only_rsi_columns a logical to indicate whether only columns of class [``]([rsi]) must be selected. If set to `NULL` (default), it will be `TRUE` if any column of the data was [transformed to class ``]([rsi]) on beforehand, and `FALSE` otherwise. #' @inheritParams filter_ab_class #' @details \strong{\Sexpr{ifelse(as.double(R.Version()$major) + (as.double(R.Version()$minor) / 10) < 3.2, paste0("NOTE: THESE FUNCTIONS DO NOT WORK ON YOUR CURRENT R VERSION. These functions require R version 3.2 or later - you have ", R.version.string, "."), "")}} #' @@ -79,91 +80,95 @@ #' example_isolates %>% filter_carbapenems("R", "all") #' example_isolates %>% filter(across(carbapenems(), ~. == "R")) #' } -ab_class <- function(ab_class) { +ab_class <- function(ab_class, + only_rsi_columns = NULL) { ab_selector(ab_class, function_name = "ab_class") } #' @rdname antibiotic_class_selectors #' @export -aminoglycosides <- function() { +aminoglycosides <- function(only_rsi_columns = NULL) { ab_selector("aminoglycoside", function_name = "aminoglycosides") } #' @rdname antibiotic_class_selectors #' @export -carbapenems <- function() { - ab_selector("carbapenem", function_name = "carbapenems") +carbapenems <- function(only_rsi_columns = NULL) { + ab_selector("carbapenem", function_name = "carbapenems", only_rsi_columns = only_rsi_columns) } #' @rdname antibiotic_class_selectors #' @export -cephalosporins <- function() { - ab_selector("cephalosporin", function_name = "cephalosporins") +cephalosporins <- function(only_rsi_columns = NULL) { + ab_selector("cephalosporin", function_name = "cephalosporins", only_rsi_columns = only_rsi_columns) } #' @rdname antibiotic_class_selectors #' @export -cephalosporins_1st <- function() { - ab_selector("cephalosporins.*1", function_name = "cephalosporins_1st") +cephalosporins_1st <- function(only_rsi_columns = NULL) { + ab_selector("cephalosporins.*1", function_name = "cephalosporins_1st", only_rsi_columns = only_rsi_columns) } #' @rdname antibiotic_class_selectors #' @export -cephalosporins_2nd <- function() { - ab_selector("cephalosporins.*2", function_name = "cephalosporins_2nd") +cephalosporins_2nd <- function(only_rsi_columns = NULL) { + ab_selector("cephalosporins.*2", function_name = "cephalosporins_2nd", only_rsi_columns = only_rsi_columns) } #' @rdname antibiotic_class_selectors #' @export -cephalosporins_3rd <- function() { - ab_selector("cephalosporins.*3", function_name = "cephalosporins_3rd") +cephalosporins_3rd <- function(only_rsi_columns = NULL) { + ab_selector("cephalosporins.*3", function_name = "cephalosporins_3rd", only_rsi_columns = only_rsi_columns) } #' @rdname antibiotic_class_selectors #' @export -cephalosporins_4th <- function() { - ab_selector("cephalosporins.*4", function_name = "cephalosporins_4th") +cephalosporins_4th <- function(only_rsi_columns = NULL) { + ab_selector("cephalosporins.*4", function_name = "cephalosporins_4th", only_rsi_columns = only_rsi_columns) } #' @rdname antibiotic_class_selectors #' @export -cephalosporins_5th <- function() { - ab_selector("cephalosporins.*5", function_name = "cephalosporins_5th") +cephalosporins_5th <- function(only_rsi_columns = NULL) { + ab_selector("cephalosporins.*5", function_name = "cephalosporins_5th", only_rsi_columns = only_rsi_columns) } #' @rdname antibiotic_class_selectors #' @export -fluoroquinolones <- function() { - ab_selector("fluoroquinolone", function_name = "fluoroquinolones") +fluoroquinolones <- function(only_rsi_columns = NULL) { + ab_selector("fluoroquinolone", function_name = "fluoroquinolones", only_rsi_columns = only_rsi_columns) } #' @rdname antibiotic_class_selectors #' @export -glycopeptides <- function() { - ab_selector("glycopeptide", function_name = "glycopeptides") +glycopeptides <- function(only_rsi_columns = NULL) { + ab_selector("glycopeptide", function_name = "glycopeptides", only_rsi_columns = only_rsi_columns) } #' @rdname antibiotic_class_selectors #' @export -macrolides <- function() { - ab_selector("macrolide", function_name = "macrolides") +macrolides <- function(only_rsi_columns = NULL) { + ab_selector("macrolide", function_name = "macrolides", only_rsi_columns = only_rsi_columns) } #' @rdname antibiotic_class_selectors #' @export -penicillins <- function() { - ab_selector("penicillin", function_name = "penicillins") +penicillins <- function(only_rsi_columns = NULL) { + ab_selector("penicillin", function_name = "penicillins", only_rsi_columns = only_rsi_columns) } #' @rdname antibiotic_class_selectors #' @export -tetracyclines <- function() { - ab_selector("tetracycline", function_name = "tetracyclines") +tetracyclines <- function(only_rsi_columns = NULL) { + ab_selector("tetracycline", function_name = "tetracyclines", only_rsi_columns = only_rsi_columns) } -ab_selector <- function(ab_class, function_name) { +ab_selector <- function(ab_class, + function_name, + only_rsi_columns) { meet_criteria(ab_class, allow_class = "character", has_length = 1, .call_depth = 1) meet_criteria(function_name, allow_class = "character", has_length = 1, .call_depth = 1) + meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1, allow_NULL = TRUE, .call_depth = 1) if (as.double(R.Version()$major) + (as.double(R.Version()$minor) / 10) < 3.2) { warning_("antibiotic class selectors such as ", function_name, @@ -173,10 +178,12 @@ ab_selector <- function(ab_class, function_name) { } vars_df <- get_current_data(arg_name = NA, call = -3) - + if (is.null(only_rsi_columns)) { + only_rsi_columns <- any(is.rsi(vars_df)) + } # improve speed here so it will only run once when e.g. in one select call if (!identical(pkg_env$ab_selector, unique_call_id())) { - ab_in_data <- get_column_abx(vars_df, info = FALSE) + ab_in_data <- get_column_abx(vars_df, info = FALSE, only_rsi_columns = only_rsi_columns) pkg_env$ab_selector <- unique_call_id() pkg_env$ab_selector_cols <- ab_in_data } else { diff --git a/R/ab_from_text.R b/R/ab_from_text.R index ef6ad883..236b770f 100644 --- a/R/ab_from_text.R +++ b/R/ab_from_text.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Retrieve Antimicrobial Drug Names and Doses from Clinical Text diff --git a/R/ab_property.R b/R/ab_property.R index 9f470aed..d7de3d4d 100644 --- a/R/ab_property.R +++ b/R/ab_property.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Get Properties of an Antibiotic diff --git a/R/age.R b/R/age.R index 7af36687..415b4067 100755 --- a/R/age.R +++ b/R/age.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Age in Years of Individuals diff --git a/R/amr.R b/R/amr.R index 76b39f28..b1fc4382 100644 --- a/R/amr.R +++ b/R/amr.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' The `AMR` Package @@ -37,7 +37,7 @@ #' - Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the Catalogue of Life and List of Prokaryotic names with Standing in Nomenclature #' - Interpreting raw MIC and disk diffusion values, based on the latest CLSI or EUCAST guidelines #' - Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records -#' - Determining first isolates to be used for AMR analysis +#' - Determining first isolates to be used for AMR data analysis #' - Calculating antimicrobial resistance #' - Determining multi-drug resistance (MDR) / multi-drug resistant organisms (MDRO) #' - Calculating (empirical) susceptibility of both mono therapy and combination therapies @@ -54,7 +54,7 @@ #' @section Reference Data Publicly Available: #' All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this `AMR` package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find [all download links on our website](https://msberends.github.io/AMR/articles/datasets.html), which is automatically updated with every code change. #' @section Read more on Our Website!: -#' On our website you can find [a comprehensive tutorial](https://msberends.github.io/AMR/articles/AMR.html) about how to conduct AMR analysis, the [complete documentation of all functions](https://msberends.github.io/AMR/reference/) and [an example analysis using WHONET data](https://msberends.github.io/AMR/articles/WHONET.html). As we would like to better understand the backgrounds and needs of our users, please [participate in our survey](https://msberends.github.io/AMR/survey.html)! +#' On our website you can find [a comprehensive tutorial](https://msberends.github.io/AMR/articles/AMR.html) about how to conduct AMR data analysis, the [complete documentation of all functions](https://msberends.github.io/AMR/reference/) and [an example analysis using WHONET data](https://msberends.github.io/AMR/articles/WHONET.html). As we would like to better understand the backgrounds and needs of our users, please [participate in our survey](https://msberends.github.io/AMR/survey.html)! #' @section Contact Us: #' For suggestions, comments or questions, please contact us at: #' diff --git a/R/atc_online.R b/R/atc_online.R index 5feeb49e..84a79926 100644 --- a/R/atc_online.R +++ b/R/atc_online.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Get ATC Properties from WHOCC Website diff --git a/R/availability.R b/R/availability.R index 730a99b6..962e3de3 100644 --- a/R/availability.R +++ b/R/availability.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Check Availability of Columns diff --git a/R/bug_drug_combinations.R b/R/bug_drug_combinations.R index c9981683..a837f545 100644 --- a/R/bug_drug_combinations.R +++ b/R/bug_drug_combinations.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Determine Bug-Drug Combinations diff --git a/R/catalogue_of_life.R b/R/catalogue_of_life.R index ecc1dd15..8359d7d9 100755 --- a/R/catalogue_of_life.R +++ b/R/catalogue_of_life.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # format_included_data_number <- function(data) { diff --git a/R/count.R b/R/count.R index 2a4c6ccd..8916f2ca 100755 --- a/R/count.R +++ b/R/count.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Count Available Isolates diff --git a/R/data.R b/R/data.R index 6da29668..0a81f94c 100755 --- a/R/data.R +++ b/R/data.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Data Sets with `r format(nrow(antibiotics) + nrow(antivirals), big.mark = ",")` Antimicrobials @@ -174,7 +174,7 @@ catalogue_of_life <- list( #' Data Set with `r format(nrow(example_isolates), big.mark = ",")` Example Isolates #' -#' A data set containing `r format(nrow(example_isolates), big.mark = ",")` microbial isolates with their full antibiograms. The data set reflects reality and can be used to practice AMR analysis. For examples, please read [the tutorial on our website](https://msberends.github.io/AMR/articles/AMR.html). +#' A data set containing `r format(nrow(example_isolates), big.mark = ",")` microbial isolates with their full antibiograms. The data set reflects reality and can be used to practice AMR data analysis. For examples, please read [the tutorial on our website](https://msberends.github.io/AMR/articles/AMR.html). #' @format A [data.frame] with `r format(nrow(example_isolates), big.mark = ",")` observations and `r ncol(example_isolates)` variables: #' - `date`\cr date of receipt at the laboratory #' - `hospital_id`\cr ID of the hospital, from A to D @@ -192,7 +192,7 @@ catalogue_of_life <- list( #' Data Set with Unclean Data #' -#' A data set containing `r format(nrow(example_isolates_unclean), big.mark = ",")` microbial isolates that are not cleaned up and consequently not ready for AMR analysis. This data set can be used for practice. +#' A data set containing `r format(nrow(example_isolates_unclean), big.mark = ",")` microbial isolates that are not cleaned up and consequently not ready for AMR data analysis. This data set can be used for practice. #' @format A [data.frame] with `r format(nrow(example_isolates_unclean), big.mark = ",")` observations and `r ncol(example_isolates_unclean)` variables: #' - `patient_id`\cr ID of the patient #' - `date`\cr date of receipt at the laboratory diff --git a/R/deprecated.R b/R/deprecated.R index 260accf9..b4b1cbeb 100755 --- a/R/deprecated.R +++ b/R/deprecated.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Deprecated Functions diff --git a/R/disk.R b/R/disk.R index 1108f111..a849be0a 100644 --- a/R/disk.R +++ b/R/disk.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Transform Input to Disk Diffusion Diameters diff --git a/R/episode.R b/R/episode.R index 17a6d707..940220ae 100644 --- a/R/episode.R +++ b/R/episode.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Determine (New) Episodes for Patients diff --git a/R/eucast_rules.R b/R/eucast_rules.R index 935db54a..569987e9 100755 --- a/R/eucast_rules.R +++ b/R/eucast_rules.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,11 +20,11 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # # add new version numbers here, and add the rules themselves to "data-raw/eucast_rules.tsv" and rsi_translation -# (running "data-raw/internals.R" will process the TSV file) +# (sourcing "data-raw/_internals.R" will process the TSV file) EUCAST_VERSION_BREAKPOINTS <- list("11.0" = list(version_txt = "v11.0", year = 2021, title = "'EUCAST Clinical Breakpoint Tables'", @@ -77,6 +77,7 @@ format_eucast_version_nr <- function(version, markdown = TRUE) { #' @param ... column name of an antibiotic, see section *Antibiotics* below #' @param ab any (vector of) text that can be coerced to a valid antibiotic code with [as.ab()] #' @param administration route of administration, either `r vector_or(dosage$administration)` +#' @param only_rsi_columns a logical to indicate whether only antibiotic columns must be detected that were [transformed to class ``]([rsi]) on beforehand. Defaults to `TRUE` if any column of `x` is of class ``. #' @inheritParams first_isolate #' @details #' **Note:** This function does not translate MIC values to RSI values. Use [as.rsi()] for that. \cr @@ -165,6 +166,7 @@ eucast_rules <- function(x, version_breakpoints = 11.0, version_expertrules = 3.2, ampc_cephalosporin_resistance = NA, + only_rsi_columns = any(is.rsi(x)), ...) { meet_criteria(x, allow_class = "data.frame") meet_criteria(col_mo, allow_class = "character", has_length = 1, is_in = colnames(x), allow_NULL = TRUE) @@ -174,6 +176,7 @@ eucast_rules <- function(x, meet_criteria(version_breakpoints, allow_class = c("numeric", "integer"), has_length = 1, is_in = as.double(names(EUCAST_VERSION_BREAKPOINTS))) meet_criteria(version_expertrules, allow_class = c("numeric", "integer"), has_length = 1, is_in = as.double(names(EUCAST_VERSION_EXPERT_RULES))) meet_criteria(ampc_cephalosporin_resistance, has_length = 1, allow_NA = TRUE, allow_NULL = TRUE, is_in = c("R", "S", "I")) + meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1) x_deparsed <- deparse(substitute(x)) if (length(x_deparsed) > 1 || !all(x_deparsed %like% "[a-z]+")) { @@ -276,6 +279,7 @@ eucast_rules <- function(x, hard_dependencies = NULL, verbose = verbose, info = info, + only_rsi_columns = only_rsi_columns, ...) AMC <- cols_ab["AMC"] @@ -748,7 +752,7 @@ eucast_rules <- function(x, # this allows: eucast_rules(x, eucast_rules_df = AMR:::eucast_rules_file %>% filter(is.na(have_these_values))) eucast_rules_df <- list(...)$eucast_rules_df } else { - # otherwise internal data file, created in data-raw/internals.R + # otherwise internal data file, created in data-raw/_internals.R eucast_rules_df <- eucast_rules_file } diff --git a/R/filter_ab_class.R b/R/filter_ab_class.R index 3db8d924..c9fb2db4 100644 --- a/R/filter_ab_class.R +++ b/R/filter_ab_class.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Filter Isolates on Result in Antimicrobial Class @@ -31,7 +31,8 @@ #' @param ab_class an antimicrobial class, like `"carbapenems"`. The columns `group`, `atc_group1` and `atc_group2` of the [antibiotics] data set will be searched (case-insensitive) for this value. #' @param result an antibiotic result: S, I or R (or a combination of more of them) #' @param scope the scope to check which variables to check, can be `"any"` (default) or `"all"` -#' @param ... previously used when this package still depended on the `dplyr` package, now ignored +#' @param only_rsi_columns a logical to indicate whether only columns must be included that were [transformed to class ``]([rsi]) on beforehand. Defaults to `TRUE` if any column of `x` is of class ``. +#' @param ... arguments passed on to [filter_ab_class()] #' @details All columns of `x` will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.). This means that a filter function like e.g. [filter_aminoglycosides()] will include column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc. #' @rdname filter_ab_class #' @seealso [antibiotic_class_selectors()] for the `select()` equivalent. @@ -81,6 +82,7 @@ filter_ab_class <- function(x, ab_class, result = NULL, scope = "any", + only_rsi_columns = any(is.rsi(x)), ...) { .call_depth <- list(...)$`.call_depth` if (is.null(.call_depth)) { diff --git a/R/first_isolate.R b/R/first_isolate.R index 78b6ad1e..072af442 100755 --- a/R/first_isolate.R +++ b/R/first_isolate.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Determine First (Weighted) Isolates @@ -255,7 +255,7 @@ first_isolate <- function(x, # create original row index x$newvar_row_index <- seq_len(nrow(x)) - x$newvar_mo <- x[, col_mo, drop = TRUE] + x$newvar_mo <- as.mo(x[, col_mo, drop = TRUE]) x$newvar_genus_species <- paste(mo_genus(x$newvar_mo), mo_species(x$newvar_mo)) x$newvar_date <- x[, col_date, drop = TRUE] x$newvar_patient_id <- x[, col_patient_id, drop = TRUE] diff --git a/R/g.test.R b/R/g.test.R index 2a4f1e6e..ca9bc6e6 100755 --- a/R/g.test.R +++ b/R/g.test.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' *G*-test for Count Data diff --git a/R/ggplot_pca.R b/R/ggplot_pca.R index 7671cc1a..b93bb323 100755 --- a/R/ggplot_pca.R +++ b/R/ggplot_pca.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' PCA Biplot with `ggplot2` diff --git a/R/ggplot_rsi.R b/R/ggplot_rsi.R index ced70105..a53357fc 100755 --- a/R/ggplot_rsi.R +++ b/R/ggplot_rsi.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,12 +20,12 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' AMR Plots with `ggplot2` #' -#' Use these functions to create bar plots for antimicrobial resistance analysis. All functions rely on [ggplot2][ggplot2::ggplot()] functions. +#' Use these functions to create bar plots for AMR data analysis. All functions rely on [ggplot2][ggplot2::ggplot()] functions. #' @inheritSection lifecycle Maturing Lifecycle #' @param data a [data.frame] with column(s) of class [`rsi`] (see [as.rsi()]) #' @param position position adjustment of bars, either `"fill"`, `"stack"` or `"dodge"` diff --git a/R/globals.R b/R/globals.R index 85d0c598..b47f70d5 100755 --- a/R/globals.R +++ b/R/globals.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # globalVariables(c(".rowid", diff --git a/R/guess_ab_col.R b/R/guess_ab_col.R index a48b72ab..a804532f 100755 --- a/R/guess_ab_col.R +++ b/R/guess_ab_col.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Guess Antibiotic Column @@ -30,6 +30,7 @@ #' @param x a [data.frame] #' @param search_string a text to search `x` for, will be checked with [as.ab()] if this value is not a column in `x` #' @param verbose a logical to indicate whether additional info should be printed +#' @param only_rsi_columns a logical to indicate whether only antibiotic columns must be detected that were [transformed to class ``]([rsi]) on beforehand. Defaults to `TRUE` if any column of `x` is of class ``. #' @details You can look for an antibiotic (trade) name or abbreviation and it will search `x` and the [antibiotics] data set for any column containing a name or code of that antibiotic. **Longer columns names take precedence over shorter column names.** #' @return A column name of `x`, or `NULL` when no result is found. #' @export @@ -62,35 +63,20 @@ #' AMP_ED20 = "S") #' guess_ab_col(df, "ampicillin") #' # [1] "AMP_ED20" -guess_ab_col <- function(x = NULL, search_string = NULL, verbose = FALSE) { +guess_ab_col <- function(x = NULL, search_string = NULL, verbose = FALSE, only_rsi_columns = any(is.rsi(x))) { meet_criteria(x, allow_class = "data.frame", allow_NULL = TRUE) meet_criteria(search_string, allow_class = "character", has_length = 1, allow_NULL = TRUE) meet_criteria(verbose, allow_class = "logical", has_length = 1) if (is.null(x) & is.null(search_string)) { return(as.name("guess_ab_col")) + } else { + meet_criteria(search_string, allow_class = "character", has_length = 1, allow_NULL = FALSE) } - if (search_string %in% colnames(x)) { - ab_result <- search_string - } else { - search_string.ab <- suppressWarnings(as.ab(search_string)) - if (search_string.ab %in% colnames(x)) { - ab_result <- colnames(x)[colnames(x) == search_string.ab][1L] - - } else if (any(tolower(colnames(x)) %in% tolower(unlist(ab_property(search_string.ab, "abbreviations", language = NULL))))) { - ab_result <- colnames(x)[tolower(colnames(x)) %in% tolower(unlist(ab_property(search_string.ab, "abbreviations", language = NULL)))][1L] - - } else { - # sort colnames on length - longest first - cols <- colnames(x[, x %pm>% colnames() %pm>% nchar() %pm>% order() %pm>% rev()]) - df_trans <- data.frame(cols = cols, - abs = suppressWarnings(as.ab(cols)), - stringsAsFactors = FALSE) - ab_result <- df_trans[which(df_trans$abs == search_string.ab), "cols"] - ab_result <- ab_result[!is.na(ab_result)][1L] - } - } + all_found <- get_column_abx(x, info = verbose, only_rsi_columns = only_rsi_columns, verbose = verbose) + search_string.ab <- suppressWarnings(as.ab(search_string)) + ab_result <- unname(all_found[names(all_found) == search_string.ab]) if (length(ab_result) == 0) { if (verbose == TRUE) { @@ -114,18 +100,24 @@ get_column_abx <- function(x, hard_dependencies = NULL, verbose = FALSE, info = TRUE, + only_rsi_columns = FALSE, ...) { meet_criteria(x, allow_class = "data.frame") meet_criteria(soft_dependencies, allow_class = "character", allow_NULL = TRUE) meet_criteria(hard_dependencies, allow_class = "character", allow_NULL = TRUE) meet_criteria(verbose, allow_class = "logical", has_length = 1) meet_criteria(info, allow_class = "logical", has_length = 1) + meet_criteria(only_rsi_columns, allow_class = "logical", has_length = 1) if (info == TRUE) { message_("Auto-guessing columns suitable for analysis", appendLF = FALSE, as_note = FALSE) } x <- as.data.frame(x, stringsAsFactors = FALSE) + if (only_rsi_columns == TRUE) { + x <- x[, which(is.rsi(x)), drop = FALSE] + } + if (NROW(x) > 10000) { # only test maximum of 10,000 values per column if (info == TRUE) { @@ -141,21 +133,23 @@ get_column_abx <- function(x, # only check columns that are a valid AB code, ATC code, name, abbreviation or synonym, # or already have the class (as.rsi) # and that they have no more than 50% invalid values - vectr_antibiotics <- unique(toupper(unlist(antibiotics[, c("ab", "atc", "name", "abbreviations", "synonyms")]))) + vectr_antibiotics <- unlist(AB_lookup$generalised_all) vectr_antibiotics <- vectr_antibiotics[!is.na(vectr_antibiotics) & nchar(vectr_antibiotics) >= 3] - x_columns <- vapply(FUN.VALUE = character(1), colnames(x), function(col, df = x) { - if (toupper(col) %in% vectr_antibiotics || - is.rsi(x[, col, drop = TRUE]) || - is.rsi.eligible(x[, col, drop = TRUE], threshold = 0.5) - ) { - return(col) - } else { - return(NA_character_) - } - }) + x_columns <- vapply(FUN.VALUE = character(1), + colnames(x), + function(col, df = x) { + if (generalise_antibiotic_name(col) %in% vectr_antibiotics || + is.rsi(x[, col, drop = TRUE]) || + is.rsi.eligible(x[, col, drop = TRUE], threshold = 0.5) + ) { + return(col) + } else { + return(NA_character_) + } + }) x_columns <- x_columns[!is.na(x_columns)] - x <- x[, x_columns, drop = FALSE] # without drop = TRUE, x will become a vector when x_columns is length 1 + x <- x[, x_columns, drop = FALSE] # without drop = FALSE, x will become a vector when x_columns is length 1 df_trans <- data.frame(colnames = colnames(x), abcode = suppressWarnings(as.ab(colnames(x), info = FALSE)), stringsAsFactors = FALSE) @@ -164,7 +158,7 @@ get_column_abx <- function(x, names(x) <- df_trans$abcode # add from self-defined dots (...): - # such as get_column_abx(example_isolates %pm>% rename(thisone = AMX), amox = "thisone") + # such as get_column_abx(example_isolates %>% rename(thisone = AMX), amox = "thisone") dots <- list(...) if (length(dots) > 0) { newnames <- suppressWarnings(as.ab(names(dots), info = FALSE)) diff --git a/R/isolate_identifier.R b/R/isolate_identifier.R index 84bc8323..1b9afe80 100644 --- a/R/isolate_identifier.R +++ b/R/isolate_identifier.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Create Identifier of an Isolate diff --git a/R/join_microorganisms.R b/R/join_microorganisms.R index 4a5d4d19..4b570bd8 100755 --- a/R/join_microorganisms.R +++ b/R/join_microorganisms.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Join [microorganisms] to a Data Set diff --git a/R/key_antibiotics.R b/R/key_antibiotics.R index 1d884bba..ad8304d7 100755 --- a/R/key_antibiotics.R +++ b/R/key_antibiotics.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Key Antibiotics for First (Weighted) Isolates @@ -234,8 +234,9 @@ key_antibiotics <- function(x, GramPos_4, GramPos_5, GramPos_6) gram_positive <- gram_positive[!is.null(gram_positive)] gram_positive <- gram_positive[!is.na(gram_positive)] - if (length(gram_positive) < 12) { + if (length(gram_positive) < 12 & message_not_thrown_before("key_antibiotics.grampos")) { warning_("Only using ", length(gram_positive), " different antibiotics as key antibiotics for Gram-positives. See ?key_antibiotics.", call = FALSE) + remember_thrown_message("key_antibiotics.grampos") } gram_negative <- c(universal, @@ -243,8 +244,9 @@ key_antibiotics <- function(x, GramNeg_4, GramNeg_5, GramNeg_6) gram_negative <- gram_negative[!is.null(gram_negative)] gram_negative <- gram_negative[!is.na(gram_negative)] - if (length(gram_negative) < 12) { + if (length(gram_negative) < 12 & message_not_thrown_before("key_antibiotics.gramneg")) { warning_("Only using ", length(gram_negative), " different antibiotics as key antibiotics for Gram-negatives. See ?key_antibiotics.", call = FALSE) + remember_thrown_message("key_antibiotics.gramneg") } x <- as.data.frame(x, stringsAsFactors = FALSE) diff --git a/R/kurtosis.R b/R/kurtosis.R index 8fb5eb1e..80607bf5 100755 --- a/R/kurtosis.R +++ b/R/kurtosis.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Kurtosis of the Sample diff --git a/R/lifecycle.R b/R/lifecycle.R index d58774c0..68483bbc 100644 --- a/R/lifecycle.R +++ b/R/lifecycle.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # ############### diff --git a/R/like.R b/R/like.R index ea6ec6ee..9a7dae52 100755 --- a/R/like.R +++ b/R/like.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Pattern Matching with Keyboard Shortcut diff --git a/R/mdro.R b/R/mdro.R index 7b3b1dbb..1b89bd6e 100755 --- a/R/mdro.R +++ b/R/mdro.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Determine Multidrug-Resistant Organisms (MDRO) @@ -153,6 +153,7 @@ mdro <- function(x, pct_required_classes = 0.5, combine_SI = TRUE, verbose = FALSE, + only_rsi_columns = any(is.rsi(x)), ...) { if (missing(x)) { x <- get_current_data(arg_name = "x", call = -2) @@ -432,6 +433,7 @@ mdro <- function(x, "MNO"), verbose = verbose, info = info, + only_rsi_columns = only_rsi_columns, ...) } else if (guideline$code == "eucast3.2") { cols_ab <- get_column_abx(x = x, @@ -457,8 +459,9 @@ mdro <- function(x, "TOB", "TZD", "VAN"), - info = info, verbose = verbose, + info = info, + only_rsi_columns = only_rsi_columns, ...) } else if (guideline$code == "tb") { cols_ab <- get_column_abx(x = x, @@ -470,8 +473,9 @@ mdro <- function(x, "RIF", "RIB", "RFP"), - info = info, verbose = verbose, + info = info, + only_rsi_columns = only_rsi_columns, ...) } else if (guideline$code == "mrgn") { cols_ab <- get_column_abx(x = x, @@ -483,11 +487,13 @@ mdro <- function(x, "CIP"), verbose = verbose, info = info, + only_rsi_columns = only_rsi_columns, ...) } else { cols_ab <- get_column_abx(x = x, verbose = verbose, info = info, + only_rsi_columns = only_rsi_columns, ...) } @@ -1509,55 +1515,55 @@ run_custom_mdro_guideline <- function(df, guideline) { #' @rdname mdro #' @export -brmo <- function(x, guideline = "BRMO", ...) { +brmo <- function(x, guideline = "BRMO", only_rsi_columns = any(is.rsi(x)), ...) { if (missing(x)) { x <- get_current_data(arg_name = "x", call = -2) } meet_criteria(x, allow_class = "data.frame") meet_criteria(guideline, allow_class = "character", has_length = 1) - mdro(x, guideline = "BRMO", ...) + mdro(x, guideline = "BRMO", only_rsi_columns = only_rsi_columns, ...) } #' @rdname mdro #' @export -mrgn <- function(x, guideline = "MRGN", ...) { +mrgn <- function(x, guideline = "MRGN", only_rsi_columns = any(is.rsi(x)), ...) { if (missing(x)) { x <- get_current_data(arg_name = "x", call = -2) } meet_criteria(x, allow_class = "data.frame") meet_criteria(guideline, allow_class = "character", has_length = 1) - mdro(x = x, guideline = "MRGN", ...) + mdro(x = x, guideline = "MRGN", only_rsi_columns = only_rsi_columns, ...) } #' @rdname mdro #' @export -mdr_tb <- function(x, guideline = "TB", ...) { +mdr_tb <- function(x, guideline = "TB", only_rsi_columns = any(is.rsi(x)), ...) { if (missing(x)) { x <- get_current_data(arg_name = "x", call = -2) } meet_criteria(x, allow_class = "data.frame") meet_criteria(guideline, allow_class = "character", has_length = 1) - mdro(x = x, guideline = "TB", ...) + mdro(x = x, guideline = "TB", only_rsi_columns = only_rsi_columns, ...) } #' @rdname mdro #' @export -mdr_cmi2012 <- function(x, guideline = "CMI2012", ...) { +mdr_cmi2012 <- function(x, guideline = "CMI2012", only_rsi_columns = any(is.rsi(x)), ...) { if (missing(x)) { x <- get_current_data(arg_name = "x", call = -2) } meet_criteria(x, allow_class = "data.frame") meet_criteria(guideline, allow_class = "character", has_length = 1) - mdro(x = x, guideline = "CMI2012", ...) + mdro(x = x, guideline = "CMI2012", only_rsi_columns = only_rsi_columns, ...) } #' @rdname mdro #' @export -eucast_exceptional_phenotypes <- function(x, guideline = "EUCAST", ...) { +eucast_exceptional_phenotypes <- function(x, guideline = "EUCAST", only_rsi_columns = any(is.rsi(x)), ...) { if (missing(x)) { x <- get_current_data(arg_name = "x", call = -2) } meet_criteria(x, allow_class = "data.frame") meet_criteria(guideline, allow_class = "character", has_length = 1) - mdro(x = x, guideline = "EUCAST", ...) + mdro(x = x, guideline = "EUCAST", only_rsi_columns = only_rsi_columns, ...) } diff --git a/R/mic.R b/R/mic.R index e418869e..b6424a01 100755 --- a/R/mic.R +++ b/R/mic.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Transform Input to Minimum Inhibitory Concentrations (MIC) diff --git a/R/mo.R b/R/mo.R index 3af64393..470db247 100755 --- a/R/mo.R +++ b/R/mo.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Transform Input to a Microorganism ID diff --git a/R/mo_matching_score.R b/R/mo_matching_score.R index ac1774de..93ae2a2a 100755 --- a/R/mo_matching_score.R +++ b/R/mo_matching_score.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Calculate the Matching Score for Microorganisms diff --git a/R/mo_property.R b/R/mo_property.R index 64dc44f8..ab4c9ba5 100755 --- a/R/mo_property.R +++ b/R/mo_property.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Get Properties of a Microorganism diff --git a/R/mo_source.R b/R/mo_source.R index ff4a74e8..183338db 100644 --- a/R/mo_source.R +++ b/R/mo_source.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' User-Defined Reference Data Set for Microorganisms diff --git a/R/pca.R b/R/pca.R index 41b0cecb..be185d8f 100755 --- a/R/pca.R +++ b/R/pca.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Principal Component Analysis (for AMR) diff --git a/R/proportion.R b/R/proportion.R index 8dee2e06..7a00cd2f 100755 --- a/R/proportion.R +++ b/R/proportion.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Calculate Microbial Resistance diff --git a/R/random.R b/R/random.R index 67e94fd6..96684387 100644 --- a/R/random.R +++ b/R/random.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,12 +20,12 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Random MIC Values/Disk Zones/RSI Generation #' -#' These functions can be used for generating random MIC values and disk diffusion diameters, for AMR analysis practice. +#' These functions can be used for generating random MIC values and disk diffusion diameters, for AMR data analysis practice. #' @inheritSection lifecycle Maturing Lifecycle #' @param size desired size of the returned vector #' @param mo any character that can be coerced to a valid microorganism code with [as.mo()] diff --git a/R/resistance_predict.R b/R/resistance_predict.R index bf10a778..6dabf08f 100755 --- a/R/resistance_predict.R +++ b/R/resistance_predict.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Predict antimicrobial resistance diff --git a/R/rsi.R b/R/rsi.R index 16f050f6..7957f643 100755 --- a/R/rsi.R +++ b/R/rsi.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Interpret MIC and Disk Values, or Clean Raw R/SI Data @@ -78,6 +78,8 @@ #' The repository of this package [contains a machine-readable version](https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt) of all guidelines. This is a CSV file consisting of `r format(nrow(AMR::rsi_translation), big.mark = ",")` rows and `r ncol(AMR::rsi_translation)` columns. This file is machine-readable, since it contains one row for every unique combination of the test method (MIC or disk diffusion), the antimicrobial agent and the microorganism. **This allows for easy implementation of these rules in laboratory information systems (LIS)**. Note that it only contains interpretation guidelines for humans - interpretation guidelines from CLSI for animals were removed. #' #' ## Other +#' +#' The function [is.rsi()] detects if the input contains class ``. If the input is a data.frame, it returns a vector in which all columns are checked for this class. #' #' The function [is.rsi.eligible()] returns `TRUE` when a columns contains at most 5% invalid antimicrobial interpretations (not S and/or I and/or R), and `FALSE` otherwise. The threshold of 5% can be set with the `threshold` argument. #' @section Interpretation of R and S/I: @@ -91,7 +93,7 @@ #' A microorganism is categorised as *Susceptible, Increased exposure* when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection. #' #' This AMR package honours this new insight. Use [susceptibility()] (equal to [proportion_SI()]) to determine antimicrobial susceptibility and [count_susceptible()] (equal to [count_SI()]) to count susceptible isolates. -#' @return Ordered [factor] with new class [`rsi`] +#' @return Ordered factor with new class `` #' @aliases rsi #' @export #' @seealso [as.mic()], [as.disk()], [as.mo()] @@ -189,7 +191,11 @@ as.rsi <- function(x, ...) { #' @rdname as.rsi #' @export is.rsi <- function(x) { - inherits(x, "rsi") + if (inherits(x, "data.frame")) { + unname(vapply(FUN.VALUE = logical(1), x, is.rsi)) + } else { + inherits(x, "rsi") + } } #' @rdname as.rsi @@ -198,8 +204,7 @@ is.rsi.eligible <- function(x, threshold = 0.05) { meet_criteria(threshold, allow_class = "numeric", has_length = 1) stop_if(NCOL(x) > 1, "`x` must be a one-dimensional vector.") - if (any(c("logical", - "numeric", + if (any(c("numeric", "integer", "mo", "ab", @@ -213,13 +218,26 @@ is.rsi.eligible <- function(x, threshold = 0.05) { %in% class(x))) { # no transformation needed return(FALSE) - } else if (!any(c("R", "S", "I") %in% x, na.rm = TRUE)) { + } else if (all(x %in% c("R", "S", "I", NA)) & !all(is.na(x))) { + return(TRUE) + } else if (!any(c("R", "S", "I") %in% x, na.rm = TRUE) & !all(is.na(x))) { return(FALSE) } else { - x <- x[!is.na(x) & !is.null(x) & !identical(x, "")] + x <- x[!is.na(x) & !is.null(x) & x != ""] if (length(x) == 0) { + # no other values than NA or "" + cur_col <- get_current_column() + if (!is.null(cur_col)) { + ab <- suppressWarnings(as.ab(cur_col, fast_mode = TRUE, info = FALSE)) + if (!is.na(ab)) { + # this is a valid antibiotic code + return(TRUE) + } + } + # all values empty and no antibiotic col name - return FALSE return(FALSE) } + # transform all values and see if it meets the set threshold checked <- suppressWarnings(as.rsi(x)) outcome <- sum(is.na(checked)) / length(x) outcome <= threshold diff --git a/R/rsi_calc.R b/R/rsi_calc.R index 3b1d52c1..9551cb63 100755 --- a/R/rsi_calc.R +++ b/R/rsi_calc.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # dots2vars <- function(...) { diff --git a/R/rsi_df.R b/R/rsi_df.R index 47b75277..5b9f6298 100644 --- a/R/rsi_df.R +++ b/R/rsi_df.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' @rdname proportion diff --git a/R/skewness.R b/R/skewness.R index e23ca19a..1a36086f 100755 --- a/R/skewness.R +++ b/R/skewness.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Skewness of the Sample diff --git a/R/sysdata.rda b/R/sysdata.rda index 229b38ad..9dccb9eb 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/R/translate.R b/R/translate.R index 59a08611..77657278 100755 --- a/R/translate.R +++ b/R/translate.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' Translate Strings from AMR Package diff --git a/R/whocc.R b/R/whocc.R index 590843ba..af27dc70 100755 --- a/R/whocc.R +++ b/R/whocc.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # #' WHOCC: WHO Collaborating Centre for Drug Statistics Methodology diff --git a/R/zzz.R b/R/zzz.R index 577d377f..fcf4fb97 100755 --- a/R/zzz.R +++ b/R/zzz.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # # set up package environment, used by numerous AMR functions diff --git a/_pkgdown.yml b/_pkgdown.yml index 8def1198..4dbc9a19 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # title: "AMR (for R)" diff --git a/codecov.yml b/codecov.yml index f11d6d58..bd222069 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # codecov: diff --git a/data-raw/AMR_1.5.0.9013.tar.gz b/data-raw/AMR_1.5.0.9014.tar.gz similarity index 61% rename from data-raw/AMR_1.5.0.9013.tar.gz rename to data-raw/AMR_1.5.0.9014.tar.gz index edcf021a..55cd27c8 100644 Binary files a/data-raw/AMR_1.5.0.9013.tar.gz and b/data-raw/AMR_1.5.0.9014.tar.gz differ diff --git a/data-raw/internals.R b/data-raw/_internals.R similarity index 94% rename from data-raw/internals.R rename to data-raw/_internals.R index 10203ebc..bf3f6b42 100644 --- a/data-raw/internals.R +++ b/data-raw/_internals.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,11 +20,11 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # # Run this file to update the package using: -# source("data-raw/internals.R") +# source("data-raw/_internals.R") library(dplyr, warn.conflicts = FALSE) devtools::load_all(quiet = TRUE) @@ -74,6 +74,15 @@ create_AB_lookup <- function() { AB_lookup$generalised_synonyms <- lapply(AB_lookup$synonyms, generalise_antibiotic_name) AB_lookup$generalised_abbreviations <- lapply(AB_lookup$abbreviations, generalise_antibiotic_name) AB_lookup$generalised_loinc <- lapply(AB_lookup$loinc, generalise_antibiotic_name) + AB_lookup$generalised_all <- unname(lapply(as.list(as.data.frame(t(AB_lookup[, + c("ab", "atc", "cid", "name", + colnames(AB_lookup)[colnames(AB_lookup) %like% "generalised"]), + drop = FALSE]), + stringsAsFactors = FALSE)), + function(x) { + x <- generalise_antibiotic_name(unname(unlist(x))) + x[x != ""] + })) AB_lookup } diff --git a/data-raw/loinc.R b/data-raw/loinc.R index 1418ad46..e621807c 100644 --- a/data-raw/loinc.R +++ b/data-raw/loinc.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # # last updated: 20 January 2020 - Loinc_2.67 diff --git a/data-raw/poorman_prepend.R b/data-raw/poorman_prepend.R index 63dc72d3..44a2039a 100644 --- a/data-raw/poorman_prepend.R +++ b/data-raw/poorman_prepend.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # # ------------------------------------------------ diff --git a/data-raw/read_EUCAST.R b/data-raw/read_EUCAST.R index b1864914..d0a414dd 100644 --- a/data-raw/read_EUCAST.R +++ b/data-raw/read_EUCAST.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # library(openxlsx) diff --git a/data-raw/reproduction_of_antibiotics.R b/data-raw/reproduction_of_antibiotics.R index d0673bec..1bc4bac9 100644 --- a/data-raw/reproduction_of_antibiotics.R +++ b/data-raw/reproduction_of_antibiotics.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # library(dplyr) diff --git a/data-raw/reproduction_of_antivirals.R b/data-raw/reproduction_of_antivirals.R index d4ec92c9..c21b189e 100644 --- a/data-raw/reproduction_of_antivirals.R +++ b/data-raw/reproduction_of_antivirals.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # # get all data from the WHOCC website diff --git a/data-raw/reproduction_of_dosage.R b/data-raw/reproduction_of_dosage.R index 1b798694..2a0454f0 100644 --- a/data-raw/reproduction_of_dosage.R +++ b/data-raw/reproduction_of_dosage.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # library(dplyr) diff --git a/data-raw/reproduction_of_example_isolates_unclean.R b/data-raw/reproduction_of_example_isolates_unclean.R index ab0077a7..60e25729 100644 --- a/data-raw/reproduction_of_example_isolates_unclean.R +++ b/data-raw/reproduction_of_example_isolates_unclean.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # patients <- unlist(lapply(LETTERS, paste0, 1:10)) diff --git a/data-raw/reproduction_of_intrinsic_resistant.R b/data-raw/reproduction_of_intrinsic_resistant.R index 13b25c4a..bfc65beb 100644 --- a/data-raw/reproduction_of_intrinsic_resistant.R +++ b/data-raw/reproduction_of_intrinsic_resistant.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # library(AMR) diff --git a/data-raw/reproduction_of_microorganisms.R b/data-raw/reproduction_of_microorganisms.R index 653e14b2..88487ee2 100644 --- a/data-raw/reproduction_of_microorganisms.R +++ b/data-raw/reproduction_of_microorganisms.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # # Reproduction of the `microorganisms` data set @@ -925,7 +925,7 @@ usethis::use_data(rsi_translation, overwrite = TRUE, version = 2) usethis::use_data(microorganisms.codes, overwrite = TRUE, version = 2) saveRDS(microorganisms.translation, file = "data-raw/microorganisms.translation.rds", version = 2) # to save microorganisms.translation internally to the package -source("data-raw/internals.R") +source("data-raw/_internals.R") # load new data sets again devtools::load_all(".") diff --git a/data-raw/snomed.R b/data-raw/snomed.R index cb348dcc..813be5f8 100644 --- a/data-raw/snomed.R +++ b/data-raw/snomed.R @@ -1,6 +1,6 @@ # ==================================================================== # # TITLE # -# Antimicrobial Resistance (AMR) Analysis for R # +# Antimicrobial Resistance (AMR) Data Analysis for R # # # # SOURCE # # https://github.com/msberends/AMR # @@ -20,7 +20,7 @@ # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # # # # Visit our website for the full manual and a complete tutorial about # -# how to conduct AMR analysis: https://msberends.github.io/AMR/ # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # library(AMR) diff --git a/docs/404.html b/docs/404.html index 0f1ac301..a100be89 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ AMR (for R) - 1.5.0.9013 + 1.5.0.9014 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index cc03837b..e08b08e7 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.5.0.9013 + 1.5.0.9014 diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html index 2386ed8a..ab846bbf 100644 --- a/docs/articles/AMR.html +++ b/docs/articles/AMR.html @@ -5,7 +5,7 @@ -How to conduct AMR analysis • AMR (for R) +How to conduct AMR data analysis • AMR (for R) @@ -18,7 +18,7 @@ - + @@ -18,7 +18,7 @@ - + AMR (for R) - 1.5.0.9013 + 1.5.0.9014 @@ -205,7 +205,7 @@ Since you are one of our users, we would like to know how you use the package an

What is AMR (for R)?

-

(To find out how to conduct AMR analysis, please continue reading here to get started.)

+

(To find out how to conduct AMR data analysis, please continue reading here to get started.)

AMR is a free, open-source and independent R package to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. Our aim is to provide a standard for clean and reproducible antimicrobial resistance data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.

After installing this package, R knows ~70,000 distinct microbial species and all ~550 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-NET, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.

This package is fully independent of any other R package and works on Windows, macOS and Linux with all versions of R since R-3.0.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen, in collaboration with non-profit organisations Certe Medical Diagnostics and Advice and University Medical Center Groningen. This R package is actively maintained and is free software (see Copyright).

@@ -361,7 +361,7 @@ Since you are one of our users, we would like to know how you use the package an
  • Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the Catalogue of Life and List of Prokaryotic names with Standing in Nomenclature (manual)
  • Interpreting raw MIC and disk diffusion values, based on the latest CLSI or EUCAST guidelines (manual)
  • Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records (manual)
  • -
  • Determining first isolates to be used for AMR analysis (manual)
  • +
  • Determining first isolates to be used for AMR data analysis (manual)
  • Calculating antimicrobial resistance (tutorial)
  • Determining multi-drug resistance (MDR) / multi-drug resistant organisms (MDRO) (tutorial)
  • Calculating (empirical) susceptibility of both mono therapy and combination therapies (tutorial)
  • @@ -402,7 +402,7 @@ Since you are one of our users, we would like to know how you use the package an

    Get started

    -

    To find out how to conduct AMR analysis, please continue reading here to get started or click the links in the ‘How to’ menu.

    +

    To find out how to conduct AMR data analysis, please continue reading here to get started or click the links in the ‘How to’ menu.

    @@ -468,7 +468,7 @@ Since you are one of our users, we would like to know how you use the package an
  • Aside from this website with many tutorials, the package itself contains extensive help pages with many examples for all functions.
  • The package also contains example data sets:
      -
    • The example_isolates data set. This data set contains 2,000 microbial isolates with their full antibiograms. It reflects reality and can be used to practice AMR analysis.
    • +
    • The example_isolates data set. This data set contains 2,000 microbial isolates with their full antibiograms. It reflects reality and can be used to practice AMR data analysis.
    • The WHONET data set. This data set only contains fake data, but with the exact same structure as files exported by WHONET. Read more about WHONET on its tutorial page.
  • diff --git a/docs/news/index.html b/docs/news/index.html index cf3cddf5..cfcd19f4 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.5.0.9013 + 1.5.0.9014

    @@ -236,14 +236,39 @@ Source: NEWS.md
    -
    -

    -AMR 1.5.0.9013 Unreleased +
    +

    +AMR 1.5.0.9014 Unreleased

    -
    +

    -Last updated: 28 January 2021 +Last updated: 2 February 2021

    +
    +

    +Breaking

    +
      +
    • +

      Functions that are applied to a data set containing antibiotic columns gained the argument only_rsi_columns, which defaults to TRUE if any of the columns are of class <rsi> (i.e., transformed with as.rsi()). This increases reliability of automatic determination of antibiotic columns (so only columns that are defined to be <rsi> will be affected).

      +

      This change might invalidate existing code. But since the new argument always returns FALSE when no <rsi> column can be found in the data, this chance is low.

      +

      Affected functions are:

      + +

      You can quickly transform all your eligible columns using either:

      +
      +
      +library(dplyr)
      +your_date %>% mutate_if(is.rsi.eligible, as.rsi)        # old dplyr
      +your_date %>% mutate(across((is.rsi.eligible), as.rsi)) # new dplyr
      +
    • +
    +

    New

    @@ -255,7 +280,7 @@
  • Function isolate_identifier(), which will paste a microorganism code with all antimicrobial results of a data set into one string for each row. This is useful to compare isolates, e.g. between institutions or regions, when there is no genotyping available.

  • Function mo_is_yeast(), which determines whether a microorganism is a member of the taxonomic class Saccharomycetes or the taxonomic order Saccharomycetales:

    -
    +
     
     mo_kingdom(c("Aspergillus", "Candida"))
     #> [1] "Fungi" "Fungi"
    @@ -267,7 +292,7 @@
     example_isolates[which(mo_is_yeast()), ]   # base R
     example_isolates %>% filter(mo_is_yeast()) # dplyr

    The mo_type() function has also been updated to reflect this change:

    -
    +
     
     mo_type(c("Aspergillus", "Candida"))
     # [1] "Fungi"  "Yeasts"
    @@ -280,6 +305,8 @@
     

    Changed

      +
    • +is.rsi() now returns a vector of TRUE/FALSE when the input is a data set, in case it will iterate over all columns
    • Using functions without setting a data set (e.g., mo_is_gram_negative(), mo_is_gram_positive(), mo_is_intrinsic_resistant(), first_isolate(), mdro()) now work with dplyrs group_by() again
    • Updated the data set microorganisms.codes (which contains popular LIS and WHONET codes for microorganisms) for some species of Mycobacterium that previously incorrectly returned M. africanum
    • @@ -287,12 +314,14 @@
    • WHONET code "PNV" will now correctly be interpreted as PHN, the antibiotic code for phenoxymethylpenicillin (‘peni V’)
    • Fix for verbose output of mdro(..., verbose = TRUE) for German guideline (3MGRN and 4MGRN) and Dutch guideline (BRMO, only P. aeruginosa)
    • -is.rsi.eligible() now returns FALSE immediately if the input does not contain any of the values “R”, “S” or “I”. This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns.
    • +is.rsi.eligible() now detects if the column name resembles an antibiotic name or code and now returns TRUE immediately if the input contains any of the values “R”, “S” or “I”. This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns.
    • Functions get_episode() and is_new_episode() now support less than a day as value for argument episode_days (e.g., to include one patient/test per hour)
    • Argument ampc_cephalosporin_resistance in eucast_rules() now also applies to value “I” (not only “S”)
    • Updated colours of values R, S and I in tibble printing
    • Functions print() and summary() on a Principal Components Analysis object (pca()) now print additional group info if the original data was grouped using dplyr::group_by()
    • +
    • Improved speed of guess_ab_col() +
    @@ -300,7 +329,7 @@ Other
    • Big documentation updates
    • -
    • Loading the package (i.e., library(AMR)) now is ~50 times faster than before, in costs of package size (increased with ~3 MB)
    • +
    • Loading the package (i.e., library(AMR)) now is ~50 times faster than before, in costs of package size (which increased by ~3 MB)
    @@ -315,7 +344,7 @@ -
    +
     
     # to select first isolates that are Gram-negative 
     # and view results of cephalosporins and aminoglycosides:
    @@ -381,7 +410,7 @@
     
     
  • For antibiotic selection functions (such as cephalosporins(), aminoglycosides()) to select columns based on a certain antibiotic group, the dependency on the tidyselect package was removed, meaning that they can now also be used without the need to have this package installed and now also work in base R function calls (they rely on R 3.2 or later):

    -
    +
     
     # above example in base R:
     example_isolates[which(first_isolate() & mo_is_gram_negative()),
    @@ -432,7 +461,7 @@
     
  • 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?

    -
    +
     
     library(AMR)
     library(dplyr)
    @@ -455,7 +484,7 @@
     
    • Support for using dplyr’s across() to interpret MIC values or disk zone diameters, which also automatically determines the column with microorganism names or codes.

      -
      +
       
       # until dplyr 1.0.0
       your_data %>% mutate_if(is.mic, as.rsi)
      @@ -473,7 +502,7 @@
       
    • Added intelligent data cleaning to as.disk(), so numbers can also be extracted from text and decimal numbers will always be rounded up:

      -
      +
       
       as.disk(c("disk zone: 23.4 mm", 23.4))
       #> Class <disk>
      @@ -534,7 +563,7 @@
       
    • Function ab_from_text() to retrieve antimicrobial drug names, doses and forms of administration from clinical texts in e.g. health care records, which also corrects for misspelling since it uses as.ab() internally

    • Tidyverse selection helpers for antibiotic classes, that help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. They can be used in any function that allows selection helpers, like dplyr::select() and tidyr::pivot_longer():

      -
      +
       
       library(dplyr)
       
      @@ -610,9 +639,9 @@
       

      AMR 1.2.0 2020-05-28

      -
      +

      -Breaking

      +Breaking
      • Removed code dependency on all other R packages, making this package fully independent of the development process of others. This is a major code change, but will probably not be noticeable by most users.

        @@ -723,7 +752,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
      • Fixed important floating point error for some MIC comparisons in EUCAST 2020 guideline

      • Interpretation from MIC values (and disk zones) to R/SI can now be used with mutate_at() of the dplyr package:

        -
        +
         
         yourdata %>% 
           mutate_at(vars(antibiotic1:antibiotic25), as.rsi, mo = "E. coli")
        @@ -752,7 +781,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
         
        +eucast_exceptional_phenotypes( + x, + guideline = "EUCAST", + only_rsi_columns = any(is.rsi(x)), + ... +)

        Arguments

        @@ -296,6 +302,10 @@ + + + + @@ -408,7 +418,7 @@ A microorganism is categorised as Susceptible, Increased exposure when -

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        Examples

        mdro(example_isolates, guideline = "EUCAST")
        diff --git a/docs/reference/microorganisms.codes.html b/docs/reference/microorganisms.codes.html
        index dbf9cc23..5407ecad 100644
        --- a/docs/reference/microorganisms.codes.html
        +++ b/docs/reference/microorganisms.codes.html
        @@ -82,7 +82,7 @@
               
               
                 AMR (for R)
        -        1.5.0.9008
        +        1.5.0.9014
               
             
         
        @@ -268,7 +268,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
         
             
         
        -

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        See also

        diff --git a/docs/reference/microorganisms.html b/docs/reference/microorganisms.html index 05c2850a..8b5ac3fc 100644 --- a/docs/reference/microorganisms.html +++ b/docs/reference/microorganisms.html @@ -82,7 +82,7 @@ AMR (for R) - 1.5.0.9008 + 1.5.0.9014 @@ -317,7 +317,7 @@ This package contains the complete taxonomic tree of almost all microorganisms ( -

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        See also

        diff --git a/docs/reference/microorganisms.old.html b/docs/reference/microorganisms.old.html index 7946f46d..00c10218 100644 --- a/docs/reference/microorganisms.old.html +++ b/docs/reference/microorganisms.old.html @@ -82,7 +82,7 @@ AMR (for R) - 1.5.0.9008 + 1.5.0.9014 @@ -274,7 +274,7 @@ This package contains the complete taxonomic tree of almost all microorganisms ( -

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        See also

        diff --git a/docs/reference/mo_matching_score.html b/docs/reference/mo_matching_score.html index 187ea1cd..329388e4 100644 --- a/docs/reference/mo_matching_score.html +++ b/docs/reference/mo_matching_score.html @@ -82,7 +82,7 @@ AMR (for R) - 1.5.0.9008 + 1.5.0.9014 @@ -290,7 +290,7 @@ The lifecycle of this function is stableOn our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        Author

        Matthijs S. Berends

        diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html index 77c4ab8b..cae71a74 100644 --- a/docs/reference/mo_property.html +++ b/docs/reference/mo_property.html @@ -82,7 +82,7 @@ AMR (for R) - 1.5.0.9008 + 1.5.0.9014 @@ -405,7 +405,7 @@ This package contains the complete taxonomic tree of almost all microorganisms ( -

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        See also

        diff --git a/docs/reference/mo_source.html b/docs/reference/mo_source.html index 9315bec1..90eaae79 100644 --- a/docs/reference/mo_source.html +++ b/docs/reference/mo_source.html @@ -83,7 +83,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p AMR (for R) - 1.5.0.9008 + 1.5.0.9014 @@ -342,7 +342,7 @@ The lifecycle of this function is stableOn our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        @@ -321,7 +321,7 @@ The lifecycle of this function is maturing< -

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        Examples

        # `example_isolates` is a data set available in the AMR package.
        diff --git a/docs/reference/plot.html b/docs/reference/plot.html
        index 0fd87849..1857ffd6 100644
        --- a/docs/reference/plot.html
        +++ b/docs/reference/plot.html
        @@ -82,7 +82,7 @@
               
               
                 AMR (for R)
        -        1.5.0.9008
        +        1.5.0.9014
               
             
         
        @@ -368,7 +368,7 @@ The lifecycle of this function is stableOn our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        @@ -387,7 +387,7 @@ A microorganism is categorised as Susceptible, Increased exposure when -

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        See also

        count() to count resistant and susceptible isolates.

        diff --git a/docs/reference/random.html b/docs/reference/random.html index 18d02873..6bfa9f6d 100644 --- a/docs/reference/random.html +++ b/docs/reference/random.html @@ -49,7 +49,7 @@ - + @@ -82,7 +82,7 @@ AMR (for R) - 1.5.0.9008 + 1.5.0.9014 @@ -239,7 +239,7 @@
        -

        These functions can be used for generating random MIC values and disk diffusion diameters, for AMR analysis practice.

        +

        These functions can be used for generating random MIC values and disk diffusion diameters, for AMR data analysis practice.

        random_mic(size, mo = NULL, ab = NULL, ...)
        @@ -290,7 +290,7 @@ The lifecycle of this function is maturing<
         
             
         
        -

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        Examples

        random_mic(100)
        diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html
        index 0d5c3d5f..3f1e5b43 100644
        --- a/docs/reference/resistance_predict.html
        +++ b/docs/reference/resistance_predict.html
        @@ -82,7 +82,7 @@
               
               
                 AMR (for R)
        -        1.5.0.9008
        +        1.5.0.9014
               
             
         
        @@ -388,7 +388,7 @@ A microorganism is categorised as Susceptible, Increased exposure when
         
             
         
        -

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        See also

        The proportion() functions to calculate resistance

        diff --git a/docs/reference/rsi_translation.html b/docs/reference/rsi_translation.html index 2041954a..a37725c4 100644 --- a/docs/reference/rsi_translation.html +++ b/docs/reference/rsi_translation.html @@ -82,7 +82,7 @@ AMR (for R) - 1.5.0.9008 + 1.5.0.9014
        @@ -272,7 +272,7 @@ -

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        See also

        diff --git a/docs/reference/skewness.html b/docs/reference/skewness.html index 175b74fc..d84086dd 100644 --- a/docs/reference/skewness.html +++ b/docs/reference/skewness.html @@ -83,7 +83,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu AMR (for R) - 1.5.0.9008 + 1.5.0.9014 @@ -279,7 +279,7 @@ The lifecycle of this function is stableOn our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        See also

        diff --git a/docs/reference/translate.html b/docs/reference/translate.html index 72c453f7..343ac64c 100644 --- a/docs/reference/translate.html +++ b/docs/reference/translate.html @@ -82,7 +82,7 @@ AMR (for R) - 1.5.0.9008 + 1.5.0.9014 @@ -270,7 +270,7 @@ The lifecycle of this function is stableOn our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        +

        On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

        Examples

        # The 'language' argument of below functions
        diff --git a/docs/survey.html b/docs/survey.html
        index 5cb4fa6f..54032592 100644
        --- a/docs/survey.html
        +++ b/docs/survey.html
        @@ -81,7 +81,7 @@
               
               
                 AMR (for R)
        -        1.5.0.9013
        +        1.5.0.9014
               
             
         
        diff --git a/git_merge.sh b/git_merge.sh
        index bc3645ee..f0c04c46 100755
        --- a/git_merge.sh
        +++ b/git_merge.sh
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         ########################################################################
        diff --git a/git_premaster.sh b/git_premaster.sh
        index a41e7a45..5f1022ea 100755
        --- a/git_premaster.sh
        +++ b/git_premaster.sh
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         ########################################################################
        @@ -118,7 +118,7 @@ echo
         echo "••••••••••••••••••••••••••"
         echo "• Updating internal data •"
         echo "••••••••••••••••••••••••••"
        -Rscript -e "source('data-raw/internals.R')"
        +Rscript -e "source('data-raw/_internals.R')"
         echo
         echo "••••••••••••••••••••"
         echo "• Building package •"
        diff --git a/git_siteonly.sh b/git_siteonly.sh
        index a6874d34..b060753f 100755
        --- a/git_siteonly.sh
        +++ b/git_siteonly.sh
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         ########################################################################
        diff --git a/index.md b/index.md
        index a0da271c..852bfefe 100644
        --- a/index.md
        +++ b/index.md
        @@ -9,7 +9,7 @@
         
         ### What is `AMR` (for R)?
         
        -*(To find out how to conduct AMR analysis, please [continue reading here to get started](./articles/AMR.html).)*
        +*(To find out how to conduct AMR data analysis, please [continue reading here to get started](./articles/AMR.html).)*
         
         `AMR` is a free, open-source and independent [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. **Our aim is to provide a standard** for clean and reproducible antimicrobial resistance data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.
         
        @@ -87,7 +87,7 @@ This package can be used for:
           * Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the [Catalogue of Life](http://www.catalogueoflife.org) and [List of Prokaryotic names with Standing in Nomenclature](https://lpsn.dsmz.de) ([manual](./reference/mo_property.html))
           * Interpreting raw MIC and disk diffusion values, based on the latest CLSI or EUCAST guidelines ([manual](./reference/as.rsi.html))
           * Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records ([manual](./reference/ab_from_text.html))
        -  * Determining first isolates to be used for AMR analysis ([manual](./reference/first_isolate.html))
        +  * Determining first isolates to be used for AMR data analysis ([manual](./reference/first_isolate.html))
           * Calculating antimicrobial resistance ([tutorial](./articles/AMR.html))
           * Determining multi-drug resistance (MDR) / multi-drug resistant organisms (MDRO) ([tutorial](./articles/MDR.html))
           * Calculating (empirical) susceptibility of both mono therapy and combination therapies ([tutorial](./articles/AMR.html))
        @@ -131,7 +131,7 @@ remotes::install_github("msberends/AMR")
         
         ### Get started
         
        -To find out how to conduct AMR analysis, please [continue reading here to get started](./articles/AMR.html) or click the links in the 'How to' menu.
        +To find out how to conduct AMR data analysis, please [continue reading here to get started](./articles/AMR.html) or click the links in the 'How to' menu.
         
         ### Short introduction
         
        @@ -185,7 +185,7 @@ The `AMR` package basically does four important things:
         
            * Aside from this website with many tutorials, the package itself contains extensive help pages with many examples for all functions.
            * The package also contains example data sets:
        -     * The [`example_isolates` data set](./reference/example_isolates.html). This data set contains 2,000 microbial isolates with their full antibiograms. It reflects reality and can be used to practice AMR analysis.
        +     * The [`example_isolates` data set](./reference/example_isolates.html). This data set contains 2,000 microbial isolates with their full antibiograms. It reflects reality and can be used to practice AMR data analysis.
              * The [`WHONET` data set](./reference/WHONET.html). This data set only contains fake data, but with the exact same structure as files exported by WHONET. Read more about WHONET [on its tutorial page](./articles/WHONET.html).
         
         ### Copyright
        diff --git a/man/AMR-deprecated.Rd b/man/AMR-deprecated.Rd
        index a0da3938..fa717930 100644
        --- a/man/AMR-deprecated.Rd
        +++ b/man/AMR-deprecated.Rd
        @@ -18,7 +18,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{retired}. A retired
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \keyword{internal}
        diff --git a/man/AMR.Rd b/man/AMR.Rd
        index 2e383a61..801a9178 100644
        --- a/man/AMR.Rd
        +++ b/man/AMR.Rd
        @@ -18,7 +18,7 @@ This package can be used for:
         \item Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the Catalogue of Life and List of Prokaryotic names with Standing in Nomenclature
         \item Interpreting raw MIC and disk diffusion values, based on the latest CLSI or EUCAST guidelines
         \item Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records
        -\item Determining first isolates to be used for AMR analysis
        +\item Determining first isolates to be used for AMR data analysis
         \item Calculating antimicrobial resistance
         \item Determining multi-drug resistance (MDR) / multi-drug resistant organisms (MDRO)
         \item Calculating (empirical) susceptibility of both mono therapy and combination therapies
        @@ -40,7 +40,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \section{Contact Us}{
        diff --git a/man/WHOCC.Rd b/man/WHOCC.Rd
        index 327fb91d..62c63144 100644
        --- a/man/WHOCC.Rd
        +++ b/man/WHOCC.Rd
        @@ -20,7 +20,7 @@ The WHOCC is located in Oslo at the Norwegian Institute of Public Health and fun
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/WHONET.Rd b/man/WHONET.Rd
        index ae3439a4..591b9200 100644
        --- a/man/WHONET.Rd
        +++ b/man/WHONET.Rd
        @@ -48,7 +48,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \keyword{datasets}
        diff --git a/man/ab_from_text.Rd b/man/ab_from_text.Rd
        index cb52462d..e41fa4b0 100644
        --- a/man/ab_from_text.Rd
        +++ b/man/ab_from_text.Rd
        @@ -62,7 +62,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{maturing}. The unly
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/ab_property.Rd b/man/ab_property.Rd
        index 997d4186..fa3a9855 100644
        --- a/man/ab_property.Rd
        +++ b/man/ab_property.Rd
        @@ -100,7 +100,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/age.Rd b/man/age.Rd
        index 76fc72c5..a722a137 100644
        --- a/man/age.Rd
        +++ b/man/age.Rd
        @@ -36,7 +36,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/age_groups.Rd b/man/age_groups.Rd
        index ca2d332e..3d6ff7c6 100644
        --- a/man/age_groups.Rd
        +++ b/man/age_groups.Rd
        @@ -43,7 +43,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/antibiotic_class_selectors.Rd b/man/antibiotic_class_selectors.Rd
        index 0335a6ef..f220e5fb 100644
        --- a/man/antibiotic_class_selectors.Rd
        +++ b/man/antibiotic_class_selectors.Rd
        @@ -18,36 +18,38 @@
         \alias{tetracyclines}
         \title{Antibiotic Class Selectors}
         \usage{
        -ab_class(ab_class)
        +ab_class(ab_class, only_rsi_columns = NULL)
         
        -aminoglycosides()
        +aminoglycosides(only_rsi_columns = NULL)
         
        -carbapenems()
        +carbapenems(only_rsi_columns = NULL)
         
        -cephalosporins()
        +cephalosporins(only_rsi_columns = NULL)
         
        -cephalosporins_1st()
        +cephalosporins_1st(only_rsi_columns = NULL)
         
        -cephalosporins_2nd()
        +cephalosporins_2nd(only_rsi_columns = NULL)
         
        -cephalosporins_3rd()
        +cephalosporins_3rd(only_rsi_columns = NULL)
         
        -cephalosporins_4th()
        +cephalosporins_4th(only_rsi_columns = NULL)
         
        -cephalosporins_5th()
        +cephalosporins_5th(only_rsi_columns = NULL)
         
        -fluoroquinolones()
        +fluoroquinolones(only_rsi_columns = NULL)
         
        -glycopeptides()
        +glycopeptides(only_rsi_columns = NULL)
         
        -macrolides()
        +macrolides(only_rsi_columns = NULL)
         
        -penicillins()
        +penicillins(only_rsi_columns = NULL)
         
        -tetracyclines()
        +tetracyclines(only_rsi_columns = NULL)
         }
         \arguments{
         \item{ab_class}{an antimicrobial class, like \code{"carbapenems"}. The columns \code{group}, \code{atc_group1} and \code{atc_group2} of the \link{antibiotics} data set will be searched (case-insensitive) for this value.}
        +
        +\item{only_rsi_columns}{a logical to indicate whether only columns of class \href{[rsi]}{\verb{}} must be selected. If set to \code{NULL} (default), it will be \code{TRUE} if any column of the data was \href{[rsi]}{transformed to class \verb{}} on beforehand, and \code{FALSE} otherwise.}
         }
         \description{
         These functions help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. \strong{\Sexpr{ifelse(as.double(R.Version()$major) + (as.double(R.Version()$minor) / 10) < 3.2, paste0("NOTE: THESE FUNCTIONS DO NOT WORK ON YOUR CURRENT R VERSION. These functions require R version 3.2 or later - you have ", R.version.string, "."), "")}}
        @@ -72,7 +74,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/antibiotics.Rd b/man/antibiotics.Rd
        index ee11d228..bd9b8aef 100644
        --- a/man/antibiotics.Rd
        +++ b/man/antibiotics.Rd
        @@ -94,7 +94,7 @@ The WHOCC is located in Oslo at the Norwegian Institute of Public Health and fun
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \seealso{
        diff --git a/man/as.ab.Rd b/man/as.ab.Rd
        index 5df17856..36921b3e 100644
        --- a/man/as.ab.Rd
        +++ b/man/as.ab.Rd
        @@ -76,7 +76,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/as.disk.Rd b/man/as.disk.Rd
        index 855413c1..0dca45fa 100644
        --- a/man/as.disk.Rd
        +++ b/man/as.disk.Rd
        @@ -34,7 +34,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/as.mic.Rd b/man/as.mic.Rd
        index d5ca3ae0..38de5a8e 100755
        --- a/man/as.mic.Rd
        +++ b/man/as.mic.Rd
        @@ -34,7 +34,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/as.mo.Rd b/man/as.mo.Rd
        index 5d85beb5..d48c4add 100644
        --- a/man/as.mo.Rd
        +++ b/man/as.mo.Rd
        @@ -175,7 +175,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/as.rsi.Rd b/man/as.rsi.Rd
        index 763b1f7e..b6e099b9 100755
        --- a/man/as.rsi.Rd
        +++ b/man/as.rsi.Rd
        @@ -74,7 +74,7 @@ is.rsi.eligible(x, threshold = 0.05)
         \item{col_mo}{column name of the IDs of the microorganisms (see \code{\link[=as.mo]{as.mo()}}), defaults to the first column of class \code{\link{mo}}. Values will be coerced using \code{\link[=as.mo]{as.mo()}}.}
         }
         \value{
        -Ordered \link{factor} with new class \code{\link{rsi}}
        +Ordered factor with new class \verb{}
         }
         \description{
         Interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing R/SI values. This transforms the input to a new class \code{\link{rsi}}, which is an ordered factor with levels \verb{S < I < R}. Values that cannot be interpreted will be returned as \code{NA} with a warning.
        @@ -121,6 +121,8 @@ The repository of this package \href{https://github.com/msberends/AMR/blob/maste
         
         \subsection{Other}{
         
        +The function \code{\link[=is.rsi]{is.rsi()}} detects if the input contains class \verb{}. If the input is a data.frame, it returns a vector in which all columns are checked for this class.
        +
         The function \code{\link[=is.rsi.eligible]{is.rsi.eligible()}} returns \code{TRUE} when a columns contains at most 5\% invalid antimicrobial interpretations (not S and/or I and/or R), and \code{FALSE} otherwise. The threshold of 5\% can be set with the \code{threshold} argument.
         }
         }
        @@ -154,7 +156,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/atc_online.Rd b/man/atc_online.Rd
        index 857d5f4a..70e269fe 100644
        --- a/man/atc_online.Rd
        +++ b/man/atc_online.Rd
        @@ -76,7 +76,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/availability.Rd b/man/availability.Rd
        index b60c20fd..010c1edd 100644
        --- a/man/availability.Rd
        +++ b/man/availability.Rd
        @@ -30,7 +30,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/bug_drug_combinations.Rd b/man/bug_drug_combinations.Rd
        index 131561e9..cf0332b4 100644
        --- a/man/bug_drug_combinations.Rd
        +++ b/man/bug_drug_combinations.Rd
        @@ -73,7 +73,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/catalogue_of_life.Rd b/man/catalogue_of_life.Rd
        index 0233acd5..cd506734 100644
        --- a/man/catalogue_of_life.Rd
        +++ b/man/catalogue_of_life.Rd
        @@ -33,7 +33,7 @@ The syntax used to transform the original data to a cleansed \R format, can be f
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/catalogue_of_life_version.Rd b/man/catalogue_of_life_version.Rd
        index a6a29988..7d2c328d 100644
        --- a/man/catalogue_of_life_version.Rd
        +++ b/man/catalogue_of_life_version.Rd
        @@ -25,7 +25,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \seealso{
        diff --git a/man/count.Rd b/man/count.Rd
        index 1f7cb1ba..977fee2b 100644
        --- a/man/count.Rd
        +++ b/man/count.Rd
        @@ -128,7 +128,7 @@ Using \code{only_all_tested} has no impact when only using one antibiotic as inp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/dosage.Rd b/man/dosage.Rd
        index b7c97683..4411a297 100644
        --- a/man/dosage.Rd
        +++ b/man/dosage.Rd
        @@ -34,7 +34,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \keyword{datasets}
        diff --git a/man/eucast_rules.Rd b/man/eucast_rules.Rd
        index 162fcb05..138d4345 100644
        --- a/man/eucast_rules.Rd
        +++ b/man/eucast_rules.Rd
        @@ -26,6 +26,7 @@ eucast_rules(
           version_breakpoints = 11,
           version_expertrules = 3.2,
           ampc_cephalosporin_resistance = NA,
        +  only_rsi_columns = any(is.rsi(x)),
           ...
         )
         
        @@ -48,6 +49,8 @@ eucast_dosage(ab, administration = "iv", version_breakpoints = 11)
         
         \item{ampc_cephalosporin_resistance}{a character value that should be applied for AmpC de-repressed cephalosporin-resistant mutants, defaults to \code{NA}. Currently only works when \code{version_expertrules} is \code{3.2}; '\emph{EUCAST Expert Rules v3.2 on Enterobacterales}' states that results of cefotaxime, ceftriaxone and ceftazidime should be reported with a note, or results should be suppressed (emptied) for these agents. A value of \code{NA} for this argument will remove results for these agents, while e.g. a value of \code{"R"} will make the results for these agents resistant. Use \code{NULL} to not alter the results for AmpC de-repressed cephalosporin-resistant mutants. \cr For \emph{EUCAST Expert Rules} v3.2, this rule applies to: \emph{Citrobacter braakii}, \emph{Citrobacter freundii}, \emph{Citrobacter gillenii}, \emph{Citrobacter murliniae}, \emph{Citrobacter rodenticum}, \emph{Citrobacter sedlakii}, \emph{Citrobacter werkmanii}, \emph{Citrobacter youngae}, \emph{Enterobacter}, \emph{Hafnia alvei}, \emph{Klebsiella aerogenes}, \emph{Morganella morganii}, \emph{Providencia} and \emph{Serratia}.}
         
        +\item{only_rsi_columns}{a logical to indicate whether only antibiotic columns must be detected that were \href{[rsi]}{transformed to class \verb{}} on beforehand. Defaults to \code{TRUE} if any column of \code{x} is of class \verb{}.}
        +
         \item{...}{column name of an antibiotic, see section \emph{Antibiotics} below}
         
         \item{ab}{any (vector of) text that can be coerced to a valid antibiotic code with \code{\link[=as.ab]{as.ab()}}}
        @@ -104,7 +107,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/example_isolates.Rd b/man/example_isolates.Rd
        index 45f68b6c..f79e76f6 100644
        --- a/man/example_isolates.Rd
        +++ b/man/example_isolates.Rd
        @@ -23,7 +23,7 @@ A \link{data.frame} with 2,000 observations and 49 variables:
         example_isolates
         }
         \description{
        -A data set containing 2,000 microbial isolates with their full antibiograms. The data set reflects reality and can be used to practice AMR analysis. For examples, please read \href{https://msberends.github.io/AMR/articles/AMR.html}{the tutorial on our website}.
        +A data set containing 2,000 microbial isolates with their full antibiograms. The data set reflects reality and can be used to practice AMR data analysis. For examples, please read \href{https://msberends.github.io/AMR/articles/AMR.html}{the tutorial on our website}.
         }
         \section{Reference Data Publicly Available}{
         
        @@ -32,7 +32,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \keyword{datasets}
        diff --git a/man/example_isolates_unclean.Rd b/man/example_isolates_unclean.Rd
        index 66de560a..a9271eb0 100644
        --- a/man/example_isolates_unclean.Rd
        +++ b/man/example_isolates_unclean.Rd
        @@ -18,7 +18,7 @@ A \link{data.frame} with 3,000 observations and 8 variables:
         example_isolates_unclean
         }
         \description{
        -A data set containing 3,000 microbial isolates that are not cleaned up and consequently not ready for AMR analysis. This data set can be used for practice.
        +A data set containing 3,000 microbial isolates that are not cleaned up and consequently not ready for AMR data analysis. This data set can be used for practice.
         }
         \section{Reference Data Publicly Available}{
         
        @@ -27,7 +27,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \keyword{datasets}
        diff --git a/man/filter_ab_class.Rd b/man/filter_ab_class.Rd
        index 48d4b151..80d2a381 100644
        --- a/man/filter_ab_class.Rd
        +++ b/man/filter_ab_class.Rd
        @@ -17,7 +17,14 @@
         \alias{filter_tetracyclines}
         \title{Filter Isolates on Result in Antimicrobial Class}
         \usage{
        -filter_ab_class(x, ab_class, result = NULL, scope = "any", ...)
        +filter_ab_class(
        +  x,
        +  ab_class,
        +  result = NULL,
        +  scope = "any",
        +  only_rsi_columns = any(is.rsi(x)),
        +  ...
        +)
         
         filter_aminoglycosides(x, result = NULL, scope = "any", ...)
         
        @@ -54,7 +61,9 @@ filter_tetracyclines(x, result = NULL, scope = "any", ...)
         
         \item{scope}{the scope to check which variables to check, can be \code{"any"} (default) or \code{"all"}}
         
        -\item{...}{previously used when this package still depended on the \code{dplyr} package, now ignored}
        +\item{only_rsi_columns}{a logical to indicate whether only columns must be included that were \href{[rsi]}{transformed to class \verb{}} on beforehand. Defaults to \code{TRUE} if any column of \code{x} is of class \verb{}.}
        +
        +\item{...}{arguments passed on to \code{\link[=filter_ab_class]{filter_ab_class()}}}
         }
         \description{
         Filter isolates on results in specific antimicrobial classes. This makes it easy to filter on isolates that were tested for e.g. any aminoglycoside, or to filter on carbapenem-resistant isolates without the need to specify the drugs.
        diff --git a/man/first_isolate.Rd b/man/first_isolate.Rd
        index 9624d743..0c92021e 100755
        --- a/man/first_isolate.Rd
        +++ b/man/first_isolate.Rd
        @@ -144,7 +144,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/g.test.Rd b/man/g.test.Rd
        index 648ac9ae..0802eb34 100644
        --- a/man/g.test.Rd
        +++ b/man/g.test.Rd
        @@ -105,7 +105,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{questioning}. This
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/get_episode.Rd b/man/get_episode.Rd
        index 83139be5..085418a8 100644
        --- a/man/get_episode.Rd
        +++ b/man/get_episode.Rd
        @@ -42,7 +42,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/ggplot_rsi.Rd b/man/ggplot_rsi.Rd
        index 1869936b..4e508790 100644
        --- a/man/ggplot_rsi.Rd
        +++ b/man/ggplot_rsi.Rd
        @@ -120,7 +120,7 @@ labels_rsi_count(
         \item{...}{other arguments passed on to \code{\link[=geom_rsi]{geom_rsi()}}}
         }
         \description{
        -Use these functions to create bar plots for antimicrobial resistance analysis. All functions rely on \link[ggplot2:ggplot]{ggplot2} functions.
        +Use these functions to create bar plots for AMR data analysis. All functions rely on \link[ggplot2:ggplot]{ggplot2} functions.
         }
         \details{
         At default, the names of antibiotics will be shown on the plots using \code{\link[=ab_name]{ab_name()}}. This can be set with the \code{translate_ab} argument. See \code{\link[=count_df]{count_df()}}.
        @@ -149,7 +149,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{maturing}. The unly
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/guess_ab_col.Rd b/man/guess_ab_col.Rd
        index 26c5dcb8..ef2a14ab 100644
        --- a/man/guess_ab_col.Rd
        +++ b/man/guess_ab_col.Rd
        @@ -4,7 +4,12 @@
         \alias{guess_ab_col}
         \title{Guess Antibiotic Column}
         \usage{
        -guess_ab_col(x = NULL, search_string = NULL, verbose = FALSE)
        +guess_ab_col(
        +  x = NULL,
        +  search_string = NULL,
        +  verbose = FALSE,
        +  only_rsi_columns = any(is.rsi(x))
        +)
         }
         \arguments{
         \item{x}{a \link{data.frame}}
        @@ -12,6 +17,8 @@ guess_ab_col(x = NULL, search_string = NULL, verbose = FALSE)
         \item{search_string}{a text to search \code{x} for, will be checked with \code{\link[=as.ab]{as.ab()}} if this value is not a column in \code{x}}
         
         \item{verbose}{a logical to indicate whether additional info should be printed}
        +
        +\item{only_rsi_columns}{a logical to indicate whether only antibiotic columns must be detected that were \href{[rsi]}{transformed to class \verb{}} on beforehand. Defaults to \code{TRUE} if any column of \code{x} is of class \verb{}.}
         }
         \value{
         A column name of \code{x}, or \code{NULL} when no result is found.
        @@ -32,7 +39,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/intrinsic_resistant.Rd b/man/intrinsic_resistant.Rd
        index 4569dd5c..771c2488 100644
        --- a/man/intrinsic_resistant.Rd
        +++ b/man/intrinsic_resistant.Rd
        @@ -29,7 +29,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/isolate_identifier.Rd b/man/isolate_identifier.Rd
        index 84d887f3..fee4fd48 100644
        --- a/man/isolate_identifier.Rd
        +++ b/man/isolate_identifier.Rd
        @@ -35,7 +35,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{experimental}. An e
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/join.Rd b/man/join.Rd
        index 871e3b4f..7124060e 100755
        --- a/man/join.Rd
        +++ b/man/join.Rd
        @@ -50,7 +50,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/key_antibiotics.Rd b/man/key_antibiotics.Rd
        index d8d2a49c..79bac695 100755
        --- a/man/key_antibiotics.Rd
        +++ b/man/key_antibiotics.Rd
        @@ -131,7 +131,7 @@ A difference from I to S|R (or vice versa) means 0.5 points, a difference from S
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/kurtosis.Rd b/man/kurtosis.Rd
        index 1feeac79..224272ee 100644
        --- a/man/kurtosis.Rd
        +++ b/man/kurtosis.Rd
        @@ -35,7 +35,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \seealso{
        diff --git a/man/like.Rd b/man/like.Rd
        index 269fdfa9..55f45cc8 100755
        --- a/man/like.Rd
        +++ b/man/like.Rd
        @@ -49,7 +49,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/mdro.Rd b/man/mdro.Rd
        index dc60161c..d846ff56 100644
        --- a/man/mdro.Rd
        +++ b/man/mdro.Rd
        @@ -27,20 +27,26 @@ mdro(
           pct_required_classes = 0.5,
           combine_SI = TRUE,
           verbose = FALSE,
        +  only_rsi_columns = any(is.rsi(x)),
           ...
         )
         
         custom_mdro_guideline(..., as_factor = TRUE)
         
        -brmo(x, guideline = "BRMO", ...)
        +brmo(x, guideline = "BRMO", only_rsi_columns = any(is.rsi(x)), ...)
         
        -mrgn(x, guideline = "MRGN", ...)
        +mrgn(x, guideline = "MRGN", only_rsi_columns = any(is.rsi(x)), ...)
         
        -mdr_tb(x, guideline = "TB", ...)
        +mdr_tb(x, guideline = "TB", only_rsi_columns = any(is.rsi(x)), ...)
         
        -mdr_cmi2012(x, guideline = "CMI2012", ...)
        +mdr_cmi2012(x, guideline = "CMI2012", only_rsi_columns = any(is.rsi(x)), ...)
         
        -eucast_exceptional_phenotypes(x, guideline = "EUCAST", ...)
        +eucast_exceptional_phenotypes(
        +  x,
        +  guideline = "EUCAST",
        +  only_rsi_columns = any(is.rsi(x)),
        +  ...
        +)
         }
         \arguments{
         \item{x}{a \link{data.frame} with antibiotics columns, like \code{AMX} or \code{amox}. Can be left blank for automatic determination.}
        @@ -57,6 +63,8 @@ eucast_exceptional_phenotypes(x, guideline = "EUCAST", ...)
         
         \item{verbose}{a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.}
         
        +\item{only_rsi_columns}{a logical to indicate whether only antibiotic columns must be detected that were \href{[rsi]}{transformed to class \verb{}} on beforehand. Defaults to \code{TRUE} if any column of \code{x} is of class \verb{}.}
        +
         \item{...}{in case of \code{\link[=custom_mdro_guideline]{custom_mdro_guideline()}}: a set of rules, see section \emph{Using Custom Guidelines} below. Otherwise: column name of an antibiotic, see section \emph{Antibiotics} below.}
         
         \item{as_factor}{a \link{logical} to indicate whether the returned value should be an ordered \link{factor} (\code{TRUE}, default), or otherwise a \link{character} vector}
        @@ -174,7 +182,7 @@ This AMR package honours this new insight. Use \code{\link[=susceptibility]{susc
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/microorganisms.Rd b/man/microorganisms.Rd
        index 0fb4d18e..20ec8333 100755
        --- a/man/microorganisms.Rd
        +++ b/man/microorganisms.Rd
        @@ -86,7 +86,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \seealso{
        diff --git a/man/microorganisms.codes.Rd b/man/microorganisms.codes.Rd
        index f58a5132..d91be558 100644
        --- a/man/microorganisms.codes.Rd
        +++ b/man/microorganisms.codes.Rd
        @@ -32,7 +32,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \seealso{
        diff --git a/man/microorganisms.old.Rd b/man/microorganisms.old.Rd
        index 29df4182..1ef5ba3c 100644
        --- a/man/microorganisms.old.Rd
        +++ b/man/microorganisms.old.Rd
        @@ -39,7 +39,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \seealso{
        diff --git a/man/mo_matching_score.Rd b/man/mo_matching_score.Rd
        index 2db9c62a..43915199 100644
        --- a/man/mo_matching_score.Rd
        +++ b/man/mo_matching_score.Rd
        @@ -50,7 +50,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/mo_property.Rd b/man/mo_property.Rd
        index af6d9a4f..3d6e3395 100644
        --- a/man/mo_property.Rd
        +++ b/man/mo_property.Rd
        @@ -189,7 +189,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/mo_source.Rd b/man/mo_source.Rd
        index 66d52a9b..521ac5ce 100644
        --- a/man/mo_source.Rd
        +++ b/man/mo_source.Rd
        @@ -105,6 +105,6 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
        diff --git a/man/pca.Rd b/man/pca.Rd
        index 5f0152d1..84988c47 100644
        --- a/man/pca.Rd
        +++ b/man/pca.Rd
        @@ -67,7 +67,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{maturing}. The unly
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/plot.Rd b/man/plot.Rd
        index 28e32175..3fe2ea64 100644
        --- a/man/plot.Rd
        +++ b/man/plot.Rd
        @@ -108,7 +108,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \keyword{internal}
        diff --git a/man/proportion.Rd b/man/proportion.Rd
        index 5792462f..164a4941 100644
        --- a/man/proportion.Rd
        +++ b/man/proportion.Rd
        @@ -143,7 +143,7 @@ This AMR package honours this new insight. Use \code{\link[=susceptibility]{susc
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/random.Rd b/man/random.Rd
        index 183cee04..1a6f190a 100644
        --- a/man/random.Rd
        +++ b/man/random.Rd
        @@ -28,7 +28,7 @@ random_rsi(size, prob_RSI = c(0.33, 0.33, 0.33), ...)
         class \verb{} for \code{\link[=random_mic]{random_mic()}} (see \code{\link[=as.mic]{as.mic()}}) and class \verb{} for \code{\link[=random_disk]{random_disk()}} (see \code{\link[=as.disk]{as.disk()}})
         }
         \description{
        -These functions can be used for generating random MIC values and disk diffusion diameters, for AMR analysis practice.
        +These functions can be used for generating random MIC values and disk diffusion diameters, for AMR data analysis practice.
         }
         \details{
         The base R function \code{\link[=sample]{sample()}} is used for generating values.
        @@ -43,7 +43,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{maturing}. The unly
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/resistance_predict.Rd b/man/resistance_predict.Rd
        index 05f82165..36ee1dcb 100644
        --- a/man/resistance_predict.Rd
        +++ b/man/resistance_predict.Rd
        @@ -123,7 +123,7 @@ This AMR package honours this new insight. Use \code{\link[=susceptibility]{susc
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/man/rsi_translation.Rd b/man/rsi_translation.Rd
        index 7c6488d1..83202039 100644
        --- a/man/rsi_translation.Rd
        +++ b/man/rsi_translation.Rd
        @@ -35,7 +35,7 @@ All reference data sets (about microorganisms, antibiotics, R/SI interpretation,
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \seealso{
        diff --git a/man/skewness.Rd b/man/skewness.Rd
        index b2e2d611..3d870317 100644
        --- a/man/skewness.Rd
        +++ b/man/skewness.Rd
        @@ -35,7 +35,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \seealso{
        diff --git a/man/translate.Rd b/man/translate.Rd
        index 4963e96b..58d7e40a 100644
        --- a/man/translate.Rd
        +++ b/man/translate.Rd
        @@ -37,7 +37,7 @@ If the unlying code needs breaking changes, they will occur gradually. For examp
         
         \section{Read more on Our Website!}{
         
        -On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
        +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR data analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
         }
         
         \examples{
        diff --git a/pkgdown/extra.css b/pkgdown/extra.css
        index 11c2f0ad..da89ffc2 100644
        --- a/pkgdown/extra.css
        +++ b/pkgdown/extra.css
        @@ -1,7 +1,7 @@
         /*
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -21,7 +21,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         */
         
        diff --git a/pkgdown/extra.js b/pkgdown/extra.js
        index bc54c5de..199f8f0a 100644
        --- a/pkgdown/extra.js
        +++ b/pkgdown/extra.js
        @@ -1,7 +1,7 @@
         /*
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -21,7 +21,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         */
         
        diff --git a/tests/testthat.R b/tests/testthat.R
        index 2f895025..124e838c 100755
        --- a/tests/testthat.R
        +++ b/tests/testthat.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         # the testthat package is in Suggests, but very old R versions will not be
        diff --git a/tests/testthat/test-_deprecated.R b/tests/testthat/test-_deprecated.R
        index 037a81e4..d683e1cd 100644
        --- a/tests/testthat/test-_deprecated.R
        +++ b/tests/testthat/test-_deprecated.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("deprecated.R")
        diff --git a/tests/testthat/test-_misc.R b/tests/testthat/test-_misc.R
        index 509d6408..3a89e5f9 100755
        --- a/tests/testthat/test-_misc.R
        +++ b/tests/testthat/test-_misc.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("aa_helper_functions.R")
        diff --git a/tests/testthat/test-ab.R b/tests/testthat/test-ab.R
        index 525fe77e..eeaff7bf 100755
        --- a/tests/testthat/test-ab.R
        +++ b/tests/testthat/test-ab.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("ab.R")
        diff --git a/tests/testthat/test-ab_from_text.R b/tests/testthat/test-ab_from_text.R
        index 71f28543..d8c22e89 100644
        --- a/tests/testthat/test-ab_from_text.R
        +++ b/tests/testthat/test-ab_from_text.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("ab_from_text.R")
        diff --git a/tests/testthat/test-ab_property.R b/tests/testthat/test-ab_property.R
        index ce8c5505..554da93f 100644
        --- a/tests/testthat/test-ab_property.R
        +++ b/tests/testthat/test-ab_property.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("ab_property.R")
        diff --git a/tests/testthat/test-age.R b/tests/testthat/test-age.R
        index 8f3506a0..659cbafe 100644
        --- a/tests/testthat/test-age.R
        +++ b/tests/testthat/test-age.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("age.R")
        diff --git a/tests/testthat/test-antibiotic_class_selectors.R b/tests/testthat/test-antibiotic_class_selectors.R
        index 4fce2d5e..1ddf6afb 100644
        --- a/tests/testthat/test-antibiotic_class_selectors.R
        +++ b/tests/testthat/test-antibiotic_class_selectors.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("ab_class_selectors.R")
        diff --git a/tests/testthat/test-atc_online.R b/tests/testthat/test-atc_online.R
        index aba8d0b7..72c67912 100644
        --- a/tests/testthat/test-atc_online.R
        +++ b/tests/testthat/test-atc_online.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("atc_online.R")
        diff --git a/tests/testthat/test-availability.R b/tests/testthat/test-availability.R
        index 7f30aae6..171da6fd 100644
        --- a/tests/testthat/test-availability.R
        +++ b/tests/testthat/test-availability.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("availability.R")
        diff --git a/tests/testthat/test-bug_drug_combinations.R b/tests/testthat/test-bug_drug_combinations.R
        index ff0d428d..80b83886 100644
        --- a/tests/testthat/test-bug_drug_combinations.R
        +++ b/tests/testthat/test-bug_drug_combinations.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("bug_drug_combinations.R")
        diff --git a/tests/testthat/test-count.R b/tests/testthat/test-count.R
        index d0dfd00f..8a765a45 100644
        --- a/tests/testthat/test-count.R
        +++ b/tests/testthat/test-count.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("count.R")
        diff --git a/tests/testthat/test-data.R b/tests/testthat/test-data.R
        index 4bf77fa8..dee3db5d 100644
        --- a/tests/testthat/test-data.R
        +++ b/tests/testthat/test-data.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("data.R")
        diff --git a/tests/testthat/test-disk.R b/tests/testthat/test-disk.R
        index 41977444..0ae02be9 100755
        --- a/tests/testthat/test-disk.R
        +++ b/tests/testthat/test-disk.R
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("disk.R")
        diff --git a/tests/testthat/test-episode.R b/tests/testthat/test-episode.R
        index 3bed7324..f2250166 100644
        --- a/tests/testthat/test-episode.R
        +++ b/tests/testthat/test-episode.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("episode.R")
        diff --git a/tests/testthat/test-eucast_rules.R b/tests/testthat/test-eucast_rules.R
        index 2eb7eba1..6e97ea74 100755
        --- a/tests/testthat/test-eucast_rules.R
        +++ b/tests/testthat/test-eucast_rules.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("eucast_rules.R")
        diff --git a/tests/testthat/test-filter_ab_class.R b/tests/testthat/test-filter_ab_class.R
        index c5209f08..35fbfa9f 100644
        --- a/tests/testthat/test-filter_ab_class.R
        +++ b/tests/testthat/test-filter_ab_class.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("filter_ab_class.R")
        diff --git a/tests/testthat/test-first_isolate.R b/tests/testthat/test-first_isolate.R
        index 5075079c..ef3fb446 100755
        --- a/tests/testthat/test-first_isolate.R
        +++ b/tests/testthat/test-first_isolate.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("first_isolate.R")
        diff --git a/tests/testthat/test-g.test.R b/tests/testthat/test-g.test.R
        index fc6416b8..dfc1c70b 100644
        --- a/tests/testthat/test-g.test.R
        +++ b/tests/testthat/test-g.test.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("g.test.R")
        diff --git a/tests/testthat/test-get_locale.R b/tests/testthat/test-get_locale.R
        index 0d21f3a1..938eef21 100644
        --- a/tests/testthat/test-get_locale.R
        +++ b/tests/testthat/test-get_locale.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("get_locale.R")
        diff --git a/tests/testthat/test-ggplot_rsi.R b/tests/testthat/test-ggplot_rsi.R
        index aefa78ee..79f8c977 100644
        --- a/tests/testthat/test-ggplot_rsi.R
        +++ b/tests/testthat/test-ggplot_rsi.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("ggplot_rsi.R")
        diff --git a/tests/testthat/test-guess_ab_col.R b/tests/testthat/test-guess_ab_col.R
        index bffa7049..ebcf728d 100644
        --- a/tests/testthat/test-guess_ab_col.R
        +++ b/tests/testthat/test-guess_ab_col.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("guess_ab_col.R")
        diff --git a/tests/testthat/test-isolate_identifier.R b/tests/testthat/test-isolate_identifier.R
        index fd63bcc3..9bee9144 100644
        --- a/tests/testthat/test-isolate_identifier.R
        +++ b/tests/testthat/test-isolate_identifier.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("isolate_identifier.R")
        diff --git a/tests/testthat/test-join_microorganisms.R b/tests/testthat/test-join_microorganisms.R
        index fa3f569d..bdf794e6 100755
        --- a/tests/testthat/test-join_microorganisms.R
        +++ b/tests/testthat/test-join_microorganisms.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("join_microorganisms.R")
        diff --git a/tests/testthat/test-key_antibiotics.R b/tests/testthat/test-key_antibiotics.R
        index 33a15c37..1f493c06 100644
        --- a/tests/testthat/test-key_antibiotics.R
        +++ b/tests/testthat/test-key_antibiotics.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("key_antibiotics.R")
        diff --git a/tests/testthat/test-kurtosis.R b/tests/testthat/test-kurtosis.R
        index 1153f8c9..4d8e7654 100644
        --- a/tests/testthat/test-kurtosis.R
        +++ b/tests/testthat/test-kurtosis.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("kurtosis.R")
        diff --git a/tests/testthat/test-like.R b/tests/testthat/test-like.R
        index f584f9ef..4bbf4ceb 100644
        --- a/tests/testthat/test-like.R
        +++ b/tests/testthat/test-like.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("like.R")
        diff --git a/tests/testthat/test-mdro.R b/tests/testthat/test-mdro.R
        index 47f93e69..2b9c4655 100755
        --- a/tests/testthat/test-mdro.R
        +++ b/tests/testthat/test-mdro.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("mdro.R")
        diff --git a/tests/testthat/test-mic.R b/tests/testthat/test-mic.R
        index df334817..fb5be9ac 100755
        --- a/tests/testthat/test-mic.R
        +++ b/tests/testthat/test-mic.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("mic.R")
        diff --git a/tests/testthat/test-mo.R b/tests/testthat/test-mo.R
        index 664719a8..d48121fb 100644
        --- a/tests/testthat/test-mo.R
        +++ b/tests/testthat/test-mo.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("mo.R")
        diff --git a/tests/testthat/test-mo_property.R b/tests/testthat/test-mo_property.R
        index 6de7d993..8d9c0f2a 100644
        --- a/tests/testthat/test-mo_property.R
        +++ b/tests/testthat/test-mo_property.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("mo_property.R")
        diff --git a/tests/testthat/test-pca.R b/tests/testthat/test-pca.R
        index 294ccc06..f1feef64 100644
        --- a/tests/testthat/test-pca.R
        +++ b/tests/testthat/test-pca.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("pca.R")
        diff --git a/tests/testthat/test-proportion.R b/tests/testthat/test-proportion.R
        index b195ce55..009bb90e 100755
        --- a/tests/testthat/test-proportion.R
        +++ b/tests/testthat/test-proportion.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("proportion.R")
        diff --git a/tests/testthat/test-random.R b/tests/testthat/test-random.R
        index aef64cfc..637683e8 100644
        --- a/tests/testthat/test-random.R
        +++ b/tests/testthat/test-random.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("random.R")
        diff --git a/tests/testthat/test-resistance_predict.R b/tests/testthat/test-resistance_predict.R
        index 2b0c5bb4..4e9f1ff7 100644
        --- a/tests/testthat/test-resistance_predict.R
        +++ b/tests/testthat/test-resistance_predict.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("resistance_predict.R")
        diff --git a/tests/testthat/test-rsi.R b/tests/testthat/test-rsi.R
        index 0f625331..7cc41bc9 100644
        --- a/tests/testthat/test-rsi.R
        +++ b/tests/testthat/test-rsi.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("rsi.R")
        diff --git a/tests/testthat/test-skewness.R b/tests/testthat/test-skewness.R
        index 336f9b62..bbe7b47d 100644
        --- a/tests/testthat/test-skewness.R
        +++ b/tests/testthat/test-skewness.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("skewness.R")
        diff --git a/tests/testthat/test-zzz.R b/tests/testthat/test-zzz.R
        index 61248ffd..c3dff30a 100644
        --- a/tests/testthat/test-zzz.R
        +++ b/tests/testthat/test-zzz.R
        @@ -1,6 +1,6 @@
         # ==================================================================== #
         # TITLE                                                                #
        -# Antimicrobial Resistance (AMR) Analysis for R                        #
        +# Antimicrobial Resistance (AMR) Data Analysis for R                   #
         #                                                                      #
         # SOURCE                                                               #
         # https://github.com/msberends/AMR                                     #
        @@ -20,7 +20,7 @@
         # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY.              #
         #                                                                      #
         # Visit our website for the full manual and a complete tutorial about  #
        -# how to conduct AMR analysis: https://msberends.github.io/AMR/        #
        +# how to conduct AMR data analysis: https://msberends.github.io/AMR/   #
         # ==================================================================== #
         
         context("zzz.R")
        diff --git a/vignettes/AMR.Rmd b/vignettes/AMR.Rmd
        index d0d5f04c..c95cca87 100755
        --- a/vignettes/AMR.Rmd
        +++ b/vignettes/AMR.Rmd
        @@ -1,5 +1,5 @@
         ---
        -title: "How to conduct AMR analysis"
        +title: "How to conduct AMR data analysis"
         author: "Matthijs S. Berends"
         date: '`r format(Sys.Date(), "%d %B %Y")`'
         output: 
        @@ -7,7 +7,7 @@ output:
             toc: true
             toc_depth: 3
         vignette: >
        -  %\VignetteIndexEntry{How to conduct AMR analysis}
        +  %\VignetteIndexEntry{How to conduct AMR data analysis}
           %\VignetteEncoding{UTF-8}
           %\VignetteEngine{knitr::rmarkdown}
         editor_options: 
        @@ -28,7 +28,7 @@ knitr::opts_chunk$set(
         
         # Introduction
         
        -Conducting antimicrobial resistance analysis unfortunately requires in-depth knowledge from different scientific fields, which makes it hard to do right. At least, it requires:
        +Conducting AMR data analysis unfortunately requires in-depth knowledge from different scientific fields, which makes it hard to do right. At least, it requires:
         
         * Good questions (always start with those!)
         * A thorough understanding of (clinical) epidemiology, to understand the clinical and epidemiological relevance and possible bias of results
        @@ -39,7 +39,7 @@ Conducting antimicrobial resistance analysis unfortunately requires in-depth kno
         
         Of course, we cannot instantly provide you with knowledge and experience. But with this `AMR` package, we aimed at providing (1) tools to simplify antimicrobial resistance data cleaning, transformation and analysis, (2) methods to easily incorporate international guidelines and (3) scientifically reliable reference data, including the requirements mentioned above.
         
        -The `AMR` package enables standardised and reproducible antimicrobial resistance analysis, with the application of evidence-based rules, determination of first isolates, translation of various codes for microorganisms and antimicrobial agents, determination of (multi-drug) resistant microorganisms, and calculation of antimicrobial resistance, prevalence and future trends.
        +The `AMR` package enables standardised and reproducible AMR data analysis, with the application of evidence-based rules, determination of first isolates, translation of various codes for microorganisms and antimicrobial agents, determination of (multi-drug) resistant microorganisms, and calculation of antimicrobial resistance, prevalence and future trends.
         
         # Preparation 
         
        @@ -58,7 +58,7 @@ knitr::kable(data.frame(date = Sys.Date(),
         ``` 
         
         ## Needed R packages
        -As with many uses in R, we need some additional packages for AMR analysis. Our package works closely together with the [tidyverse packages](https://www.tidyverse.org) [`dplyr`](https://dplyr.tidyverse.org/) and [`ggplot2`](https://ggplot2.tidyverse.org) by RStudio. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R.
        +As with many uses in R, we need some additional packages for AMR data analysis. Our package works closely together with the [tidyverse packages](https://www.tidyverse.org) [`dplyr`](https://dplyr.tidyverse.org/) and [`ggplot2`](https://ggplot2.tidyverse.org) by RStudio. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R.
         
         We will also use the `cleaner` package, that can be used for cleaning data and creating frequency tables.
         
        @@ -73,7 +73,7 @@ library(cleaner)
         ```
         
         # Creation of data
        -We will create some fake example data to use for analysis. For antimicrobial resistance analysis, we need at least: a patient ID, name or code of a microorganism, a date and antimicrobial results (an antibiogram). It could also include a specimen type (e.g. to filter on blood or urine), the ward type (e.g. to filter on ICUs). 
        +We will create some fake example data to use for analysis. For AMR data analysis, we need at least: a patient ID, name or code of a microorganism, a date and antimicrobial results (an antibiogram). It could also include a specimen type (e.g. to filter on blood or urine), the ward type (e.g. to filter on ICUs). 
         
         With additional columns (like a hospital name, the patients gender of even [well-defined] clinical properties) you can do a comparative analysis, as this tutorial will demonstrate too.
         
        @@ -214,9 +214,10 @@ The Clinical and Laboratory Standards Institute (CLSI) appoints this as follows:
         
        [M39-A4 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition. CLSI, 2014. Chapter 6.4](https://clsi.org/standards/products/microbiology/documents/m39/) This `AMR` package includes this methodology with the `first_isolate()` function. It adopts the episode of a year (can be changed by user) and it starts counting days after every selected isolate. This new variable can easily be added to our data: + ```{r 1st isolate} data <- data %>% - mutate(first = first_isolate(.)) + mutate(first = first_isolate()) ``` So only `r percentage(sum(data$first) / nrow(data))` is suitable for resistance analysis! We can now filter on it with the `filter()` function, also from the `dplyr` package: @@ -237,7 +238,7 @@ data_1st <- data %>% ```{r, echo = FALSE, message = FALSE, warning = FALSE, results = 'asis'} weighted_df <- data %>% - filter(bacteria == as.mo("E. coli")) %>% + filter(bacteria == as.mo("Escherichia coli")) %>% # only most prevalent patient filter(patient_id == top_freq(freq(., patient_id), 1)[1]) %>% arrange(date) %>% @@ -248,7 +249,7 @@ weighted_df <- data %>% select(isolate, everything()) ``` -We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient `r as.data.frame(weighted_df[1, 'patient_id'])`, sorted on date: +We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all *E. coli* isolates of patient `r as.data.frame(weighted_df[1, 'patient_id'])`, sorted on date: ```{r, echo = FALSE, message = FALSE, warning = FALSE, results = 'asis'} weighted_df %>% @@ -261,13 +262,13 @@ If a column exists with a name like 'key(...)ab' the `first_isolate()` function ```{r 1st weighted, warning = FALSE} data <- data %>% - mutate(keyab = key_antibiotics(.)) %>% - mutate(first_weighted = first_isolate(.)) + mutate(keyab = key_antibiotics()) %>% + mutate(first_weighted = first_isolate()) ``` ```{r, echo = FALSE, message = FALSE, warning = FALSE, results = 'asis'} weighted_df2 <- data %>% - filter(bacteria == as.mo("E. coli")) %>% + filter(bacteria == as.mo("Escherichia coli")) %>% # only most prevalent patient filter(patient_id == top_freq(freq(., patient_id), 1)[1]) %>% arrange(date) %>% @@ -507,7 +508,7 @@ data_1st %>% ## Independence test -The next example uses the `example_isolates` data set. This is a data set included with this package and contains 2,000 microbial isolates with their full antibiograms. It reflects reality and can be used to practice AMR analysis. +The next example uses the `example_isolates` data set. This is a data set included with this package and contains 2,000 microbial isolates with their full antibiograms. It reflects reality and can be used to practice AMR data analysis. We will compare the resistance to fosfomycin (column `FOS`) in hospital A and D. The input for the `fisher.test()` can be retrieved with a transformation like this: diff --git a/vignettes/MDR.Rmd b/vignettes/MDR.Rmd index a811741b..ee12babb 100644 --- a/vignettes/MDR.Rmd +++ b/vignettes/MDR.Rmd @@ -89,7 +89,7 @@ The rules set (the `custom` object in this case) could be exported to a shared f The `mdro()` function always returns an ordered `factor`. For example, the output of the default guideline by Magiorakos *et al.* returns a `factor` with levels 'Negative', 'MDR', 'XDR' or 'PDR' in that order. -The next example uses the `example_isolates` data set. This is a data set included with this package and contains 2,000 microbial isolates with their full antibiograms. It reflects reality and can be used to practice AMR analysis. If we test the MDR/XDR/PDR guideline on this data set, we get: +The next example uses the `example_isolates` data set. This is a data set included with this package and contains 2,000 microbial isolates with their full antibiograms. It reflects reality and can be used to practice AMR data analysis. If we test the MDR/XDR/PDR guideline on this data set, we get: ```{r, message = FALSE} library(dplyr) # to support pipes: %>% diff --git a/vignettes/resistance_predict.Rmd b/vignettes/resistance_predict.Rmd index 984e63bc..2dd9ca1c 100755 --- a/vignettes/resistance_predict.Rmd +++ b/vignettes/resistance_predict.Rmd @@ -21,7 +21,7 @@ knitr::opts_chunk$set( ``` ## Needed R packages -As with many uses in R, we need some additional packages for AMR analysis. Our package works closely together with the [tidyverse packages](https://www.tidyverse.org) [`dplyr`](https://dplyr.tidyverse.org/) and [`ggplot2`](https://ggplot2.tidyverse.org) by Dr Hadley Wickham. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R. +As with many uses in R, we need some additional packages for AMR data analysis. Our package works closely together with the [tidyverse packages](https://www.tidyverse.org) [`dplyr`](https://dplyr.tidyverse.org/) and [`ggplot2`](https://ggplot2.tidyverse.org) by Dr Hadley Wickham. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R. Our `AMR` package depends on these packages and even extends their use and functions. @@ -35,7 +35,7 @@ library(AMR) ``` ## Prediction analysis -Our package contains a function `resistance_predict()`, which takes the same input as functions for [other AMR analysis](./AMR.html). Based on a date column, it calculates cases per year and uses a regression model to predict antimicrobial resistance. +Our package contains a function `resistance_predict()`, which takes the same input as functions for [other AMR data analysis](./AMR.html). Based on a date column, it calculates cases per year and uses a regression model to predict antimicrobial resistance. It is basically as easy as: ```{r, eval = FALSE} diff --git a/vignettes/welcome_to_AMR.Rmd b/vignettes/welcome_to_AMR.Rmd index 34224e9a..4ff39039 100644 --- a/vignettes/welcome_to_AMR.Rmd +++ b/vignettes/welcome_to_AMR.Rmd @@ -41,7 +41,7 @@ This package can be used for: * Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the Catalogue of Life and List of Prokaryotic names with Standing in Nomenclature * Interpreting raw MIC and disk diffusion values, based on the latest CLSI or EUCAST guidelines * Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records - * Determining first isolates to be used for AMR analysis + * Determining first isolates to be used for AMR data analysis * Calculating antimicrobial resistance * Determining multi-drug resistance (MDR) / multi-drug resistant organisms (MDRO) * Calculating (empirical) susceptibility of both mono therapy and combination therapies
        verbose

        a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.

        only_rsi_columns

        a logical to indicate whether only antibiotic columns must be detected that were transformed to class <rsi> on beforehand. Defaults to TRUE if any column of x is of class <rsi>.

        ...

        in case of custom_mdro_guideline(): a set of rules, see section Using Custom Guidelines below. Otherwise: column name of an antibiotic, see section Antibiotics below.