aboutsummaryrefslogtreecommitdiff
path: root/R/plot.mkinfit.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2023-02-17 22:48:18 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2023-02-17 22:48:18 +0100
commitbcd98a1fa3cd2fb4b7105b7ec6c129ca18f872e8 (patch)
tree80ce30d68fb33fe92a0939e1f5be9790263909c1 /R/plot.mkinfit.R
parent5811ab93d856bb339a35eef2d23266fcb781cbe7 (diff)
Update online docs, fix bug that surfaced
Diffstat (limited to 'R/plot.mkinfit.R')
-rw-r--r--R/plot.mkinfit.R11
1 files changed, 6 insertions, 5 deletions
diff --git a/R/plot.mkinfit.R b/R/plot.mkinfit.R
index cafccae9..9606507a 100644
--- a/R/plot.mkinfit.R
+++ b/R/plot.mkinfit.R
@@ -140,15 +140,16 @@ plot.mkinfit <- function(x, fit = x,
rownames(subset(fit$fixed, type == "deparm")))
odeparms <- parms.all[odenames]
+
+ if (solution_type == "deSolve" & !is.null(fit$mkinmod$cf)) {
+ fit$mkinmod[["symbols"]] <- deSolve::checkDLL(dllname = fit$mkinmod$dll_info[["name"]],
+ func = "diffs", initfunc = "initpar",
+ jacfunc = NULL, nout = 0, outnames = NULL)
+ }
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)
- }
out <- as.data.frame(out)
names(col_obs) <- names(pch_obs) <- names(lty_obs) <- obs_vars

Contact - Imprint