diff --git a/DESCRIPTION b/DESCRIPTION index de72b87d..b206e671 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 0.8.0.9010 +Version: 0.8.0.9011 Date: 2019-11-04 Title: Antimicrobial Resistance Analysis Authors@R: c( diff --git a/NEWS.md b/NEWS.md index fc9e9876..13f9a7a2 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 0.8.0.9010 +# AMR 0.8.0.9011 Last updated: 04-Nov-2019 ### New diff --git a/R/misc.R b/R/misc.R index 8a275ec8..cfa1e8d6 100755 --- a/R/misc.R +++ b/R/misc.R @@ -36,11 +36,17 @@ search_type_in_df <- function(x, type) { found <- NULL colnames(x) <- trimws(colnames(x)) - + # -- mo if (type == "mo") { if ("mo" %in% lapply(x, class)) { found <- colnames(x)[lapply(x, class) == "mo"][1] + } else if ("mo" %in% colnames(x) & + suppressWarnings( + all(x$mo %in% c(NA, + microorganisms$mo, + microorganisms.translation$mo_old)))) { + found <- "mo" } else if (any(colnames(x) %like% "^(mo|microorganism|organism|bacteria|bacterie)s?$")) { found <- colnames(x)[colnames(x) %like% "^(mo|microorganism|organism|bacteria|bacterie)s?$"][1] } else if (any(colnames(x) %like% "^(microorganism|organism|bacteria|bacterie)")) { @@ -48,7 +54,7 @@ search_type_in_df <- function(x, type) { } else if (any(colnames(x) %like% "species")) { found <- colnames(x)[colnames(x) %like% "species"][1] } - + } # -- key antibiotics if (type == "keyantibiotics") { diff --git a/docs/404.html b/docs/404.html index e140062f..77be84b8 100644 --- a/docs/404.html +++ b/docs/404.html @@ -84,7 +84,7 @@ AMR (for R) - 0.8.0.9010 + 0.8.0.9011 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 91e37b81..2f50662f 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -84,7 +84,7 @@ AMR (for R) - 0.8.0.9010 + 0.8.0.9011 diff --git a/docs/articles/index.html b/docs/articles/index.html index 9433c5c1..ddeedb7d 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -84,7 +84,7 @@ AMR (for R) - 0.8.0.9010 + 0.8.0.9011 diff --git a/docs/authors.html b/docs/authors.html index 56db7999..7932e0b8 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -84,7 +84,7 @@ AMR (for R) - 0.8.0.9010 + 0.8.0.9011 diff --git a/docs/index.html b/docs/index.html index 54e4eee8..13df3ecc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -45,7 +45,7 @@ AMR (for R) - 0.8.0.9010 + 0.8.0.9011 diff --git a/docs/news/index.html b/docs/news/index.html index b81fcb29..0c24888d 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -84,7 +84,7 @@ AMR (for R) - 0.8.0.9010 + 0.8.0.9011 @@ -231,9 +231,9 @@ -
+

-AMR 0.8.0.9010 Unreleased +AMR 0.8.0.9011 Unreleased

Last updated: 04-Nov-2019

@@ -1333,7 +1333,7 @@ Using as.mo(..., allow_uncertain = 3)

Contents