diff --git a/DESCRIPTION b/DESCRIPTION
index 823db869..7ea7e8ba 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,5 +1,5 @@
Package: AMR
-Version: 1.2.0.9035
+Version: 1.2.0.9036
Date: 2020-07-22
Title: Antimicrobial Resistance Analysis
Authors@R: c(
diff --git a/NEWS.md b/NEWS.md
index 99a83252..c3ddc446 100755
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,4 +1,4 @@
-# AMR 1.2.0.9035
+# AMR 1.2.0.9036
## Last updated: 22 July 2020
### New
diff --git a/R/mo.R b/R/mo.R
index 33678255..d43bb46a 100755
--- a/R/mo.R
+++ b/R/mo.R
@@ -178,7 +178,7 @@ as.mo <- function(x,
# start off with replaced language-specific non-ASCII characters with ASCII characters
x <- parse_and_convert(x)
# replace mo codes used in older package versions
- x <- replace_old_mo_codes(x)
+ x <- replace_old_mo_codes(x, property = "mo")
# WHONET: xxx = no growth
x[tolower(as.character(paste0(x, ""))) %in% c("", "xxx", "na", "nan")] <- NA_character_
@@ -291,7 +291,7 @@ exec_as.mo <- function(x,
# start off with replaced language-specific non-ASCII characters with ASCII characters
x <- parse_and_convert(x)
# replace mo codes used in older package versions
- x <- replace_old_mo_codes(x)
+ x <- replace_old_mo_codes(x, property)
# WHONET: xxx = no growth
x[tolower(as.character(paste0(x, ""))) %in% c("", "xxx", "na", "nan")] <- NA_character_
@@ -1782,7 +1782,7 @@ parse_and_convert <- function(x) {
parsed
}
-replace_old_mo_codes <- function(x) {
+replace_old_mo_codes <- function(x, property) {
if (any(toupper(x) %in% microorganisms.translation$mo_old, na.rm = TRUE)) {
# get the ones that match
matched <- match(toupper(x), microorganisms.translation$mo_old)
@@ -1790,6 +1790,9 @@ replace_old_mo_codes <- function(x) {
mo_new <- microorganisms.translation$mo_new[matched]
# assign on places where a match was found
x[which(!is.na(matched))] <- mo_new[which(!is.na(matched))]
+ if (property != "mo") {
+ message(font_blue("NOTE: Old microbial codes (from previous package versions) were replaced with current codes used by this package.\n Please update your MO codes with as.mo()." ))
+ }
}
x
}
diff --git a/docs/404.html b/docs/404.html
index 591f1d48..6b4c48e9 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -81,7 +81,7 @@
NEWS.md
-