diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2014-11-12 18:14:58 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2014-11-12 18:14:58 +0100 |
commit | fa1c2009f7c7efc1e61e4e882ca0b0fc6ef27c31 (patch) | |
tree | 66b809622c89117490bd4ecb3cb22a5f9cbb4b25 | |
parent | c40ca83c28d45b127ac27732718ef8571722131b (diff) |
Fix for IORE in mkinmod
-rw-r--r-- | R/mkinmod.R | 8 | ||||
-rw-r--r-- | 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
|