diff --git a/R/predictorMatrix.R b/R/predictorMatrix.R index f69b0e5d9..4d1399358 100644 --- a/R/predictorMatrix.R +++ b/R/predictorMatrix.R @@ -140,7 +140,10 @@ edit.predictorMatrix <- function(predictorMatrix, user.visitSequence, maxit) { # edit predictorMatrix to a monotone pattern - if (maxit == 1L && !is.null(user.visitSequence) && user.visitSequence == "monotone") { + if (maxit == 1L && + !is.null(user.visitSequence) && + length(user.visitSequence) == 1 && + user.visitSequence == "monotone") { for (i in 1L:length(visitSequence)) { predictorMatrix[visitSequence[i], visitSequence[i:length(visitSequence)]] <- 0 }