diff --git a/DESCRIPTION b/DESCRIPTION index 4fb8a474..5a0ed1ae 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR Version: 1.3.0 -Date: 2020-07-29 +Date: 2020-07-30 Title: Antimicrobial Resistance Analysis Authors@R: c( person(role = c("aut", "cre"), diff --git a/R/mic.R b/R/mic.R index 32c64ad4..1243e89c 100755 --- a/R/mic.R +++ b/R/mic.R @@ -71,8 +71,8 @@ as.mic <- function(x, na.rm = FALSE) { # transform => to >= and =< to <= x <- gsub("=<", "<=", x, fixed = TRUE) x <- gsub("=>", ">=", x, fixed = TRUE) - # starting dots must start with 0 - x <- gsub("^[.]+", "0.", x) + # dots without a leading zero must start with 0 + x <- gsub("([^0-9]|^)[.]", "\\10.", x) # values like "<=0.2560.512" should be 0.512 x <- gsub(".*[.].*[.]", "0.", x) # remove ending .0 diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html index f6101862..aa04f346 100644 --- a/docs/articles/AMR.html +++ b/docs/articles/AMR.html @@ -39,7 +39,7 @@
@@ -186,7 +186,7 @@vignettes/AMR.Rmd
AMR.Rmd
Note: values on this page will change with every website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was generated on 24 July 2020.
+Note: values on this page will change with every website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was generated on 30 July 2020.