Skip to content

Commit

Permalink
Be a bit more careful of ipred/pred solve
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Jun 3, 2024
1 parent e32fb6e commit 2fcdc43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/validate.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
} else {
.ssRtol <- .rx$ssRtol
}
.ipredSolve <- NULL
.predSolve <- NULL
if (!is.null(.rx$nonmemData) && validate) {
.nonmemData <- .rx$nonmemData
.model <- .rx$simulationModelIwres
Expand Down Expand Up @@ -180,6 +182,7 @@
addDosing = FALSE))
.minfo("done")
}
if (.doIpred && is.null(.ipredSolve)) .doIpred <- FALSE
if (.doIpred && !inherits(.ipredSolve, "try-error")) {
if (is.null(.rx$predDf)) {
.w <- which(tolower(names(.ipredSolve)) == "y")
Expand Down Expand Up @@ -276,7 +279,7 @@
ssAtol=.ssAtol, ssRtol=.ssRtol,
addDosing = FALSE))
.minfo("done")
if (!inherits(.predSolve, "try-error")) {
if (!is.null(.predSolve) && !inherits(.predSolve, "try-error")) {
if (is.null(.rx$predDf)) {
.w <- which(tolower(names(.predSolve)) == "y")
.y <- names(.predSolve)[.w]
Expand Down

0 comments on commit 2fcdc43

Please sign in to comment.