aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--DESCRIPTION2
-rw-r--r--NAMESPACE1
-rw-r--r--R/PEC_soil.R6
-rw-r--r--docs/authors.html2
-rw-r--r--docs/index.html36
-rw-r--r--docs/pkgdown.yml2
-rw-r--r--docs/reference/FOCUS_GW_scenarios_2012.html2
-rw-r--r--docs/reference/FOCUS_PELMO_crop_sze_names.html2
-rw-r--r--docs/reference/FOCUS_PELMO_crops.html2
-rw-r--r--docs/reference/FOCUS_PELMO_location_codes.html2
-rw-r--r--docs/reference/FOCUS_Step_12_scenarios.html2
-rw-r--r--docs/reference/FOMC_actual_twa.html2
-rw-r--r--docs/reference/GUS.html2
-rw-r--r--docs/reference/PEC_FOMC_accu_rel.html163
-rw-r--r--docs/reference/PEC_soil.html24
-rw-r--r--docs/reference/PEC_sw_drainage_UK.html2
-rw-r--r--docs/reference/PEC_sw_drift.html2
-rw-r--r--docs/reference/PEC_sw_exposit_runoff.html2
-rw-r--r--docs/reference/PEC_sw_focus.html2
-rw-r--r--docs/reference/PEC_sw_sed.html2
-rw-r--r--docs/reference/PELMO_path.html2
-rw-r--r--docs/reference/PELMO_runs.html4
-rw-r--r--docs/reference/SFO_actual_twa.html2
-rw-r--r--docs/reference/SSLRC_mobility_classification.html2
-rw-r--r--docs/reference/TOXSWA_cwa.html2
-rw-r--r--docs/reference/chent_focus_sw.html2
-rw-r--r--docs/reference/create_run_list.html2
-rw-r--r--docs/reference/drift_data_JKI.html2
-rw-r--r--docs/reference/endpoint.html2
-rw-r--r--docs/reference/focus_80th.html2
-rw-r--r--docs/reference/geomean.html2
-rw-r--r--docs/reference/get_flux.html2
-rw-r--r--docs/reference/get_interval.html2
-rw-r--r--docs/reference/get_vertex.html141
-rw-r--r--docs/reference/index.html2
-rw-r--r--docs/reference/max_twa.html2
-rw-r--r--docs/reference/one_box.html2
-rw-r--r--docs/reference/perc_runoff_exposit.html2
-rw-r--r--docs/reference/perc_runoff_reduction_exposit.html2
-rw-r--r--docs/reference/pesticide.txt2
-rw-r--r--docs/reference/pfm_degradation.html2
-rw-r--r--docs/reference/plot.TOXSWA_cwa.html2
-rw-r--r--docs/reference/plot.one_box.html2
-rw-r--r--docs/reference/read.TOXSWA_cwa.html2
-rw-r--r--docs/reference/sawtooth.html2
-rw-r--r--docs/reference/soil_scenario_data_EFSA_2015.html2
-rw-r--r--docs/reference/soil_scenario_data_EFSA_2017.html2
-rw-r--r--docs/reference/sum_periods.html2
-rw-r--r--docs/reference/twa.html2
-rw-r--r--man/PEC_FOMC_accu_rel.Rd21
-rw-r--r--man/PEC_soil.Rd6
-rw-r--r--man/get_vertex.Rd12
-rw-r--r--tests/testthat/test_PEC_soil.R20
54 files changed, 449 insertions, 75 deletions
diff --git a/ChangeLog b/ChangeLog
index 69d5e6b..37e9c30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+commit ff7e67a4d3415419dd3f712ef1af7467ebf65508
+Author: Johannes Ranke <jranke@uni-bremen.de>
+Date: 2018-09-21 19:39:44 +0200
+
+ Support FOMC in PEC_soil
+
commit 03c3035ca01c66b6a1352f7e509753fe2d057af2
Author: Johannes Ranke <jranke@uni-bremen.de>
Date: 2018-07-11 03:41:43 +0200
diff --git a/DESCRIPTION b/DESCRIPTION
index 932a4c8..e526ff0 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -2,7 +2,7 @@ Package: pfm
Type: Package
Title: Utilities for Pesticide Fate Modelling
Version: 0.5.2
-Date: 2018-09-20
+Date: 2018-09-22
Authors@R: person("Johannes Ranke", email = "jranke@uni-bremen.de",
role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0003-4371-6538"))
diff --git a/NAMESPACE b/NAMESPACE
index 229ea70..02f2e73 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -17,6 +17,7 @@ export(FOCUS_PELMO_crops)
export(FOCUS_PELMO_location_codes)
export(FOMC_actual_twa)
export(GUS)
+export(PEC_FOMC_accu_rel)
export(PEC_soil)
export(PEC_sw_drainage_UK)
export(PEC_sw_drift)
diff --git a/R/PEC_soil.R b/R/PEC_soil.R
index 513136e..091149c 100644
--- a/R/PEC_soil.R
+++ b/R/PEC_soil.R
@@ -302,7 +302,7 @@ PEC_soil <- function(rate, rate_units = "g/ha", interception = 0,
f_accu = get_vertex(x = 8:10, y = PEC_FOMC_accu_rel(n = 10, interval, FOMC)[8:10])$yv
warning("The long term calculation is based on a pseudo-plateau constructed\n ",
"by fitting a parabola through the residues after 8, 9 and 10 years.\n ",
- "This is the method used by the ESCAPE software tool.\n ",
+ "This is the method used by the ESCAPE software tool for separate consideration of residues.\n ",
"Please check the validity by specifying e.g. n_periods = 20 or 50.")
} else {
f_accu = X/(1 - X) # part of (A2)
@@ -367,7 +367,7 @@ PEC_soil <- function(rate, rate_units = "g/ha", interception = 0,
PEC_FOMC_accu_rel <- function(n, interval, FOMC) {
PEC_accu_rel <- 0
for (i in 1:(n - 1)) {
- PEC_accu_rel[i + 1] <- PEC_accu_rel[i] + mkin::FOMC.solution(i * interval, 1,
+ PEC_accu_rel[i + 1] <- PEC_accu_rel[i] + mkin::FOMC.solution(i * interval, 1,
FOMC[["alpha"]], FOMC[["beta"]])
}
return(PEC_accu_rel)
@@ -376,7 +376,7 @@ PEC_FOMC_accu_rel <- function(n, interval, FOMC) {
#' Fit a parabola through three points
#'
#' This was inspired by an answer on stackoverflow
-#' https://stackoverflow.com/a/717791
+#' https://stackoverflow.com/a/717791
get_vertex <- function(x, y) {
m <- cbind(x^2, x, 1)
m_inv <- solve(m)
diff --git a/docs/authors.html b/docs/authors.html
index e128b4d..718d419 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -58,7 +58,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/index.html b/docs/index.html
index 70a1fed..a6429d3 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -31,7 +31,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
@@ -69,28 +69,28 @@
<div class="page-header"><h1 class="hasAnchor">
<a href="#pfm" class="anchor"></a>pfm</h1></div>
<p>The R package <strong>pfm</strong> provides some utilities for fate modelling, including dealing with FOCUS pesticide fate modelling tools, (currently only TOXSWA cwa and out files), made available under the GNU public license. This means:</p>
-<div class="sourceCode"><pre class="sourceCode R"><code class="sourceCode r">This program is free software<span class="op">:</span><span class="st"> </span>you can redistribute it and<span class="op">/</span>or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation, either version <span class="dv">3</span> of the License, <span class="kw">or</span> (at your option) any later
-version.
-
-This program is distributed <span class="cf">in</span> the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU General Public License <span class="cf">for</span> more
-details.
-
-You should have received a copy of the GNU General Public License along with
-this program. If not, see <span class="op">&lt;</span>http<span class="op">:</span><span class="er">//</span>www.gnu.org<span class="op">/</span>licenses<span class="op">/</span><span class="er">&gt;</span></code></pre></div>
+<div class="sourceCode" id="cb1"><pre class="sourceCode R"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1">This program is free software<span class="op">:</span><span class="st"> </span>you can redistribute it and<span class="op">/</span>or modify it under</a>
+<a class="sourceLine" id="cb1-2" data-line-number="2">the terms of the GNU General Public License as published by the Free Software</a>
+<a class="sourceLine" id="cb1-3" data-line-number="3">Foundation, either version <span class="dv">3</span> of the License, <span class="kw">or</span> (at your option) any later</a>
+<a class="sourceLine" id="cb1-4" data-line-number="4">version.</a>
+<a class="sourceLine" id="cb1-5" data-line-number="5"></a>
+<a class="sourceLine" id="cb1-6" data-line-number="6">This program is distributed <span class="cf">in</span> the hope that it will be useful, but WITHOUT</a>
+<a class="sourceLine" id="cb1-7" data-line-number="7">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</a>
+<a class="sourceLine" id="cb1-8" data-line-number="8">FOR A PARTICULAR PURPOSE. See the GNU General Public License <span class="cf">for</span> more</a>
+<a class="sourceLine" id="cb1-9" data-line-number="9">details.</a>
+<a class="sourceLine" id="cb1-10" data-line-number="10"></a>
+<a class="sourceLine" id="cb1-11" data-line-number="11">You should have received a copy of the GNU General Public License along with</a>
+<a class="sourceLine" id="cb1-12" data-line-number="12">this program. If not, see <span class="op">&lt;</span>http<span class="op">:</span><span class="er">//</span>www.gnu.org<span class="op">/</span>licenses<span class="op">/</span><span class="er">&gt;</span></a></code></pre></div>
<div id="installation" class="section level2">
<h2 class="hasAnchor">
<a href="#installation" class="anchor"></a>Installation</h2>
<p>The easiest way to install the package is probably to use <a href="https://cran.r-project.org/package=drat">drat</a>:</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">install.packages</span>(<span class="st">"drat"</span>)
-drat<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/drat/topics/addRepo">addRepo</a></span>(<span class="st">"jranke"</span>)
-<span class="kw">install.packages</span>(<span class="st">"pfm"</span>)</code></pre></div>
+<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="kw">install.packages</span>(<span class="st">"drat"</span>)</a>
+<a class="sourceLine" id="cb2-2" data-line-number="2">drat<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/drat/topics/addRepo">addRepo</a></span>(<span class="st">"jranke"</span>)</a>
+<a class="sourceLine" id="cb2-3" data-line-number="3"><span class="kw">install.packages</span>(<span class="st">"pfm"</span>)</a></code></pre></div>
<p>Alternatively you can install the package using the <code>devtools</code> package. Using <code>quick = TRUE</code> skips docs, multiple-architecture builds, demos, and vignettes.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(devtools)
-<span class="kw"><a href="http://www.rdocumentation.org/packages/devtools/topics/install_github">install_github</a></span>(<span class="st">"jranke/pfm"</span>, <span class="dt">quick =</span> <span class="ot">TRUE</span>)</code></pre></div>
+<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="kw">library</span>(devtools)</a>
+<a class="sourceLine" id="cb3-2" data-line-number="2"><span class="kw"><a href="http://www.rdocumentation.org/packages/devtools/topics/install_github">install_github</a></span>(<span class="st">"jranke/pfm"</span>, <span class="dt">quick =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
</div>
<div id="use" class="section level2">
<h2 class="hasAnchor">
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 6e67788..7908647 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -1,4 +1,4 @@
-pandoc: 1.19.2.4
+pandoc: 2.2.1
pkgdown: 1.1.0
pkgdown_sha: ~
articles: []
diff --git a/docs/reference/FOCUS_GW_scenarios_2012.html b/docs/reference/FOCUS_GW_scenarios_2012.html
index af6d243..65a6df2 100644
--- a/docs/reference/FOCUS_GW_scenarios_2012.html
+++ b/docs/reference/FOCUS_GW_scenarios_2012.html
@@ -62,7 +62,7 @@ soil definitions are from page 46ff. from FOCUS (2012)." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/FOCUS_PELMO_crop_sze_names.html b/docs/reference/FOCUS_PELMO_crop_sze_names.html
index 4eed679..4612df6 100644
--- a/docs/reference/FOCUS_PELMO_crop_sze_names.html
+++ b/docs/reference/FOCUS_PELMO_crop_sze_names.html
@@ -64,7 +64,7 @@ files used for Beans (field) and Beans (vegetable) are the same." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/FOCUS_PELMO_crops.html b/docs/reference/FOCUS_PELMO_crops.html
index e4928cd..77b5c01 100644
--- a/docs/reference/FOCUS_PELMO_crops.html
+++ b/docs/reference/FOCUS_PELMO_crops.html
@@ -65,7 +65,7 @@ in the three letter code, i.e. 'Peas (animals)' has the code ape." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/FOCUS_PELMO_location_codes.html b/docs/reference/FOCUS_PELMO_location_codes.html
index 8177747..c06c729 100644
--- a/docs/reference/FOCUS_PELMO_location_codes.html
+++ b/docs/reference/FOCUS_PELMO_location_codes.html
@@ -62,7 +62,7 @@ indexed by three letter acronyms." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/FOCUS_Step_12_scenarios.html b/docs/reference/FOCUS_Step_12_scenarios.html
index b9f2e0d..3b92377 100644
--- a/docs/reference/FOCUS_Step_12_scenarios.html
+++ b/docs/reference/FOCUS_Step_12_scenarios.html
@@ -62,7 +62,7 @@ The text file is not included in the package as its licence is not clear." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/FOMC_actual_twa.html b/docs/reference/FOMC_actual_twa.html
index 685edc3..070788b 100644
--- a/docs/reference/FOMC_actual_twa.html
+++ b/docs/reference/FOMC_actual_twa.html
@@ -61,7 +61,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/GUS.html b/docs/reference/GUS.html
index 65763bc..59fd888 100644
--- a/docs/reference/GUS.html
+++ b/docs/reference/GUS.html
@@ -63,7 +63,7 @@ $$GUS = \log_{10} DT50_{soil} (4 - \log_{10} K_{oc})$$" />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/PEC_FOMC_accu_rel.html b/docs/reference/PEC_FOMC_accu_rel.html
new file mode 100644
index 0000000..7999e32
--- /dev/null
+++ b/docs/reference/PEC_FOMC_accu_rel.html
@@ -0,0 +1,163 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Get the relative accumulation of an FOMC model over multiples of an interval — PEC_FOMC_accu_rel • pfm</title>
+
+<!-- jquery -->
+<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
+<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
+
+<!-- Font Awesome icons -->
+<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
+
+<!-- sticky kit -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+<meta property="og:title" content="Get the relative accumulation of an FOMC model over multiples of an interval — PEC_FOMC_accu_rel" />
+
+<meta property="og:description" content="Get the relative accumulation of an FOMC model over multiples of an interval" />
+<meta name="twitter:card" content="summary" />
+
+
+
+<!-- mathjax -->
+<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+ </head>
+
+ <body>
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">pfm</a>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+ </ul>
+
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="https://github.com/jranke/pfm">
+ <span class="fa fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Get the relative accumulation of an FOMC model over multiples of an interval</h1>
+ <small class="dont-index">Source: <a href='https://github.com/jranke/pfm/blob/master/R/PEC_soil.R'><code>R/PEC_soil.R</code></a></small>
+ <div class="hidden name"><code>PEC_FOMC_accu_rel.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+
+ <p>Get the relative accumulation of an FOMC model over multiples of an interval</p>
+
+ </div>
+
+ <pre class="usage"><span class='fu'>PEC_FOMC_accu_rel</span>(<span class='no'>n</span>, <span class='no'>interval</span>, <span class='no'>FOMC</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>n</th>
+ <td><p>number of applications</p></td>
+ </tr>
+ <tr>
+ <th>interval</th>
+ <td><p>Time between applications</p></td>
+ </tr>
+ <tr>
+ <th>FOMC</th>
+ <td><p>Named numeric vector containing the FOMC parameters alpha and beta</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>A numeric vector containing all n accumulation factors for the n applications</p>
+
+
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
+ <h2>Contents</h2>
+ <ul class="nav nav-pills nav-stacked">
+ <li><a href="#arguments">Arguments</a></li>
+
+ <li><a href="#value">Value</a></li>
+ </ul>
+
+ </div>
+</div>
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+ </body>
+</html>
+
diff --git a/docs/reference/PEC_soil.html b/docs/reference/PEC_soil.html
index 8903470..d746c2d 100644
--- a/docs/reference/PEC_soil.html
+++ b/docs/reference/PEC_soil.html
@@ -65,7 +65,7 @@ and in the EFSA guidance on PEC soil calculations (EFSA, 2015, 2017)." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
@@ -120,9 +120,9 @@ and in the EFSA guidance on PEC soil calculations (EFSA, 2015, 2017).</p>
<span class='kw'>PEC_units</span> <span class='kw'>=</span> <span class='st'>"mg/kg"</span>, <span class='kw'>PEC_pw_units</span> <span class='kw'>=</span> <span class='st'>"mg/L"</span>, <span class='kw'>interval</span> <span class='kw'>=</span> <span class='fl'>NA</span>,
<span class='kw'>n_periods</span> <span class='kw'>=</span> <span class='fl'>Inf</span>, <span class='kw'>tillage_depth</span> <span class='kw'>=</span> <span class='fl'>20</span>, <span class='kw'>leaching_depth</span> <span class='kw'>=</span> <span class='no'>tillage_depth</span>,
<span class='kw'>crop</span> <span class='kw'>=</span> <span class='st'>"annual"</span>, <span class='kw'>cultivation</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>chent</span> <span class='kw'>=</span> <span class='fl'>NA</span>, <span class='kw'>DT50</span> <span class='kw'>=</span> <span class='fl'>NA</span>,
- <span class='kw'>Koc</span> <span class='kw'>=</span> <span class='fl'>NA</span>, <span class='kw'>Kom</span> <span class='kw'>=</span> <span class='no'>Koc</span>/<span class='fl'>1.724</span>, <span class='kw'>t_avg</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>scenarios</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"default"</span>,
- <span class='st'>"EFSA_2017"</span>, <span class='st'>"EFSA_2015"</span>), <span class='kw'>leaching</span> <span class='kw'>=</span> <span class='no'>scenarios</span> <span class='kw'>==</span> <span class='st'>"EFSA_2017"</span>,
- <span class='kw'>porewater</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
+ <span class='kw'>FOMC</span> <span class='kw'>=</span> <span class='fl'>NA</span>, <span class='kw'>Koc</span> <span class='kw'>=</span> <span class='fl'>NA</span>, <span class='kw'>Kom</span> <span class='kw'>=</span> <span class='no'>Koc</span>/<span class='fl'>1.724</span>, <span class='kw'>t_avg</span> <span class='kw'>=</span> <span class='fl'>0</span>,
+ <span class='kw'>scenarios</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"default"</span>, <span class='st'>"EFSA_2017"</span>, <span class='st'>"EFSA_2015"</span>), <span class='kw'>leaching</span> <span class='kw'>=</span> <span class='no'>scenarios</span>
+ <span class='kw'>==</span> <span class='st'>"EFSA_2017"</span>, <span class='kw'>porewater</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
@@ -153,8 +153,9 @@ and in the EFSA guidance on PEC soil calculations (EFSA, 2015, 2017).</p>
</tr>
<tr>
<th>interval</th>
- <td><p>Period of the deeper mixing, defaults to 365, which is a year if
-degradation rate units are in days</p></td>
+ <td><p>Period of the deeper mixing. The default is NA, i.e. no
+deeper mixing. For annual deeper mixing, set this to 365 when degradation
+units are in days</p></td>
</tr>
<tr>
<th>n_periods</th>
@@ -168,7 +169,7 @@ degradation rate units are in days</p></td>
<th>leaching_depth</th>
<td><p>EFSA (2017) uses the mixing depth (ecotoxicological
evaluation depth) to calculate leaching for annual crops where tillage
-takes place. By default, losses from the layer down to the tillage
+takes place. By default, losses from the layer down to the tillage
depth are taken into account in this implementation.</p></td>
</tr>
<tr>
@@ -195,6 +196,13 @@ If DT50 is not specified here and not available from the chent object, zero
degradation is assumed</p></td>
</tr>
<tr>
+ <th>FOMC</th>
+ <td><p>If specified, it should be a named numeric vector containing
+the FOMC parameters alpha and beta. This overrides any other degradation
+endpoints, and the degradation during the interval and after the maximum PEC
+is calculated using these parameters without temperature correction</p></td>
+ </tr>
+ <tr>
<th>Koc</th>
<td><p>If specified, overrides Koc endpoints from a chent object</p></td>
</tr>
@@ -255,7 +263,7 @@ from 2017 (p. 92).</p>
taken into account for the EFSA 2017 scenarios, using the evaluation depth
(here mixing depth) as the depth of the layer from which leaching takes
place. However, as the amount leaching below the evaluation depth
- (often 5 cm) will partly be mixed back during tillage, the default in this function
+ (often 5 cm) will partly be mixed back during tillage, the default in this function
is to use the tillage depth for the calculation of the leaching rate.</p>
<p>If temperature information is available in the selected scenarios, as
e.g. in the EFSA scenarios, the DT50 for groundwater modelling
diff --git a/docs/reference/PEC_sw_drainage_UK.html b/docs/reference/PEC_sw_drainage_UK.html
index e183ae2..80dd7fa 100644
--- a/docs/reference/PEC_sw_drainage_UK.html
+++ b/docs/reference/PEC_sw_drainage_UK.html
@@ -62,7 +62,7 @@ published on the CRC website" />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/PEC_sw_drift.html b/docs/reference/PEC_sw_drift.html
index b5608db..f537d5d 100644
--- a/docs/reference/PEC_sw_drift.html
+++ b/docs/reference/PEC_sw_drift.html
@@ -63,7 +63,7 @@ with input via spray drift." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/PEC_sw_exposit_runoff.html b/docs/reference/PEC_sw_exposit_runoff.html
index 9fab616..b57c2f9 100644
--- a/docs/reference/PEC_sw_exposit_runoff.html
+++ b/docs/reference/PEC_sw_exposit_runoff.html
@@ -62,7 +62,7 @@ in the worksheet &quot;Konzept Runoff&quot;. Calculation of sediment PEC values
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/PEC_sw_focus.html b/docs/reference/PEC_sw_focus.html
index 88f5b43..93d5d44 100644
--- a/docs/reference/PEC_sw_focus.html
+++ b/docs/reference/PEC_sw_focus.html
@@ -67,7 +67,7 @@ to be used with the FOCUS calculator." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/PEC_sw_sed.html b/docs/reference/PEC_sw_sed.html
index 01ccf29..28dae7c 100644
--- a/docs/reference/PEC_sw_sed.html
+++ b/docs/reference/PEC_sw_sed.html
@@ -64,7 +64,7 @@ PEC calculator" />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/PELMO_path.html b/docs/reference/PELMO_path.html
index b390917..a67084c 100644
--- a/docs/reference/PELMO_path.html
+++ b/docs/reference/PELMO_path.html
@@ -61,7 +61,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/PELMO_runs.html b/docs/reference/PELMO_runs.html
index 12a4244..2a75191 100644
--- a/docs/reference/PELMO_runs.html
+++ b/docs/reference/PELMO_runs.html
@@ -67,7 +67,7 @@ and run using wine." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
@@ -229,7 +229,7 @@ the period.plm file generated by the FOCUS PELMO GUI.</p>
#&gt;
#&gt; </div><div class='input'><span class='co'># We get exactly the same PECgw values (on Linux, calling PELMO using Wine).</span>
<span class='fu'>print</span>(<span class='no'>time_1</span>)</div><div class='output co'>#&gt; User System verstrichen
-#&gt; 0.383 0.129 30.547 </div><div class='input'><span class='kw'>if</span>(!<span class='fu'>inherits</span>(<span class='fu'>try</span>(<span class='no'>cpuinfo</span> <span class='kw'>&lt;-</span> <span class='fu'>readLines</span>(<span class='st'>"/proc/cpuinfo"</span>)), <span class='st'>"try-error"</span>)) {
+#&gt; 0.395 0.093 30.590 </div><div class='input'><span class='kw'>if</span>(!<span class='fu'>inherits</span>(<span class='fu'>try</span>(<span class='no'>cpuinfo</span> <span class='kw'>&lt;-</span> <span class='fu'>readLines</span>(<span class='st'>"/proc/cpuinfo"</span>)), <span class='st'>"try-error"</span>)) {
<span class='fu'>cat</span>(<span class='fu'>gsub</span>(<span class='st'>"model name\t: "</span>, <span class='st'>"CPU model: "</span>, <span class='no'>cpuinfo</span>[<span class='fu'>grep</span>(<span class='st'>"model name"</span>, <span class='no'>cpuinfo</span>)[<span class='fl'>1</span>]]))
}</div><div class='output co'>#&gt; CPU model: AMD Ryzen 7 1700 Eight-Core Processor</div><div class='input'>
<span class='co'># Demonstrate some results with metabolites.</span>
diff --git a/docs/reference/SFO_actual_twa.html b/docs/reference/SFO_actual_twa.html
index b7b65f5..65ca58e 100644
--- a/docs/reference/SFO_actual_twa.html
+++ b/docs/reference/SFO_actual_twa.html
@@ -61,7 +61,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/SSLRC_mobility_classification.html b/docs/reference/SSLRC_mobility_classification.html
index 06be24e..a0e592a 100644
--- a/docs/reference/SSLRC_mobility_classification.html
+++ b/docs/reference/SSLRC_mobility_classification.html
@@ -62,7 +62,7 @@ checked against the spreadsheet published on the CRC website" />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/TOXSWA_cwa.html b/docs/reference/TOXSWA_cwa.html
index a1b6bfe..6941fa9 100644
--- a/docs/reference/TOXSWA_cwa.html
+++ b/docs/reference/TOXSWA_cwa.html
@@ -62,7 +62,7 @@ Usually, an instance of this class will be generated by read.TOXSWA_cwa." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/chent_focus_sw.html b/docs/reference/chent_focus_sw.html
index 39b3c9e..680efa6 100644
--- a/docs/reference/chent_focus_sw.html
+++ b/docs/reference/chent_focus_sw.html
@@ -61,7 +61,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/create_run_list.html b/docs/reference/create_run_list.html
index c52719d..d3c5a97 100644
--- a/docs/reference/create_run_list.html
+++ b/docs/reference/create_run_list.html
@@ -61,7 +61,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/drift_data_JKI.html b/docs/reference/drift_data_JKI.html
index c3f1f4d..71cd2d9 100644
--- a/docs/reference/drift_data_JKI.html
+++ b/docs/reference/drift_data_JKI.html
@@ -64,7 +64,7 @@ published by the German Julius-Kühn Institute (JKI)." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/endpoint.html b/docs/reference/endpoint.html
index 819d8bc..0c0eb66 100644
--- a/docs/reference/endpoint.html
+++ b/docs/reference/endpoint.html
@@ -64,7 +64,7 @@ this function." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/focus_80th.html b/docs/reference/focus_80th.html
index 0604fa7..60ecbdd 100644
--- a/docs/reference/focus_80th.html
+++ b/docs/reference/focus_80th.html
@@ -64,7 +64,7 @@ values obtained by PELMO." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/geomean.html b/docs/reference/geomean.html
index dfcd15e..b676773 100644
--- a/docs/reference/geomean.html
+++ b/docs/reference/geomean.html
@@ -64,7 +64,7 @@ returns 0 if at least one element of the vector is 0." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/get_flux.html b/docs/reference/get_flux.html
index 518b09c..2b138f8 100644
--- a/docs/reference/get_flux.html
+++ b/docs/reference/get_flux.html
@@ -61,7 +61,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/get_interval.html b/docs/reference/get_interval.html
index 4b73ca2..b6561fb 100644
--- a/docs/reference/get_interval.html
+++ b/docs/reference/get_interval.html
@@ -61,7 +61,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/get_vertex.html b/docs/reference/get_vertex.html
new file mode 100644
index 0000000..6878553
--- /dev/null
+++ b/docs/reference/get_vertex.html
@@ -0,0 +1,141 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Fit a parabola through three points — get_vertex • pfm</title>
+
+<!-- jquery -->
+<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
+<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
+
+<!-- Font Awesome icons -->
+<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
+
+<!-- sticky kit -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+<meta property="og:title" content="Fit a parabola through three points — get_vertex" />
+
+<meta property="og:description" content="This was inspired by an answer on stackoverflow
+https://stackoverflow.com/a/717791" />
+<meta name="twitter:card" content="summary" />
+
+
+
+<!-- mathjax -->
+<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+ </head>
+
+ <body>
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">pfm</a>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+ </ul>
+
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="https://github.com/jranke/pfm">
+ <span class="fa fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Fit a parabola through three points</h1>
+ <small class="dont-index">Source: <a href='https://github.com/jranke/pfm/blob/master/R/PEC_soil.R'><code>R/PEC_soil.R</code></a></small>
+ <div class="hidden name"><code>get_vertex.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+
+ <p>This was inspired by an answer on stackoverflow
+https://stackoverflow.com/a/717791</p>
+
+ </div>
+
+ <pre class="usage"><span class='fu'>get_vertex</span>(<span class='no'>x</span>, <span class='no'>y</span>)</pre>
+
+
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
+ <h2>Contents</h2>
+ <ul class="nav nav-pills nav-stacked">
+ </ul>
+
+ </div>
+</div>
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+ </body>
+</html>
+
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 12abbd4..d57bc84 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -58,7 +58,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/max_twa.html b/docs/reference/max_twa.html
index c603fb4..838b00f 100644
--- a/docs/reference/max_twa.html
+++ b/docs/reference/max_twa.html
@@ -65,7 +65,7 @@ max_twa." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/one_box.html b/docs/reference/one_box.html
index f3a6324..78daced 100644
--- a/docs/reference/one_box.html
+++ b/docs/reference/one_box.html
@@ -61,7 +61,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/perc_runoff_exposit.html b/docs/reference/perc_runoff_exposit.html
index 2c7dd2a..2899a26 100644
--- a/docs/reference/perc_runoff_exposit.html
+++ b/docs/reference/perc_runoff_exposit.html
@@ -61,7 +61,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/perc_runoff_reduction_exposit.html b/docs/reference/perc_runoff_reduction_exposit.html
index 9a8f10a..865f1cf 100644
--- a/docs/reference/perc_runoff_reduction_exposit.html
+++ b/docs/reference/perc_runoff_reduction_exposit.html
@@ -61,7 +61,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/pesticide.txt b/docs/reference/pesticide.txt
index 1f9181a..e524f3c 100644
--- a/docs/reference/pesticide.txt
+++ b/docs/reference/pesticide.txt
@@ -41,3 +41,5 @@ Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Du
M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js 250.00 100.00 100.00 50.00 100.00 100.00 0.00E+00 50.00 1000.00 1.00 0.00E+00 1.00 -99.00 -99.00 -99.00 -99.00 0.00E+00 1.00
Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA -99.00 -99.00 6000.00 344.80 0.00E+00 6.00 0.00E+00 0.00E+00 3000.00 1.00 0.00E+00 0.00E+00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 0.00E+00 -99.00 -99.00 -99.00 0.00E+00 1.00
M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js 250.00 100.00 100.00 50.00 100.00 100.00 0.00E+00 50.00 1000.00 1.00 0.00E+00 1.00 -99.00 -99.00 -99.00 -99.00 0.00E+00 1.00
+Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA -99.00 -99.00 6000.00 344.80 0.00E+00 6.00 0.00E+00 0.00E+00 3000.00 1.00 0.00E+00 0.00E+00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 0.00E+00 -99.00 -99.00 -99.00 0.00E+00 1.00
+M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js 250.00 100.00 100.00 50.00 100.00 100.00 0.00E+00 50.00 1000.00 1.00 0.00E+00 1.00 -99.00 -99.00 -99.00 -99.00 0.00E+00 1.00
diff --git a/docs/reference/pfm_degradation.html b/docs/reference/pfm_degradation.html
index 16df913..e09eff8 100644
--- a/docs/reference/pfm_degradation.html
+++ b/docs/reference/pfm_degradation.html
@@ -61,7 +61,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/plot.TOXSWA_cwa.html b/docs/reference/plot.TOXSWA_cwa.html
index 65703e8..6a98359 100644
--- a/docs/reference/plot.TOXSWA_cwa.html
+++ b/docs/reference/plot.TOXSWA_cwa.html
@@ -62,7 +62,7 @@ segment of a TOXSWA surface water body." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/plot.one_box.html b/docs/reference/plot.one_box.html
index 473243a..6081c71 100644
--- a/docs/reference/plot.one_box.html
+++ b/docs/reference/plot.one_box.html
@@ -61,7 +61,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/read.TOXSWA_cwa.html b/docs/reference/read.TOXSWA_cwa.html
index 5f6aba2..2f036de 100644
--- a/docs/reference/read.TOXSWA_cwa.html
+++ b/docs/reference/read.TOXSWA_cwa.html
@@ -66,7 +66,7 @@ renamed to ConLiqWatLay in the out file." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/sawtooth.html b/docs/reference/sawtooth.html
index 87dcab2..128d1f9 100644
--- a/docs/reference/sawtooth.html
+++ b/docs/reference/sawtooth.html
@@ -63,7 +63,7 @@ times, with an interval i." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/soil_scenario_data_EFSA_2015.html b/docs/reference/soil_scenario_data_EFSA_2015.html
index 23fe106..7565ef7 100644
--- a/docs/reference/soil_scenario_data_EFSA_2015.html
+++ b/docs/reference/soil_scenario_data_EFSA_2015.html
@@ -63,7 +63,7 @@ scenario and model adjustment factors from p. 15 and p. 17 are included." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/soil_scenario_data_EFSA_2017.html b/docs/reference/soil_scenario_data_EFSA_2017.html
index be49263..21bf797 100644
--- a/docs/reference/soil_scenario_data_EFSA_2017.html
+++ b/docs/reference/soil_scenario_data_EFSA_2017.html
@@ -63,7 +63,7 @@ scenario and model adjustment factors from p. 16 and p. 18 are included." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/sum_periods.html b/docs/reference/sum_periods.html
index 109d9e7..45d35c4 100644
--- a/docs/reference/sum_periods.html
+++ b/docs/reference/sum_periods.html
@@ -61,7 +61,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/docs/reference/twa.html b/docs/reference/twa.html
index f74399c..f493a29 100644
--- a/docs/reference/twa.html
+++ b/docs/reference/twa.html
@@ -63,7 +63,7 @@ is after one window has passed." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">pfm</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.1</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.5.2</span>
</span>
</div>
diff --git a/man/PEC_FOMC_accu_rel.Rd b/man/PEC_FOMC_accu_rel.Rd
new file mode 100644
index 0000000..ab0ddd9
--- /dev/null
+++ b/man/PEC_FOMC_accu_rel.Rd
@@ -0,0 +1,21 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/PEC_soil.R
+\name{PEC_FOMC_accu_rel}
+\alias{PEC_FOMC_accu_rel}
+\title{Get the relative accumulation of an FOMC model over multiples of an interval}
+\usage{
+PEC_FOMC_accu_rel(n, interval, FOMC)
+}
+\arguments{
+\item{n}{number of applications}
+
+\item{interval}{Time between applications}
+
+\item{FOMC}{Named numeric vector containing the FOMC parameters alpha and beta}
+}
+\value{
+A numeric vector containing all n accumulation factors for the n applications
+}
+\description{
+Get the relative accumulation of an FOMC model over multiples of an interval
+}
diff --git a/man/PEC_soil.Rd b/man/PEC_soil.Rd
index c8c93ac..e85f33c 100644
--- a/man/PEC_soil.Rd
+++ b/man/PEC_soil.Rd
@@ -35,7 +35,7 @@ units are in days}
\item{leaching_depth}{EFSA (2017) uses the mixing depth (ecotoxicological
evaluation depth) to calculate leaching for annual crops where tillage
-takes place. By default, losses from the layer down to the tillage
+takes place. By default, losses from the layer down to the tillage
depth are taken into account in this implementation.}
\item{crop}{Ignored for scenarios other than EFSA_2017. Only annual crops
@@ -53,7 +53,7 @@ also be a name for the substance as a character string}
If DT50 is not specified here and not available from the chent object, zero
degradation is assumed}
-\item{FOMC}{If specified, it should be a named numeric vector containing
+\item{FOMC}{If specified, it should be a named numeric vector containing
the FOMC parameters alpha and beta. This overrides any other degradation
endpoints, and the degradation during the interval and after the maximum PEC
is calculated using these parameters without temperature correction}
@@ -111,7 +111,7 @@ According to the EFSA guidance (EFSA, 2017, p. 43), leaching should be
taken into account for the EFSA 2017 scenarios, using the evaluation depth
(here mixing depth) as the depth of the layer from which leaching takes
place. However, as the amount leaching below the evaluation depth
- (often 5 cm) will partly be mixed back during tillage, the default in this function
+ (often 5 cm) will partly be mixed back during tillage, the default in this function
is to use the tillage depth for the calculation of the leaching rate.
If temperature information is available in the selected scenarios, as
diff --git a/man/get_vertex.Rd b/man/get_vertex.Rd
new file mode 100644
index 0000000..fe2f5c0
--- /dev/null
+++ b/man/get_vertex.Rd
@@ -0,0 +1,12 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/PEC_soil.R
+\name{get_vertex}
+\alias{get_vertex}
+\title{Fit a parabola through three points}
+\usage{
+get_vertex(x, y)
+}
+\description{
+This was inspired by an answer on stackoverflow
+https://stackoverflow.com/a/717791
+}
diff --git a/tests/testthat/test_PEC_soil.R b/tests/testthat/test_PEC_soil.R
index 34b4749..6e4e30b 100644
--- a/tests/testthat/test_PEC_soil.R
+++ b/tests/testthat/test_PEC_soil.R
@@ -127,3 +127,23 @@ test_that("Tier 1 PEC soil example for Pesticide F in EFSA guidance from 2015 ca
expect_equivalent(round(results_pfm, 2), results_guidance)
expect_equivalent(round(results_pfm_pw, 2), results_guidance_pw)
})
+
+test_that("Long term FOMC PEC soil from ESCAPE can be reproduced", {
+ # Application of 100 g/ha with 25% interception and FOMC degradation type a
+ fomc_50_a <- PEC_soil(100, interception = 0.25, FOMC = c(alpha = 1, beta = 10),
+ interval = 365, tillage_depth = 20, n_periods = 50)
+ fomc_long_a <- PEC_soil(100, interception = 0.25, FOMC = c(alpha = 1, beta = 10),
+ interval = 365, tillage_depth = 20)
+
+ # Application of 100 g/ha with 25% interception and FOMC degradation type b
+ # The long term PEC is much lower than when adding FOMC curves for 50 years
+ fomc_50_b <- PEC_soil(100, interception = 0.25, FOMC = c(alpha = 0.5, beta = 20),
+ interval = 365, tillage_depth = 20, n_periods = 50)
+ fomc_long_b <- PEC_soil(100, interception = 0.25, FOMC = c(alpha = 0.5, beta = 20),
+ interval = 365, tillage_depth = 20)
+
+ expect_true(fomc_50_b > fomc_long_b)
+
+ # The benchmark results were obtained with ESCAPE
+ expect_equivalent(round(fomc_long_b, 4), 0.1424)
+})

Contact - Imprint