aboutsummaryrefslogtreecommitdiff
path: root/R/mkinpredict.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-11-27 21:52:21 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2020-11-27 21:52:21 +0100
commit7a349394413d533d7dab5d18bb29bc761dcd5659 (patch)
tree5817d52007a08405fd3120f32656a813d2422389 /R/mkinpredict.R
parenteaf3073bf0aeee812574b32f7e557218c61c6255 (diff)
parent1e3fd1bef2a0ec1c8b73fcfefdd62fd3463bc87c (diff)
Merge branch 'saving_compiled_code'
Diffstat (limited to 'R/mkinpredict.R')
-rw-r--r--R/mkinpredict.R12
1 files changed, 6 insertions, 6 deletions
diff --git a/R/mkinpredict.R b/R/mkinpredict.R
index 7222e247..277c3604 100644
--- a/R/mkinpredict.R
+++ b/R/mkinpredict.R
@@ -38,7 +38,6 @@
#' @param \dots Further arguments passed to the ode solver in case such a
#' solver is used.
#' @import deSolve
-#' @importFrom inline getDynLib
#' @return A matrix with the numeric solution in wide format
#' @author Johannes Ranke
#' @examples
@@ -117,7 +116,7 @@ mkinpredict.mkinmod <- function(x,
solution_type = "deSolve",
use_compiled = "auto",
method.ode = "lsoda", atol = 1e-8, rtol = 1e-10,
- map_output = TRUE,
+ map_output = TRUE,
na_stop = TRUE,
...)
{
@@ -170,12 +169,13 @@ mkinpredict.mkinmod <- function(x,
if (solution_type == "deSolve") {
if (!is.null(x$cf) & use_compiled[1] != FALSE) {
- out <- ode(
+
+ out <- deSolve::ode(
y = odeini,
times = outtimes,
- func = "func",
+ func = "diffs",
initfunc = "initpar",
- dllname = getDynLib(x$cf)[["name"]],
+ dllname = inline::getDynLib(x$cf)[["name"]],
parms = odeparms[x$parms], # Order matters when using compiled models
method = method.ode,
atol = atol,
@@ -195,7 +195,7 @@ mkinpredict.mkinmod <- function(x,
}
return(list(c(diffs)))
}
- out <- ode(
+ out <- deSolve::ode(
y = odeini,
times = outtimes,
func = mkindiff,

Contact - Imprint