From fa1c2009f7c7efc1e61e4e882ca0b0fc6ef27c31 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 12 Nov 2014 18:14:58 +0100 Subject: Fix for IORE in mkinmod --- R/mkinmod.R | 8 ++++---- man/mkinmod.Rd | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/R/mkinmod.R b/R/mkinmod.R index 8b86303f..d04f811f 100644 --- a/R/mkinmod.R +++ b/R/mkinmod.R @@ -88,11 +88,11 @@ mkinmod <- function(..., use_of_ff = "min", speclist = NULL) if(is.null(spec[[varname]]$sink)) spec[[varname]]$sink <- TRUE if(spec[[varname]]$type %in% c("SFO", "IORE", "SFORB")) { # {{{ Add decline term if (use_of_ff == "min") { # Minimum use of formation fractions + if(spec[[varname]]$type == "IORE" && length(spec[[varname]]$to) > 0) { + stop("Transformation reactions from compounds modelled with IORE\n", + "are only supported with formation fractions (use_of_ff = 'max')") + } if(spec[[varname]]$sink) { - if(spec[[varname]]$type == "IORE" && length(spec[[varname]]$to) > 0) { - stop("Transformation reactions from compounds modelled with IORE\n", - "are only supported with formation fractions (use_of_ff = 'max')") - } # If sink is required, add first-order/IORE sink term k_compound_sink <- paste("k", box_1, "sink", sep = "_") if(spec[[varname]]$type == "IORE") { diff --git a/man/mkinmod.Rd b/man/mkinmod.Rd index e6749ded..f73b78da 100644 --- a/man/mkinmod.Rd +++ b/man/mkinmod.Rd @@ -54,6 +54,11 @@ mkinmod(..., use_of_ff = "min", speclist = NULL) \item{coefmat}{ The coefficient matrix, if the system of differential equations can be represented by one. } } +\note{ + The IORE submodel is not well tested (yet). When using this model for metabolites, + you may want to read the second note in the help page to + \code{\link{mkinfit}}. +} \references{ FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence and Degradation Kinetics from Environmental Fate Studies on Pesticides in EU -- cgit v1.2.1