From 733ad09a54632d947b7db71c744158246506bac9 Mon Sep 17 00:00:00 2001 From: "Matthew L. Fidler" Date: Sun, 4 Aug 2024 18:09:11 -0500 Subject: [PATCH] Fix the `NA` runCommand that doesn't work as advertised --- R/monolixNlmixr2est.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/monolixNlmixr2est.R b/R/monolixNlmixr2est.R index 3fb53cdd..49659b59 100644 --- a/R/monolixNlmixr2est.R +++ b/R/monolixNlmixr2est.R @@ -137,6 +137,9 @@ cmd <- rxode2::rxGetControl(ui, "runCommand", "") if (is.character(cmd)) { cmd <- .monolixRunCommand + } else if (is.na(cmd)) { + .minfo("run Monolix manually and rerun nlmixr()") + return(NULL) } else if (!is.function(cmd)) { stop("invalid value for monolixControl(runCommand=)", call.=FALSE) @@ -261,6 +264,9 @@ .cmd <- rxode2::rxGetControl(.ui, "runCommand", "") if (!identical(.cmd, "")) { .monolixRunner(ui=.ui) + if (is.na(.cmd)) { + return(invisible()) + } } else { if (.hasLixoftConnectors()) { .x <- try(lixoftConnectors::loadProject(.mlxtran), silent=TRUE)