scientific notation for MICs

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2023-10-20 15:45:00 +02:00
1 parent bcab4bc9ba
commit ca72a646d0
8 files changed
+23 -7

No files matched your search

+2
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)