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

feat: Remove leading equal signs before mic levels

This commit is contained in:
Edwin van Leeuwen
2025-01-14 11:42:17 +00:00
parent 2e31ec19c3
commit e732f477a3

View File

@ -196,6 +196,9 @@ as.mic <- function(x, na.rm = FALSE, keep_operators = "all") {
# transform => to >= and =< to <=
x <- gsub("=<", "<=", x, fixed = TRUE)
x <- gsub("=>", ">=", x, fixed = TRUE)
# Remove leading == and =
x <- gsub("^==", "", x, fixed = TRUE)
x <- gsub("^=", "", x, fixed = TRUE)
# 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