1
0
mirror of https://github.com/msberends/AMR.git synced 2026-03-07 15:35:20 +01:00

(v3.0.1.9027) Fixes #252 and add documentation update regarding #253

This commit is contained in:
2026-03-06 13:10:33 +01:00
parent 60e8f2bae6
commit c0a394008e
7 changed files with 20 additions and 11 deletions

View File

@@ -217,8 +217,9 @@ as.mic <- function(x, na.rm = FALSE, keep_operators = "all", round_to_next_log2
warning_("Some MICs were combined values, only the first values are kept")
x[x %like% "[0-9]/.*[0-9]"] <- gsub("/.*", "", x[x %like% "[0-9]/.*[0-9]"])
}
x <- trimws2(gsub("[\\p{L}]", "", x, perl = TRUE)) # \p{L} is the Unicode category for all letters, including those with diacritics
# remove other invalid characters
x <- gsub("[^a-zA-Z0-9.><= -]+", "", x, perl = TRUE)
x <- gsub("[^0-9.><= -]+", "", x, perl = TRUE)
# transform => to >= and =< to <=
x <- gsub("=<", "<=", x, fixed = TRUE)
x <- gsub("=>", ">=", x, fixed = TRUE)