Skip to content

Commit

Permalink
FIX: resolve issue of element-wise comparison introduced in 4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vkhodygo committed Nov 1, 2023
1 parent 538f614 commit 063fb6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/predictorMatrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 063fb6d

Please sign in to comment.