diff --git a/DESCRIPTION b/DESCRIPTION index 248673ff..10f57b28 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 1.8.0.9003 -Date: 2022-03-02 +Version: 1.8.0.9004 +Date: 2022-03-03 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) data analysis and to work with microbial and antimicrobial properties by diff --git a/NEWS.md b/NEWS.md index a2efa9cc..6c57d18b 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ -# `AMR` 1.8.0.9003 -## Last updated: 2 March 2022 +# `AMR` 1.8.0.9004 +## Last updated: 3 March 2022 All functions in this package are considered to be stable. Updates to the AMR interpretation rules (such as by EUCAST and CLSI), the microbial taxonomy, and the antibiotic dosages will all be updated every 6 to 12 months. @@ -11,6 +11,8 @@ All functions in this package are considered to be stable. Updates to the AMR in #> [1] "Staphylococcus aureus" ``` * More informative warning messages +* Added 192 as valid MIC +* Updated MIC printing in tibbles ### Other * Fix for unit testing on R 3.3 diff --git a/R/mic.R b/R/mic.R index f516dc81..e9bb97e6 100755 --- a/R/mic.R +++ b/R/mic.R @@ -37,8 +37,8 @@ valid_mic_levels <- c(c(t(vapply(FUN.VALUE = character(9), ops, function(x) paste0(x, sort(c(1:9, 1.5)))))), c(t(vapply(FUN.VALUE = character(45), ops, function(x) paste0(x, c(10:98)[9:98 %% 2 == TRUE])))), - c(t(vapply(FUN.VALUE = character(16), ops, - function(x) paste0(x, sort(c(2 ^ c(7:11), 80 * c(2:12)))))))) + c(t(vapply(FUN.VALUE = character(17), ops, + function(x) paste0(x, sort(c(2 ^ c(7:11), 192, 80 * c(2:12)))))))) #' Transform Input to Minimum Inhibitory Concentrations (MIC) #' @@ -247,7 +247,9 @@ pillar_shaft.mic <- function(x, ...) { out <- pasted out[is.na(x)] <- font_na(NA) out <- gsub("(<|=|>)", font_silver("\\1"), out) - out <- gsub("([.]?0+)$", font_white("\\1"), out) + if (any(out %like% "[.]", na.rm = TRUE)) { + out <- gsub("([.]?0+)$", font_white("\\1"), out) + } create_pillar_column(out, align = "right", width = max(nchar(pasted))) } diff --git a/R/rsi.R b/R/rsi.R index fc6fa2cc..33c9215a 100755 --- a/R/rsi.R +++ b/R/rsi.R @@ -67,7 +67,7 @@ #' #' For interpreting MIC values as well as disk diffusion diameters, currently implemented guidelines are EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`). #' -#' Thus, the `guideline` argument must be set to e.g., ``r paste0('"', subset(rsi_translation, guideline %like% "EUCAST")$guideline[1], '"')`` or ``r paste0('"', subset(rsi_translation, guideline %like% "CLSI")$guideline[1], '"')``. By simply using `"EUCAST"` (the default) or `"CLSI"` as input, the latest version of that guideline will automatically be selected. You can set your own data set using the `reference_data` argument. The `guideline` argument will then be ignored. +#' Thus, the `guideline` argument must be set to e.g., ``r paste0('"', subset(rsi_translation, guideline %like% "EUCAST")$guideline[1], '"')`` or ``r paste0('"', subset(rsi_translation, guideline %like% "CLSI")$guideline[1], '"')``. By simply using `"EUCAST"` (the default) or `"CLSI"` as input, the latest included version of that guideline will automatically be selected. You can set your own data set using the `reference_data` argument. The `guideline` argument will then be ignored. #' #' ## After Interpretation #' diff --git a/data-raw/AMR_latest.tar.gz b/data-raw/AMR_latest.tar.gz index e360c650..a5d13f57 100644 Binary files a/data-raw/AMR_latest.tar.gz and b/data-raw/AMR_latest.tar.gz differ diff --git a/docs/404.html b/docs/404.html index f5af4f33..88793f5f 100644 --- a/docs/404.html +++ b/docs/404.html @@ -43,7 +43,7 @@ AMR (for R) - 1.8.0.9003 + 1.8.0.9004 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 06936e3a..6a5c4d38 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9003 + 1.8.0.9004 diff --git a/docs/articles/datasets.html b/docs/articles/datasets.html index a7832a2f..96ba838f 100644 --- a/docs/articles/datasets.html +++ b/docs/articles/datasets.html @@ -44,7 +44,7 @@ AMR (for R) - 1.8.0.9003 + 1.8.0.9004 @@ -185,12 +185,12 @@ -
+
diff --git a/docs/index.html b/docs/index.html index 23581004..0383aef8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -47,7 +47,7 @@ AMR (for R) - 1.8.0.9003 + 1.8.0.9004
diff --git a/docs/news/index.html b/docs/news/index.html index 7cc73e0e..bc73adb4 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9002 + 1.8.0.9004
@@ -157,13 +157,13 @@
- +
-

Last updated: 2 March 2022

+

Last updated: 3 March 2022

All functions in this package are considered to be stable. Updates to the AMR interpretation rules (such as by EUCAST and CLSI), the microbial taxonomy, and the antibiotic dosages will all be updated every 6 to 12 months.

-

Changed

+

Changed

  • Support for antibiotic interpretations of the MIPS laboratory system: "U" for S (‘susceptible urine’), "D" for I (‘susceptible dose-dependent’)

  • Improved algorithm of as.mo(), especially for ignoring non-taxonomic text, such as:

    @@ -173,9 +173,11 @@ #> [1] "Staphylococcus aureus"
  • More informative warning messages

  • +
  • Added 192 as valid MIC

  • +
  • Updated MIC printing in tibbles

  • -

    Other

    +

    Other

    diff --git a/docs/reference/AMR-deprecated.html b/docs/reference/AMR-deprecated.html index 78933eab..8b30fd9e 100644 --- a/docs/reference/AMR-deprecated.html +++ b/docs/reference/AMR-deprecated.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004
    diff --git a/docs/reference/WHOCC.html b/docs/reference/WHOCC.html index 6b749823..a8777cd9 100644 --- a/docs/reference/WHOCC.html +++ b/docs/reference/WHOCC.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/ab_from_text.html b/docs/reference/ab_from_text.html index bb0ce37e..45eebd4f 100644 --- a/docs/reference/ab_from_text.html +++ b/docs/reference/ab_from_text.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/ab_property.html b/docs/reference/ab_property.html index ea4611cc..8154f0f6 100644 --- a/docs/reference/ab_property.html +++ b/docs/reference/ab_property.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/age.html b/docs/reference/age.html index 21f7400c..0919d949 100644 --- a/docs/reference/age.html +++ b/docs/reference/age.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/age_groups.html b/docs/reference/age_groups.html index d13568e8..d261d8df 100644 --- a/docs/reference/age_groups.html +++ b/docs/reference/age_groups.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/antibiotic_class_selectors.html b/docs/reference/antibiotic_class_selectors.html index 6ec0aac7..4b154685 100644 --- a/docs/reference/antibiotic_class_selectors.html +++ b/docs/reference/antibiotic_class_selectors.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/antibiotics.html b/docs/reference/antibiotics.html index e84476d6..13208529 100644 --- a/docs/reference/antibiotics.html +++ b/docs/reference/antibiotics.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/as.ab.html b/docs/reference/as.ab.html index 5ccb6432..4e515343 100644 --- a/docs/reference/as.ab.html +++ b/docs/reference/as.ab.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/as.disk.html b/docs/reference/as.disk.html index d303a6f9..86ed111d 100644 --- a/docs/reference/as.disk.html +++ b/docs/reference/as.disk.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/as.mic.html b/docs/reference/as.mic.html index e2ba1539..e181ea2a 100644 --- a/docs/reference/as.mic.html +++ b/docs/reference/as.mic.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/as.mo.html b/docs/reference/as.mo.html index edaa414c..7a226eb5 100644 --- a/docs/reference/as.mo.html +++ b/docs/reference/as.mo.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/as.rsi.html b/docs/reference/as.rsi.html index 0fba532d..b996975b 100644 --- a/docs/reference/as.rsi.html +++ b/docs/reference/as.rsi.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 @@ -264,7 +264,7 @@

    For interpreting MIC values as well as disk diffusion diameters, currently implemented guidelines are EUCAST (2011-2021) and CLSI (2010-2021).

    -

    Thus, the guideline argument must be set to e.g., "EUCAST 2021" or "CLSI 2021". By simply using "EUCAST" (the default) or "CLSI" as input, the latest version of that guideline will automatically be selected. You can set your own data set using the reference_data argument. The guideline argument will then be ignored.

    +

    Thus, the guideline argument must be set to e.g., "EUCAST 2021" or "CLSI 2021". By simply using "EUCAST" (the default) or "CLSI" as input, the latest included version of that guideline will automatically be selected. You can set your own data set using the reference_data argument. The guideline argument will then be ignored.

    diff --git a/docs/reference/atc_online.html b/docs/reference/atc_online.html index 7517a2d3..294df2e2 100644 --- a/docs/reference/atc_online.html +++ b/docs/reference/atc_online.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004
    diff --git a/docs/reference/availability.html b/docs/reference/availability.html index dbe0e663..87ab41f2 100644 --- a/docs/reference/availability.html +++ b/docs/reference/availability.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/bug_drug_combinations.html b/docs/reference/bug_drug_combinations.html index f67f0fd6..fc4f81dc 100644 --- a/docs/reference/bug_drug_combinations.html +++ b/docs/reference/bug_drug_combinations.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/catalogue_of_life.html b/docs/reference/catalogue_of_life.html index 9b643fe4..b95a7424 100644 --- a/docs/reference/catalogue_of_life.html +++ b/docs/reference/catalogue_of_life.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/catalogue_of_life_version.html b/docs/reference/catalogue_of_life_version.html index 7b30d783..0adbedb7 100644 --- a/docs/reference/catalogue_of_life_version.html +++ b/docs/reference/catalogue_of_life_version.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/count.html b/docs/reference/count.html index de356478..2e7935c7 100644 --- a/docs/reference/count.html +++ b/docs/reference/count.html @@ -18,7 +18,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible( AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/custom_eucast_rules.html b/docs/reference/custom_eucast_rules.html index aeb6399a..8742d3b8 100644 --- a/docs/reference/custom_eucast_rules.html +++ b/docs/reference/custom_eucast_rules.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/eucast_rules.html b/docs/reference/eucast_rules.html index 86f9ad27..b7b2aef0 100644 --- a/docs/reference/eucast_rules.html +++ b/docs/reference/eucast_rules.html @@ -18,7 +18,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/first_isolate.html b/docs/reference/first_isolate.html index b425f01d..3ff14239 100644 --- a/docs/reference/first_isolate.html +++ b/docs/reference/first_isolate.html @@ -18,7 +18,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/g.test.html b/docs/reference/g.test.html index c58e29d6..829ec440 100644 --- a/docs/reference/g.test.html +++ b/docs/reference/g.test.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/get_episode.html b/docs/reference/get_episode.html index 36ec9836..a2cbcd30 100644 --- a/docs/reference/get_episode.html +++ b/docs/reference/get_episode.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/ggplot_pca.html b/docs/reference/ggplot_pca.html index c1453b66..6e56fe4c 100644 --- a/docs/reference/ggplot_pca.html +++ b/docs/reference/ggplot_pca.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/ggplot_rsi.html b/docs/reference/ggplot_rsi.html index 4e3f1246..d029323d 100644 --- a/docs/reference/ggplot_rsi.html +++ b/docs/reference/ggplot_rsi.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/guess_ab_col.html b/docs/reference/guess_ab_col.html index 7a8fa3e9..db053ded 100644 --- a/docs/reference/guess_ab_col.html +++ b/docs/reference/guess_ab_col.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/index.html b/docs/reference/index.html index 846ac6fb..1b4bab87 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/italicise_taxonomy.html b/docs/reference/italicise_taxonomy.html index 1ab453c6..563d1fc2 100644 --- a/docs/reference/italicise_taxonomy.html +++ b/docs/reference/italicise_taxonomy.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/join.html b/docs/reference/join.html index dda9ddb1..be01bef2 100644 --- a/docs/reference/join.html +++ b/docs/reference/join.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/key_antimicrobials.html b/docs/reference/key_antimicrobials.html index 70a99226..139c7aba 100644 --- a/docs/reference/key_antimicrobials.html +++ b/docs/reference/key_antimicrobials.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/kurtosis.html b/docs/reference/kurtosis.html index d3e8a8dc..eba28869 100644 --- a/docs/reference/kurtosis.html +++ b/docs/reference/kurtosis.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/lifecycle.html b/docs/reference/lifecycle.html index bb3fe978..7f49db42 100644 --- a/docs/reference/lifecycle.html +++ b/docs/reference/lifecycle.html @@ -19,7 +19,7 @@ This page contains a section for every lifecycle (with text borrowed from the af AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/like.html b/docs/reference/like.html index 52d33917..54d6c609 100644 --- a/docs/reference/like.html +++ b/docs/reference/like.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/mdro.html b/docs/reference/mdro.html index 006a53f2..25230bd2 100644 --- a/docs/reference/mdro.html +++ b/docs/reference/mdro.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/microorganisms.codes.html b/docs/reference/microorganisms.codes.html index f0658981..1bf7d57c 100644 --- a/docs/reference/microorganisms.codes.html +++ b/docs/reference/microorganisms.codes.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/microorganisms.html b/docs/reference/microorganisms.html index 1fa762aa..20556333 100644 --- a/docs/reference/microorganisms.html +++ b/docs/reference/microorganisms.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/microorganisms.old.html b/docs/reference/microorganisms.old.html index 66f85586..12d26adb 100644 --- a/docs/reference/microorganisms.old.html +++ b/docs/reference/microorganisms.old.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/mo_matching_score.html b/docs/reference/mo_matching_score.html index f6dc2730..e8859d6b 100644 --- a/docs/reference/mo_matching_score.html +++ b/docs/reference/mo_matching_score.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html index c70cbf1a..7651a5c4 100644 --- a/docs/reference/mo_property.html +++ b/docs/reference/mo_property.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/mo_source.html b/docs/reference/mo_source.html index 3b18c79c..d2be9274 100644 --- a/docs/reference/mo_source.html +++ b/docs/reference/mo_source.html @@ -18,7 +18,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/pca.html b/docs/reference/pca.html index 4893725c..852c8c16 100644 --- a/docs/reference/pca.html +++ b/docs/reference/pca.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/plot.html b/docs/reference/plot.html index dbdf11f9..6927d23b 100644 --- a/docs/reference/plot.html +++ b/docs/reference/plot.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/proportion.html b/docs/reference/proportion.html index c37dad57..2dfd113e 100644 --- a/docs/reference/proportion.html +++ b/docs/reference/proportion.html @@ -18,7 +18,7 @@ resistance() should be used to calculate resistance, susceptibility() should be AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/random.html b/docs/reference/random.html index ef8be26a..bfafecce 100644 --- a/docs/reference/random.html +++ b/docs/reference/random.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html index dd484257..d44740b9 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/skewness.html b/docs/reference/skewness.html index 74902e5b..cb12d060 100644 --- a/docs/reference/skewness.html +++ b/docs/reference/skewness.html @@ -18,7 +18,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/reference/translate.html b/docs/reference/translate.html index 74be690a..af9cd3d4 100644 --- a/docs/reference/translate.html +++ b/docs/reference/translate.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9001 + 1.8.0.9004 diff --git a/docs/survey.html b/docs/survey.html index 19418fea..44606cd9 100644 --- a/docs/survey.html +++ b/docs/survey.html @@ -17,7 +17,7 @@ AMR (for R) - 1.8.0.9003 + 1.8.0.9004 diff --git a/man/as.rsi.Rd b/man/as.rsi.Rd index c240afd1..8d55cec2 100755 --- a/man/as.rsi.Rd +++ b/man/as.rsi.Rd @@ -113,7 +113,7 @@ your_data \%>\% mutate(across(where(is.disk), as.rsi)) # since dplyr 1.0.0 For interpreting MIC values as well as disk diffusion diameters, currently implemented guidelines are EUCAST (2011-2021) and CLSI (2010-2021). -Thus, the \code{guideline} argument must be set to e.g., \code{"EUCAST 2021"} or \code{"CLSI 2021"}. By simply using \code{"EUCAST"} (the default) or \code{"CLSI"} as input, the latest version of that guideline will automatically be selected. You can set your own data set using the \code{reference_data} argument. The \code{guideline} argument will then be ignored. +Thus, the \code{guideline} argument must be set to e.g., \code{"EUCAST 2021"} or \code{"CLSI 2021"}. By simply using \code{"EUCAST"} (the default) or \code{"CLSI"} as input, the latest included version of that guideline will automatically be selected. You can set your own data set using the \code{reference_data} argument. The \code{guideline} argument will then be ignored. } \subsection{After Interpretation}{