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

update MIC implementation

This commit is contained in:
2024-04-07 20:22:59 +02:00
parent 0039cb05d6
commit 94e9a4d99b
10 changed files with 94 additions and 50 deletions

View File

@ -343,7 +343,7 @@ as.sir.default <- function(x, ...) {
x[x.bak == "2"] <- "I"
x[x.bak == "3"] <- "R"
} else if (!all(is.na(x)) && !identical(levels(x), c("S", "I", "R")) && !all(x %in% c("S", "I", "R", NA))) {
if (all(x %unlike% "(R|S|I)", na.rm = TRUE)) {
if (all(x %unlike% "(S|I|R)", na.rm = TRUE)) {
# check if they are actually MICs or disks
if (all_valid_mics(x)) {
warning_("in `as.sir()`: the input seems to contain MIC values. You can transform them with `as.mic()` before running `as.sir()` to interpret them.")