diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2016-09-10 03:13:33 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2016-09-10 03:13:33 +0200 |
commit | fe16512e7f9e875340d498b01920e5967a2b7bd0 (patch) | |
tree | 3547afc4844006a3e29dd9801c1aee513ef69c67 /R | |
parent | e72f9a93d8ad6c5a9aa8fc5f015781a194e399b4 (diff) |
Plot using R model if compiled model is not available
Diffstat (limited to 'R')
-rw-r--r-- | R/plot.mkinfit.R | 11 |
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 |