mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 16:42:10 +02:00
(v1.3.0) small MIC fix
This commit is contained in:
4
R/mic.R
4
R/mic.R
@ -71,8 +71,8 @@ as.mic <- function(x, na.rm = FALSE) {
|
||||
# transform => to >= and =< to <=
|
||||
x <- gsub("=<", "<=", x, fixed = TRUE)
|
||||
x <- gsub("=>", ">=", x, fixed = TRUE)
|
||||
# starting dots must start with 0
|
||||
x <- gsub("^[.]+", "0.", x)
|
||||
# dots without a leading zero must start with 0
|
||||
x <- gsub("([^0-9]|^)[.]", "\\10.", x)
|
||||
# values like "<=0.2560.512" should be 0.512
|
||||
x <- gsub(".*[.].*[.]", "0.", x)
|
||||
# remove ending .0
|
||||
|
Reference in New Issue
Block a user