aboutsummaryrefslogtreecommitdiff
path: root/R/plot.mkinfit.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2016-09-10 03:13:33 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2016-09-10 03:13:33 +0200
commitfe16512e7f9e875340d498b01920e5967a2b7bd0 (patch)
tree3547afc4844006a3e29dd9801c1aee513ef69c67 /R/plot.mkinfit.R
parente72f9a93d8ad6c5a9aa8fc5f015781a194e399b4 (diff)
Plot using R model if compiled model is not available
Diffstat (limited to 'R/plot.mkinfit.R')
-rw-r--r--R/plot.mkinfit.R11
1 files changed, 9 insertions, 2 deletions
diff --git a/R/plot.mkinfit.R b/R/plot.mkinfit.R
index 303effb5..00598737 100644
--- a/R/plot.mkinfit.R
+++ b/R/plot.mkinfit.R
@@ -53,8 +53,15 @@ plot.mkinfit <- function(x, fit = x,
rownames(subset(fit$fixed, type == "deparm")))
odeparms <- parms.all[odenames]
- out <- mkinpredict(fit$mkinmod, odeparms, odeini, outtimes,
- solution_type = solution_type, atol = fit$atol, rtol = fit$rtol)
+ out <- try(mkinpredict(fit$mkinmod, odeparms, odeini, outtimes,
+ solution_type = solution_type, atol = fit$atol, rtol = fit$rtol),
+ silent = TRUE)
+
+ if (inherits(out, "try-error")) {
+ out <- mkinpredict(fit$mkinmod, odeparms, odeini, outtimes,
+ solution_type = solution_type, atol = fit$atol, rtol = fit$rtol,
+ use_compiled = FALSE)
+ }
names(col_obs) <- names(pch_obs) <- names(lty_obs) <- obs_vars

Contact - Imprint