Skip to content

Commit

Permalink
Work around improper import
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Nov 28, 2024
1 parent 1e877df commit 1349c50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/monolix2rx.R
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ monolix2rx <- function(mlxtran, update=TRUE, thetaMatType=c("sa", "lin"),
assign("dfSub", as.double(.lst$nid), envir=.ui$meta)
}
}
try(.validateModel(.ui, ci=ci, sigdig=sigdig))
try(.validateModel(.ui, ci=ci, sigdig=sigdig), silent=TRUE)
.ui <- rxode2::rxUiCompress(.ui)
class(.ui) <- c("monolix2rx", class(.ui))
.ui
Expand Down
8 changes: 6 additions & 2 deletions R/validate.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@

} else if (length(ui$predDf$cond) == 1L) {
# single endpoint
.ret <- data[, c("id", "time", "ipredSim", iwres)]
.ret <- try(data[, c("id", "time", "ipredSim", iwres)], silent=TRUE)
if (inherits(.ret, "try-error")) {
assign("predDf", NULL, envir=ui)
return(NULL)
}
if (!is.null(iwres)) {
names(.ret) <- c("id", "time", "ipred", iwres)
} else {
Expand Down Expand Up @@ -136,7 +140,7 @@
minSS=.nss,
atol=.tol, rtol=.tol,
ssAtol=100, ssRtol=100, omega=NULL,
addDosing = FALSE))
addDosing = FALSE), silent=TRUE)
.predSolve <- .subsetMonolix(.ui, .predSolve)
.nPredSolve <- length(.predSolve[, 1])
.nIpredSolve <- length(.ipredSolve[, 1])
Expand Down

0 comments on commit 1349c50

Please sign in to comment.