From 70147321fa52d7bf2af56f051929d5c821f65e44 Mon Sep 17 00:00:00 2001 From: Olivier Date: Mon, 7 Aug 2023 21:13:30 -0700 Subject: [PATCH 1/3] feat: handle "dmY HM" format --- inst/acorn/www/R/data/07_ast_interpretation.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/acorn/www/R/data/07_ast_interpretation.R b/inst/acorn/www/R/data/07_ast_interpretation.R index 5ade939..4f2da49 100644 --- a/inst/acorn/www/R/data/07_ast_interpretation.R +++ b/inst/acorn/www/R/data/07_ast_interpretation.R @@ -153,7 +153,7 @@ tmp.amr2 <- cbind(tmp.amr, tmp.amr1) # Combine both data.frames amr <- bind_rows(tmp.amr2 %>% mutate_all(as.character), amr %>% mutate_all(as.character)) %>% - mutate(specdate = parse_date_time(specdate, c("dmY", "Ymd", "dbY", "Ymd HMS")), + mutate(specdate = parse_date_time(specdate, c("dmY", "Ymd", "dbY", "Ymd HMS", "dmY HM")), spectype.whonet = as.numeric(spectype.whonet), specid.acorn = as.numeric(specid.acorn ), orgnum.acorn = as.numeric(orgnum.acorn)) From cc0c115a4deb86b5a06ad8574eab84a9612b0284 Mon Sep 17 00:00:00 2001 From: Olivier Date: Mon, 7 Aug 2023 21:13:52 -0700 Subject: [PATCH 2/3] fix: unicode mg --- inst/acorn/www/R/data/06_make_ast_group.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inst/acorn/www/R/data/06_make_ast_group.R b/inst/acorn/www/R/data/06_make_ast_group.R index 3e5a5ea..f763137 100644 --- a/inst/acorn/www/R/data/06_make_ast_group.R +++ b/inst/acorn/www/R/data/06_make_ast_group.R @@ -61,7 +61,9 @@ for(i in amr.var$varname.ast) { # Select the variables containing raw AST data amr[,i] <- gsub("<=", "", amr[,i]) # Replaces <= with blank amr[,i] <- gsub(">=", "", amr[,i]) # Replaces >= with blank amr[,i] <- gsub("\u2264", "", amr[,i]) # Replaces unicode-2264 (unicode <= with blank) [UPDATED ACORN2] - amr[,i] <- gsub("\u2265", "", amr[,i]) # Replaces unicode-2264 (unicode >= with blank) [UPDATED ACORN2] + amr[,i] <- gsub("\u2265", "", amr[,i]) # Replaces unicode-2265 (unicode >= with blank) [UPDATED ACORN2] + amr[,i] <- gsub("\u00b5g/ml", "", amr[,i]) # Replaces unicode-00b5 g/ml (unicode ug/ml with blank) [UPDATED ACORN2] + amr[,i] <- gsub("\u03bcg/ml", "", amr[,i]) # Replaces unicode-03bc g/ml (unicode ug/ml with blank) [UPDATED ACORN2] amr[,i] <- gsub("/.*", "", amr[,i]) # Anything with a slash MIC (e.g. co-amoxiclav 8/4), remove the "/" and the second MIC which should be the b-lac inhibitor or sulfa, for co-trimoxazole [UPDATED ACORN2] amr[,i] <- gsub("<[0-9]{1,3}", "0", amr[,i]) # Anything with < followed by a number (upto 3 digits) is replaced by "0" (i.e. low MIC = S) amr[,i] <- gsub(">[0-9]{1,3}", "512", amr[,i]) # Anything with > followed by a number (upto 3 digits) is replaced by "512" (i.e. high MIC = R) From d08a06a5f7c294019f7f9770576c0c5a366e9cb5 Mon Sep 17 00:00:00 2001 From: Olivier Date: Mon, 7 Aug 2023 21:14:19 -0700 Subject: [PATCH 3/3] docs: `v2.6.2` --- DESCRIPTION | 2 +- inst/acorn/app.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7c46235..57fa467 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: acorn Type: Package Title: A Dashboard for ACORN AMR Data -Version: 2.6.1 +Version: 2.6.2 Authors@R: c(person(given = "Olivier", family = "Celhay", email = "olivier.celhay@gmail.com", role = c("aut", "cre"), diff --git a/inst/acorn/app.R b/inst/acorn/app.R index 179b279..71f8e6f 100644 --- a/inst/acorn/app.R +++ b/inst/acorn/app.R @@ -1,4 +1,4 @@ -app_version <- "2.6.1" # Make sure that the app version is identical in DESCRIPTION +app_version <- "2.6.2" # Make sure that the app version is identical in DESCRIPTION session_start_time <- format(Sys.time(), "%Y-%m-%d_%HH%M") # Increase limit upload to 50 Mb.