aboutsummaryrefslogtreecommitdiff
path: root/R/mkinpredict.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/mkinpredict.R')
-rw-r--r--R/mkinpredict.R5
1 files changed, 5 insertions, 0 deletions
diff --git a/R/mkinpredict.R b/R/mkinpredict.R
index 5170dc6b..7ce26caf 100644
--- a/R/mkinpredict.R
+++ b/R/mkinpredict.R
@@ -23,6 +23,11 @@ mkinpredict <- function(mkinmod, odeparms, odeini, outtimes, solution_type = "de
# Get the names of the state variables in the model
mod_vars <- names(mkinmod$diffs)
+ # Order the inital values for state variables if they are named
+ if (!is.null(names(odeini))) {
+ odeini <- odeini[mod_vars]
+ }
+
# Create function for evaluation of expressions with ode parameters and initial values
evalparse <- function(string)
{

Contact - Imprint