Skip to content

Commit

Permalink
check for file existence
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Sep 18, 2024
1 parent 0be2437 commit a475712
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/monolix2rx.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ monolix2rx <- function(mlxtran, update=TRUE, thetaMatType=c("sa", "lin"),
}
.admd <- NULL
.cmt <- NULL
if (!is.null(.mlxtran$MODEL$LONGITUDINAL$LONGITUDINAL$file)) {
if (!file.exists(.mlxtran$MODEL$LONGITUDINAL$LONGITUDINAL$file)) {
stop("the model file '", .mlxtran$MODEL$LONGITUDINAL$LONGITUDINAL$file, "' does not exist\nyou may need to setup the model library to complete translation",
call.=FALSE)
}
}
if (is.null(.mlxtran$MODEL$LONGITUDINAL$EQUATION) &&
!is.null(.mlxtran$MODEL$LONGITUDINAL$PK)) {
.e <- .equation("", .mlxtran$MODEL$LONGITUDINAL$PK)
Expand Down

0 comments on commit a475712

Please sign in to comment.