Skip to content

Commit

Permalink
Merge pull request #599 from vkhodygo/r4.3_fix
Browse files Browse the repository at this point in the history
FIX: resolve issue of element-wise comparison introduced in 4.3.0
  • Loading branch information
stefvanbuuren authored Nov 20, 2023
2 parents 538f614 + 063fb6d commit 3abe393
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 3abe393

Please sign in to comment.