1
0
mirror of https://github.com/msberends/AMR.git synced 2025-01-24 07:44:34 +01:00

feat: Remove leading equal signs before mic levels (#181)

This commit is contained in:
Edwin van Leeuwen 2025-01-16 10:57:25 +00:00 committed by GitHub
parent 08ddbaa930
commit 1697ad37ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -196,6 +196,8 @@ 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)
# 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