Skip to content

Commit

Permalink
Make sure .wdvid len is 1
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Sep 24, 2024
1 parent 0c37461 commit dabd7b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/poped.R
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,7 @@ rxUiGet.popedOptsw <- function(x, ...) {
if (is.null(.env$idSamples[[.id]])) {
.curData <- .obs[.obs[[.wid]] == .id, ]
.env$idSamples[[.id]] <- .curData[[.wtime]]
if (!is.na(.wdvid)) {
if (length(.wdvid) == 1L && !is.na(.wdvid)) {
.env$idDvid[[.id]] <- .curData[[.wdvid]]
}
if (length(.env$idSamples[[.id]]) > .env$maxNumSamples) {
Expand Down Expand Up @@ -1730,7 +1730,7 @@ rxUiGet.popedOptsw <- function(x, ...) {
.env$xtT <- c(.env$xtT,
paste0("xt[", i, ", ", deparse1(seq_along(.time)),
"] <- ", paste(deparse(.time), collapse="\n")))
if (!is.na(.wdvid)) {
if (length(.wdvid) == 1L && !is.na(.wdvid)) {
.env$model_switch[i, seq_along(.time)] <- .env$idDvid[[.id]]
.env$model_switchT <- c(.env$model_switchT,
paste0("model_switch[", i, ", ", deparse1(seq_along(.time)),
Expand Down

0 comments on commit dabd7b7

Please sign in to comment.