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
1 changed files with 2 additions and 8 deletions

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'
}