From 063fb6dc8f52710cf0c2dcc1932d266a6582a8d5 Mon Sep 17 00:00:00 2001 From: Vladimir Khodygo Date: Wed, 1 Nov 2023 18:54:48 +0000 Subject: [PATCH] FIX: resolve issue of element-wise comparison introduced in 4.3.0 --- R/predictorMatrix.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 }