1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 22:41:52 +02:00

scientific notation for MICs

This commit is contained in:
2023-10-20 15:45:00 +02:00
parent bcab4bc9ba
commit ca72a646d0
8 changed files with 23 additions and 7 deletions

View File

@ -184,6 +184,8 @@ as.mic <- function(x, na.rm = FALSE) {
# comma to period
x <- gsub(",", ".", x, fixed = TRUE)
# transform scientific notation
x[x %like% "[-]?[0-9]+([.][0-9]+)?e[-]?[0-9]+"] <- as.double(x[x %like% "[-]?[0-9]+([.][0-9]+)?e[-]?[0-9]+"])
# transform Unicode for >= and <=
x <- gsub("\u2264", "<=", x, fixed = TRUE)
x <- gsub("\u2265", ">=", x, fixed = TRUE)