diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2019-10-25 00:37:42 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2019-10-25 02:03:54 +0200 |
commit | 0a3eb0893cb4bd1b12f07a79069d1c7f5e991495 (patch) | |
tree | 1bf0ffeb710b3438fee224d0a657606b4c36b495 /R/DFOP.solution.R | |
parent | 053bf27d3f265c7a7378e2df3e00cf891e0d1bb2 (diff) |
Use roxygen for functions and methods
Diffstat (limited to 'R/DFOP.solution.R')
-rw-r--r-- | R/DFOP.solution.R | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/R/DFOP.solution.R b/R/DFOP.solution.R index 8531cfed..608e7e18 100644 --- a/R/DFOP.solution.R +++ b/R/DFOP.solution.R @@ -1,5 +1,27 @@ -DFOP.solution <- function(t, parent.0, k1, k2, g)
-{
- parent = g * parent.0 * exp(-k1 * t) +
- (1 - g) * parent.0 * exp(-k2 * t)
-}
+#' Double First-Order in Parallel kinetics +#' +#' Function describing decline from a defined starting value using the sum of +#' two exponential decline functions. +#' +#' @param t Time. +#' @param parent.0 Starting value for the response variable at time zero. +#' @param k1 First kinetic constant. +#' @param k2 Second kinetic constant. +#' @param g Fraction of the starting value declining according to the first +#' kinetic constant. +#' @return The value of the response variable at time \code{t}. +#' @references FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence +#' and Degradation Kinetics from Environmental Fate Studies on Pesticides in +#' EU Registration} Report of the FOCUS Work Group on Degradation Kinetics, +#' EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +#' \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics} +#' @examples +#' +#' plot(function(x) DFOP.solution(x, 100, 5, 0.5, 0.3), 0, 4, ylim = c(0,100)) +#' +#' @export +DFOP.solution <- function(t, parent.0, k1, k2, g) +{ + parent = g * parent.0 * exp(-k1 * t) + + (1 - g) * parent.0 * exp(-k2 * t) +} |