aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DESCRIPTION4
-rw-r--r--NEWS.md6
-rw-r--r--R/plot.mkinfit.R11
3 files changed, 17 insertions, 4 deletions
diff --git a/DESCRIPTION b/DESCRIPTION
index ef30256e..db72a3bd 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
Package: mkin
Type: Package
Title: Kinetic Evaluation of Chemical Degradation Data
-Version: 0.9.44
-Date: 2016-06-28
+Version: 0.9.44.9000
+Date: 2016-07-27
Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre", "cph"),
email = "jranke@uni-bremen.de"),
person("Katrin", "Lindenberger", role = "ctb"),
diff --git a/NEWS.md b/NEWS.md
index 8d7a55de..fd079897 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,11 @@
# NEWS for package 'mkin'
+## mkin 0.9.45
+
+### Minor changes
+
+- `plot.mkinfit`: Plotting does not fail any more when the compiled model is not available, e.g. because it was removed from the temporary directory. In this case, the uncompiled model is now used for plotting
+
## mkin 0.9.44 (2016-06-29)
### Bug fixes
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