Skip to content

Commit

Permalink
Read files relative to .mlxtran file
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Sep 18, 2024
1 parent a475712 commit bc93d09
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions R/monolix2rx.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,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)
}
withr::with_dir(.monolixGetPwd(.mlxtran), {
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)) {
Expand Down

0 comments on commit bc93d09

Please sign in to comment.