diff --git a/DESCRIPTION b/DESCRIPTION
index a0a824a1..bf5c408e 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: AMR
-Version: 1.4.0.9018
-Date: 2020-11-11
+Version: 1.4.0.9019
+Date: 2020-11-12
Title: Antimicrobial Resistance Analysis
Authors@R: c(
person(role = c("aut", "cre"),
diff --git a/NEWS.md b/NEWS.md
index 5796406a..6bbad399 100755
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,5 @@
-# AMR 1.4.0.9018
-## Last updated: 11 November 2020
+# AMR 1.4.0.9019
+## Last updated: 12 November 2020
### New
* Functions `is_gram_negative()` and `is_gram_positive()` as wrappers around `mo_gramstain()`. They always return `TRUE` or `FALSE` (except when the input is `NA` or the MO code is `UNKNOWN`), thus always return `FALSE` for species outside the taxonomic kingdom of Bacteria. If you have the `dplyr` package installed, they can even determine the column with microorganisms themselves inside `dplyr` functions:
diff --git a/R/data.R b/R/data.R
index a18f96c6..f0ca3735 100755
--- a/R/data.R
+++ b/R/data.R
@@ -258,7 +258,7 @@ catalogue_of_life <- list(
#' - `antibiotic`\cr Name of the antibiotic drug
#' @details The repository of this `AMR` package contains a file comprising this exact data set: . This file **allows for machine reading EUCAST guidelines about intrinsic resistance**, which is almost impossible with the Excel and PDF files distributed by EUCAST. The file is updated automatically.
#'
-#' This data set is based on '`r EUCAST_VERSION_EXPERT_RULES[["3.2"]]$title`', `r EUCAST_VERSION_EXPERT_RULES[["3.2"]]$version_txt` from `r EUCAST_VERSION_EXPERT_RULES[["3.2"]]$year`.
+#' This data set is based on `r format_eucast_version_nr(3.2)`.
#' @inheritSection AMR Reference data publicly available
#' @inheritSection AMR Read more on our website!
#' @examples
diff --git a/R/eucast_rules.R b/R/eucast_rules.R
index 2328d2c8..97d9e79e 100755
--- a/R/eucast_rules.R
+++ b/R/eucast_rules.R
@@ -27,13 +27,24 @@
# (running "data-raw/internals.R" will process that TSV file)
EUCAST_VERSION_BREAKPOINTS <- list("10.0" = list(version_txt = "v10.0",
year = 2020,
- title = "EUCAST Clinical Breakpoints"))
+ title = "'EUCAST Clinical Breakpoints'",
+ url = "https://www.eucast.org/clinical_breakpoints/"))
EUCAST_VERSION_EXPERT_RULES <- list("3.1" = list(version_txt = "v3.1",
year = 2016,
- title = "EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes"),
+ title = "'EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes'",
+ url = "https://www.eucast.org/expert_rules_and_intrinsic_resistance/"),
"3.2" = list(version_txt = "v3.2",
year = 2020,
- title = "EUCAST Expert Rules / EUCAST Intrinsic Resistance and Unusual Phenotypes"))
+ title = "'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes'",
+ url = "https://www.eucast.org/expert_rules_and_intrinsic_resistance/"))
+
+format_eucast_version_nr <- function(version) {
+ # for documentation - adds title, version number, year and url in markdown language
+ lst <- c(EUCAST_VERSION_BREAKPOINTS, EUCAST_VERSION_EXPERT_RULES)
+ version <- format(version, nsmall = 1)
+ paste0("[", lst[[version]]$title, " ", lst[[version]]$version_txt, "](", lst[[version]]$url, ")",
+ " from ", lst[[version]]$year)
+}
#' Apply EUCAST rules
#'
diff --git a/R/rsi.R b/R/rsi.R
index 6f47999c..4e9ac65e 100755
--- a/R/rsi.R
+++ b/R/rsi.R
@@ -35,7 +35,7 @@
#' @inheritParams first_isolate
#' @param guideline defaults to the latest included EUCAST guideline, see Details for all options
#' @param conserve_capped_values a logical to indicate that MIC values starting with `">"` (but not `">="`) must always return "R" , and that MIC values starting with `"<"` (but not `"<="`) must always return "S"
-#' @param add_intrinsic_resistance *(only useful when using a EUCAST guideline)* a logical to indicate whether intrinsic antibiotic resistance must also be considered for applicable bug-drug combinations, meaning that e.g. ampicillin will always return "R" in *Klebsiella* species. Determination is based on the [intrinsic_resistant] data set, that itself is based on 'EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes', version `r EUCAST_VERSION_EXPERT_RULES`.
+#' @param add_intrinsic_resistance *(only useful when using a EUCAST guideline)* a logical to indicate whether intrinsic antibiotic resistance must also be considered for applicable bug-drug combinations, meaning that e.g. ampicillin will always return "R" in *Klebsiella* species. Determination is based on the [intrinsic_resistant] data set, that itself is based on `r format_eucast_version_nr(3.2)`.
#' @param reference_data a [data.frame] to be used for interpretation, which defaults to the [rsi_translation] data set. Changing this parameter allows for using own interpretation guidelines. This parameter must contain a data set that is equal in structure to the [rsi_translation] data set (same column names and column types). Please note that the `guideline` parameter will be ignored when `reference_data` is manually set.
#' @param threshold maximum fraction of invalid antimicrobial interpretations of `x`, please see *Examples*
#' @param ... for using on a [data.frame]: names of columns to apply [as.rsi()] on (supports tidy selection like `AMX:VAN`). Otherwise: parameters passed on to methods.
diff --git a/docs/404.html b/docs/404.html
index 084c01ad..556e709d 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9018
+ 1.4.0.9019
diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html
index ec497a83..e93165e5 100644
--- a/docs/LICENSE-text.html
+++ b/docs/LICENSE-text.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9018
+ 1.4.0.9019
diff --git a/docs/articles/index.html b/docs/articles/index.html
index 14b8ebdd..53105e60 100644
--- a/docs/articles/index.html
+++ b/docs/articles/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9018
+ 1.4.0.9019
diff --git a/docs/authors.html b/docs/authors.html
index 06637ef5..5656650c 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9018
+ 1.4.0.9019
diff --git a/docs/index.html b/docs/index.html
index 12f1ef0e..2b639a4a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -43,7 +43,7 @@
AMR (for R)
- 1.4.0.9018
+ 1.4.0.9019
diff --git a/docs/news/index.html b/docs/news/index.html
index 37818183..b8446250 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9018
+ 1.4.0.9019
@@ -236,13 +236,13 @@
Source: NEWS.md
-
-