1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-26 07:26:13 +01:00

fix SI and IR

This commit is contained in:
MS Berends 2018-05-16 11:19:45 +02:00 committed by GitHub
parent af524626b6
commit 0d80647d41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,19 +184,13 @@ rsi_df <- function(tbl,
# transform when checking for different results
if (interpretations_to_check %in% c('SI', 'IS')) {
for (i in 1:length(ab)) {
lijst <- tbl[, ab[i]]
if ('I' %in% lijst) {
tbl[which(tbl[ab[i]] == 'I'), ][ab[i]] <- 'S'
}
tbl[which(tbl[, ab[i]] == 'I'), ab[i]] <- 'S'
}
interpretations_to_check <- 'S'
}
if (interpretations_to_check %in% c('RI', 'IR')) {
for (i in 1:length(ab)) {
lijst <- tbl[, ab[i]]
if ('I' %in% lijst) {
tbl[which(tbl[ab[i]] == 'I'), ][ab[i]] <- 'R'
}
tbl[which(tbl[, ab[i]] == 'I'), ab[i]] <- 'R'
}
interpretations_to_check <- 'R'
}