1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 23:41:55 +02:00

bug: Fix the regex to remove leading = in as.mic

This commit is contained in:
Edwin van Leeuwen
2025-01-15 13:42:08 +00:00
parent e732f477a3
commit 01954271fc

View File

@ -197,8 +197,7 @@ as.mic <- function(x, na.rm = FALSE, keep_operators = "all") {
x <- gsub("=<", "<=", x, fixed = TRUE)
x <- gsub("=>", ">=", x, fixed = TRUE)
# Remove leading == and =
x <- gsub("^==", "", x, fixed = TRUE)
x <- gsub("^=", "", x, fixed = TRUE)
x <- gsub("^=+", "", x)
# dots without a leading zero must start with 0
x <- gsub("([^0-9]|^)[.]", "\\10.", x, perl = TRUE)
# values like "<=0.2560.512" should be 0.512