From 1697ad37ceca003250139a543a847d9a7164200c Mon Sep 17 00:00:00 2001 From: Edwin van Leeuwen Date: Thu, 16 Jan 2025 10:57:25 +0000 Subject: [PATCH] feat: Remove leading equal signs before mic levels (#181) --- R/mic.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/mic.R b/R/mic.R index 020872698..df1ef5071 100644 --- a/R/mic.R +++ b/R/mic.R @@ -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