aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2017-05-16 15:43:50 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2017-05-16 15:43:50 +0200
commit36036b5901223591e7e21e8b73d8cd1fb034f4cb (patch)
treeed8e764778aa2e94b785263d18d7d8e3dfe4e785
parentd042f8f06b313e8595087587455daac73d84f17b (diff)
Finish the Step 1 calculator including tests
Some cleaning up. PELMO facilities do not currently work at my end, as I have no working wine installation on this computer
-rw-r--r--.Rbuildignore1
-rw-r--r--ChangeLog18
-rw-r--r--DESCRIPTION8
-rw-r--r--GNUmakefile8
-rw-r--r--NAMESPACE3
-rw-r--r--R/FOCUS_GW_scenarios_2012.R2
-rw-r--r--R/FOCUS_Step_12_scenarios.R3
-rw-r--r--R/PEC_sw_focus.R122
-rw-r--r--R/PELMO_runs.R13
-rw-r--r--_pkgdown.yml1
-rw-r--r--docs/authors.html4
-rw-r--r--docs/index.html10
-rw-r--r--docs/pkgdown.css91
-rw-r--r--docs/reference/FOCUS_GW_scenarios_2012.html14
-rw-r--r--docs/reference/FOCUS_PELMO_crop_sze_names.html14
-rw-r--r--docs/reference/FOCUS_PELMO_crops.html26
-rw-r--r--docs/reference/FOCUS_PELMO_location_codes.html8
-rw-r--r--docs/reference/FOCUS_Step_12_scenarios.html285
-rw-r--r--docs/reference/GUS.html97
-rw-r--r--docs/reference/PEC_soil.html133
-rw-r--r--docs/reference/PEC_sw_drainage_UK.html55
-rw-r--r--docs/reference/PEC_sw_drift.html67
-rw-r--r--docs/reference/PEC_sw_focus.html272
-rw-r--r--docs/reference/PEC_sw_sed.html63
-rw-r--r--docs/reference/PELMO_path.html29
-rw-r--r--docs/reference/PELMO_runs.html143
-rw-r--r--docs/reference/SFO_actual_twa.html23
-rw-r--r--docs/reference/SSLRC_mobility_classification.html19
-rw-r--r--docs/reference/TOXSWA_cwa.html44
-rw-r--r--docs/reference/chent_focus_sw.html (renamed from docs/reference/run_PELMO.html)65
-rw-r--r--docs/reference/create_run_list.html31
-rw-r--r--docs/reference/drift_data_JKI.html44
-rw-r--r--docs/reference/endpoint.html83
-rw-r--r--docs/reference/evaluate_PELMO.html116
-rw-r--r--docs/reference/focus_80th.html23
-rw-r--r--docs/reference/geomean.html23
-rw-r--r--docs/reference/get_flux.html18
-rw-r--r--docs/reference/get_interval.html22
-rw-r--r--docs/reference/index.html266
-rw-r--r--docs/reference/max_twa.html23
-rw-r--r--docs/reference/one_box-12.pngbin9901 -> 0 bytes
-rw-r--r--docs/reference/one_box-6.pngbin5743 -> 0 bytes
-rw-r--r--docs/reference/one_box.html53
-rw-r--r--docs/reference/pfm_degradation.html51
-rw-r--r--docs/reference/plot.TOXSWA_cwa.html57
-rw-r--r--docs/reference/plot.one_box.html63
-rw-r--r--docs/reference/read.TOXSWA_cwa.html71
-rw-r--r--docs/reference/sawtooth-8.pngbin13603 -> 0 bytes
-rw-r--r--docs/reference/sawtooth.html39
-rw-r--r--docs/reference/soil_scenario_data_EFSA_2015.html40
-rw-r--r--docs/reference/sum_periods.html22
-rw-r--r--docs/reference/twa.html23
-rwxr-xr-xinst/extdata/FOCUS_Step_12_scenarios.txt48
-rw-r--r--man/FOCUS_GW_scenarios_2012.Rd2
-rw-r--r--man/FOCUS_Step_12_scenarios.Rd40
-rw-r--r--man/PEC_sw_focus.Rd53
-rw-r--r--man/PELMO_runs.Rd5
-rw-r--r--man/chent_focus_sw.Rd14
-rw-r--r--man/get_flux.Rd3
-rw-r--r--man/get_interval.Rd5
-rw-r--r--man/sum_periods.Rd5
-rw-r--r--tests/testthat/test_PELMO.R7
-rw-r--r--tests/testthat/test_step_1.R97
63 files changed, 2110 insertions, 878 deletions
diff --git a/.Rbuildignore b/.Rbuildignore
index 005f437..01a3edc 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -8,5 +8,6 @@
^build.log$
^test.log$
^inst/extdata/Tabelle\ der\ Abdrifteckwerte.xls$
+^inst/extdata/FOCUS_Step_12_scenarios.txt$
^_pkgdown.yml$
^docs$
diff --git a/ChangeLog b/ChangeLog
index 227c446..b1eddf2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+commit d042f8f06b313e8595087587455daac73d84f17b
+Author: Johannes Ranke <jranke@uni-bremen.de>
+Date: 2017-05-15 20:01:28 +0200
+
+ Start of an Steps 1/2 calculator in R
+
+commit b052bf8d1e090e07bf0853f0aa8b895db8f41a2a
+Author: Johannes Ranke <jranke@uni-bremen.de>
+Date: 2017-03-29 19:24:37 +0200
+
+ Make it possible to use expressions in axis labels
+
+commit d69fda8d8f854b735394ecdaec9d59fb18c42b00
+Author: Johannes Ranke <jranke@uni-bremen.de>
+Date: 2017-03-28 10:09:45 +0200
+
+ Update Changelog
+
commit 90e5ff0a9fdadd65e179c04c7d43b4db6e301984
Author: Johannes Ranke <jranke@uni-bremen.de>
Date: 2017-03-06 17:59:16 +0100
diff --git a/DESCRIPTION b/DESCRIPTION
index e61f81a..8acf123 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,13 +1,13 @@
Package: pfm
Type: Package
Title: Utilities for Pesticide Fate Modelling
-Version: 0.4-2
-Date: 2017-01-30
+Version: 0.4-3
+Date: 2017-05-16
Authors@R: person("Johannes Ranke", email = "jranke@uni-bremen.de",
role = c("aut", "cre", "cph"))
Description: Utilities for simple calculations of predicted environmental
concentrations (PECs) and for dealing with data from some FOCUS pesticide
- fate modelling software packages (currently only TOXSWA).
+ fate modelling software packages.
Depends:
R6,
mkin
@@ -25,4 +25,4 @@ License: GPL
LazyLoad: yes
LazyData: yes
Encoding: UTF-8
-RoxygenNote: 5.0.1.9000
+RoxygenNote: 6.0.1
diff --git a/GNUmakefile b/GNUmakefile
index 1a913ab..959c68f 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -9,11 +9,13 @@ DATE := $(shell date +%Y-%m-%d)
pkgfiles = DESCRIPTION \
.Rbuildignore \
- inst/testdata/* \
+ data/* \
docs/* \
docs/reference/* \
- data/* \
- R/*
+ inst/testdata/* \
+ R/* \
+ tests/testthat.R \
+ tests/testthat/*
clean:
@echo "Cleaning up..."
diff --git a/NAMESPACE b/NAMESPACE
index feb5ca7..7a5c668 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -19,12 +19,14 @@ export(GUS)
export(PEC_soil)
export(PEC_sw_drainage_UK)
export(PEC_sw_drift)
+export(PEC_sw_focus)
export(PEC_sw_sed)
export(PELMO_path)
export(PELMO_runs)
export(SFO_actual_twa)
export(SSLRC_mobility_classification)
export(TOXSWA_cwa)
+export(chent_focus_sw)
export(endpoint)
export(evaluate_PELMO)
export(focus_80th)
@@ -56,3 +58,4 @@ importFrom(stats,start)
importFrom(stats,time)
importFrom(stats,ts)
importFrom(utils,data)
+importFrom(utils,read.table)
diff --git a/R/FOCUS_GW_scenarios_2012.R b/R/FOCUS_GW_scenarios_2012.R
index e26ea50..33c5293 100644
--- a/R/FOCUS_GW_scenarios_2012.R
+++ b/R/FOCUS_GW_scenarios_2012.R
@@ -1,4 +1,4 @@
-#' A very small subset of the FOCUS Groundwater scenario defitions
+#' A very small subset of the FOCUS Groundwater scenario definitions
#'
#' Currently, only scenario names with acronyms and a small subset of the soil definitions are provided. The
#' soil definitions are from page 46ff. from FOCUS (2012).
diff --git a/R/FOCUS_Step_12_scenarios.R b/R/FOCUS_Step_12_scenarios.R
index cb0654a..f28f03d 100644
--- a/R/FOCUS_Step_12_scenarios.R
+++ b/R/FOCUS_Step_12_scenarios.R
@@ -1,3 +1,6 @@
+# Register global variables
+if(getRversion() >= '2.15.1') utils::globalVariables("FOCUS_Step_12_scenarios")
+
#' Step 1/2 scenario data as distributed with the FOCUS Step 1/2 calculator
#'
#' The data were extracted from the scenario.txt file using the R code shown below.
diff --git a/R/PEC_sw_focus.R b/R/PEC_sw_focus.R
index 5f3b3d2..21ed514 100644
--- a/R/PEC_sw_focus.R
+++ b/R/PEC_sw_focus.R
@@ -1,37 +1,75 @@
#' Calculate FOCUS Step 1 PEC surface water
#'
-#' This is an attempt to reimplement the FOCUS Step 1 and 2 calculator authored
-#' by Michael Klein. The Step 1 and 2 scenario assumes an area ratio of 10:1
-#' between field and waterbody, and a water depth of 30 cm.
-#' I did not (yet) implement the TWA formulas for times later than day 1, as I
-#' did not understand them right away.
-#' Also, Step 2 is not implemented (yet).
+#' This is reimplementation of Step 1 of the FOCUS Step 1 and 2 calculator
+#' version 3.2, authored by Michael Klein. Note that results for multiple
+#' applications should be compared to the corresponding results for a
+#' single application. At current, this is not done automatically in
+#' this implementation.
#'
+#' @importFrom utils read.table
+#' @references FOCUS (2014) Generic guidance for Surface Water Scenarios (version 1.4).
+#' FOrum for the Co-ordination of pesticde fate models and their USe.
+#' http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/sw/docs/Generic%20FOCUS_SWS_vc1.4.pdf
+#' @references Website of the Steps 1 and 2 calculator at the Joint Research
+#' Center of the European Union:
+#' http://esdac.jrc.ec.europa.eu/projects/stepsonetwo
+#' @note The formulas for input to the waterbody via runoff/drainage of the
+#' parent and subsequent formation of the metabolite in water is not
+#' documented in the model description coming with the calculator
+#' @note Step 2 is not implemented
#' @export
#' @param parent A list containing substance specific parameters
#' @param rate The application rate in g/ha. Overriden when
#' applications are given explicitly
#' @param n The number of applications
#' @param i The application interval
-#' @param applications A dataframe containing times and amounts of each application
-#' @param step At the moment, only Step 1 is implemented
+#' @param met A list containing metabolite specific parameters. If not NULL,
+#' the PEC is calculated for this compound, not the parent.
+#' @param f_drift The fraction of the application rate reaching the waterbody
+#' via drift. If NA, this is derived from the scenario name and the number
+#' of applications via the drift data defined by the
+#' \code{\link{FOCUS_Step_12_scenarios}}
+#' @param f_rd The fraction of the amount applied reaching the waterbody via
+#' runoff/drainage. At Step 1, it is assumed to be 10%, be it the
+#' parent or a metabolite
+#' @param scenario The name of the scenario. Must be one of the scenario
+#' names given in \code{\link{FOCUS_Step_12_scenarios}}
#' @examples
+#' # Parent only
#' dummy_1 <- chent_focus_sw(cwsat = 6000, DT50_ws = 6, Koc = 344.8)
#' PEC_sw_focus(dummy_1, 3000, f_drift = 0)
+#'
+#' # Metabolite
+#' new_dummy <- chent_focus_sw(mw = 250, Koc = 100)
+#' M1 <- chent_focus_sw(mw = 100, cwsat = 100, DT50_ws = 100, Koc = 50, max_ws = 0, max_soil = 0.5)
+#' PEC_sw_focus(new_dummy, 1000, scenario = "cereals, winter", met = M1)
PEC_sw_focus <- function(parent, rate, n = 1, i = NA,
- applications = data.frame(time = seq(0, 0 + n * i, length.out = n),
- amount = rate),
met = NULL,
- step = 1,
- f_drift = 0.02759, f_rd = 0.1)
+ f_drift = NA, f_rd = 0.1,
+ scenario = FOCUS_Step_12_scenarios$names)
{
+ if (n > 1 & is.na(i)) stop("Please specify the interval i if n > 1")
+
+ if (is.na(f_drift)) {
+ scenario = match.arg(scenario)
+ f_drift = FOCUS_Step_12_scenarios$drift[scenario, "1"] / 100
+ # For Step 2 we would/will select the reduced percentiles for multiple apps:
+ # if (n <= 8) {
+ # f_drift = FOCUS_Step_12_scenarios$drift[scenario, as.character(n)] / 100
+ # } else {
+ # f_drift = FOCUS_Step_12_scenarios$drift[scenario, ">8"] / 100
+ # }
+ }
+
if (is.null(met)) {
+ cwsat = parent$cwsat
mw_ratio = 1
max_soil = 1
max_ws = 1
Koc = parent$Koc
DT50_ws = parent$DT50_ws
} else {
+ cwsat = met$cwsat
mw_ratio = met$mw / parent$mw
max_soil = met$max_soil
max_ws = met$max_ws
@@ -41,17 +79,35 @@ PEC_sw_focus <- function(parent, rate, n = 1, i = NA,
# Rates for a single application
eq_rate_drift_s = mw_ratio * max_ws * rate
+ # Parent only, or metabolite formed in soil:
eq_rate_rd_s = mw_ratio * max_soil * rate
+ # Metabolite formed in water (this part is not documented in the Help files
+ # of the Steps 1/2 calculator):
+ if (!is.null(met)) {
+ eq_rate_rd_parent_s = mw_ratio * max_ws * rate
+ eq_rate_rd_s_tot = eq_rate_rd_s + eq_rate_rd_parent_s
+ } else {
+ eq_rate_rd_parent_s = NA
+ eq_rate_rd_s_tot = eq_rate_rd_s
+ }
# Drift input
input_drift_s = f_drift * eq_rate_drift_s / 10 # mg/m2
- input_drift = n * input_drift_s
# Runoff/drainage input
ratio_field_wb = 10 # 10 m2 of field for each m2 of the waterbody
- input_rd_s = f_rd * eq_rate_rd_s * ratio_field_wb / 10
+ input_rd_s = f_rd * eq_rate_rd_s_tot * ratio_field_wb / 10
input_rd = n * input_rd_s
+ # No accumulation between multiple applications if 3 * DT50 < i
+ if (n > 1 && (3 * DT50_ws < i)) {
+ input_drift = input_drift_s
+ input_rd = input_rd_s
+ } else {
+ input_drift = n * input_drift_s
+ input_rd = n * input_rd_s
+ }
+
# Fraction of compound entering the water phase via runoff/drainage
depth_sw = 0.3 # m
depth_sed = 0.05 # m
@@ -85,25 +141,41 @@ PEC_sw_focus <- function(parent, rate, n = 1, i = NA,
PEC["1", "TWAECsw"] = (PEC_sw_0 + PEC["1", "PECsw"]) / 2
PEC["1", "TWAECsed"] = (PEC_sed_0 + PEC["1", "PECsed"]) / 2
- list(eq_rate_drift_s = eq_rate_drift_s,
- eq_rate_rd_s = eq_rate_rd_s,
- input_drift_s = input_drift_s,
- input_rd_s = input_rd_s,
- f_rd_sw = f_rd_sw, f_rd_sed = f_rd_sed,
- PEC = PEC)
+ # Check if PEC_sw_max is above water solubility
+ PEC_sw_max = max(PEC[, "PECsw"])
+ if (PEC_sw_max > 1000 * cwsat) {
+ warning("The maximum PEC surface water exceeds the water solubility")
+ }
+
+ PEC_sed_max = max(PEC[, "PECsed"])
+
+ list(f_drift = f_drift,
+ eq_rate_drift_s = eq_rate_drift_s,
+ eq_rate_rd_s = eq_rate_rd_s,
+ eq_rate_rd_parent_s = eq_rate_rd_parent_s,
+ input_drift_s = input_drift_s,
+ input_rd_s = input_rd_s,
+ f_rd_sw = f_rd_sw, f_rd_sed = f_rd_sed,
+ PEC = PEC,
+ PEC_sw_max = PEC_sw_max,
+ PEC_sed_max = PEC_sed_max
+ )
}
-#' Create an chemical compound object for FOCUS Step 1 and 2 calculations
+#' Create a chemical compound object for FOCUS Step 1 calculations
#'
#' @export
#' @param cwsat Water solubility in mg/L
#' @param DT50_ws Half-life in water/sediment systems in days
#' @param Koc Partition coefficient between organic carbon and water
#' in L/kg.
+#' @param mw Molar weight in g/mol
+#' @param max_soil Maximum observed fraction (dimensionless) in soil
+#' @param max_ws Maximum observed fraction (dimensionless) in water/sediment
+#' systems
#' @return A list with the substance specific properties
-chent_focus_sw <- function(Koc, DT50_ws, cwsat = 1000)
+chent_focus_sw <- function(Koc, DT50_ws = NA, cwsat = 1000, mw = NA, max_soil = 1, max_ws = 1)
{
- list(Koc = Koc, DT50_ws = DT50_ws, cwsat = cwsat)
+ list(Koc = Koc, DT50_ws = DT50_ws, cwsat = cwsat,
+ mw = mw, max_soil = max_soil, max_ws = max_ws)
}
-
-
diff --git a/R/PELMO_runs.R b/R/PELMO_runs.R
index 0f134e0..b152b4d 100644
--- a/R/PELMO_runs.R
+++ b/R/PELMO_runs.R
@@ -3,7 +3,7 @@
#' Per default, the runs are not only set up but also executed with FOCUS
#' PELMO, the results are processed and returned. Currently, only FOCUS PELMO
#' as installed on Linux (or other Unix systems)
-#' using the \code{\link{install_PELMO}} from the \code{PELMO.installeR} package
+#' using the \code{install_PELMO} from the \code{PELMO.installeR} package
#' maintained on github is supported. In such installations, FOCUS PELMO is
#' installed into the package installation directory of \code{PELMO.installeR}
#' and run using \code{wine}.
@@ -33,6 +33,8 @@
#' PELMO test results \url{http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/gw/models/pelmo/test-results/test_results_FOCUS_PELMO_5_5_3.doc}
#' @export
#' @examples
+#' # At the moment I can not run the examples, as my wine installation is not working
+#' \dontrun{
#' # Reproduce the official test results for annual application of Pesticide D
#' # to winter cereals at the day before emergence
#' runs_1 <- list(
@@ -54,6 +56,7 @@
#' PECgw_2 <- PELMO_runs(runs_2, psm_dir = system.file("testdata", package = "pfm"),
#' cores = 3, overwrite = TRUE)
#' print(PECgw_2)
+#' }
PELMO_runs <- function(runs, psm_dir = ".", version = "5.5.3", PELMO_base = "auto",
execute = TRUE, cores = getOption("mc.cores", 2L),
evaluate = TRUE, overwrite = FALSE)
@@ -410,6 +413,9 @@ evaluate_PELMO <- function(runs, version = "5.5.3", PELMO_base = "auto")
}
#' Get the application interval in years from a psm file
+#'
+#' @param psm_file The path to the .psm file
+#' @param location_code The location code
get_interval <- function(psm_file, location_code) {
# How many years do we calculate (26, 46 or 66)?
psm <- readLines(psm_file, encoding = "latin1")
@@ -433,6 +439,9 @@ get_interval <- function(psm_file, location_code) {
}
#' Sum up values according to FOCUS periods
+#'
+#' @param annual The annual flux as obtained by \code{get_flux}
+#' @param interval The interval in years
sum_periods <- function(annual, interval) {
n_years <- switch(as.character(interval),
"1" = 26,
@@ -446,6 +455,8 @@ sum_periods <- function(annual, interval) {
}
#' Get the flux of a chemical out of the FOCUS layer from a CHEM*.PLM file
+#'
+#' @param chem_file The full path to a CHEM*.PLM file
get_flux <- function(chem_file) {
chem <- readLines(chem_file)
lowest_focus_comp_lines <- grep("^ . 21 ", chem, value = TRUE)
diff --git a/_pkgdown.yml b/_pkgdown.yml
index 829ba48..6c8f632 100644
--- a/_pkgdown.yml
+++ b/_pkgdown.yml
@@ -25,6 +25,7 @@ reference:
- PEC_sw_drift
- drift_data_JKI
- PEC_sw_drainage_UK
+ - PEC_sw_focus
- TOXSWA_cwa
- read.TOXSWA_cwa
- plot.TOXSWA_cwa
diff --git a/docs/authors.html b/docs/authors.html
index 0830cef..4bec4d8 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -25,12 +25,14 @@
<script src="pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
diff --git a/docs/index.html b/docs/index.html
index 0a45d75..7c7cca5 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -9,7 +9,7 @@
<!-- 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">
<!-- pkgdown --><link href="pkgdown.css" rel="stylesheet">
-<script src="jquery.sticky-kit.min.js"></script><script src="pkgdown.js"></script><!-- mathjax --><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><!--[if lt IE 9]>
+<script src="jquery.sticky-kit.min.js"></script><script src="pkgdown.js"></script><!-- 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]-->
@@ -45,7 +45,7 @@
<div class="contents col-md-9">
<div id="pfm" class="section level1">
<div class="page-header"><h1 class="hasAnchor">
-<a href="#pfm" class="anchor"> </a>pfm</h1></div>
+<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="st"> </span>you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -61,19 +61,19 @@ You should have received a copy of the GNU General Public License along with
this program. If not, see &lt;http:<span class="er">//</span>www.gnu.org/licenses/<span class="er">&gt;</span></code></pre></div>
<div id="installation" class="section level2">
<h2 class="hasAnchor">
-<a href="#installation" class="anchor"> </a>Installation</h2>
+<a href="#installation" class="anchor"></a>Installation</h2>
<p>You can install the package from <a href="http://github.com/jranke/pfm">github</a>, e.g. using the <code>devtools</code> package. Using <code>quick = TRUE</code> skips docs, multiple-architecture builds, demos, and vignettes, to make installation as fast and painless as possible.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(devtools)
<span class="kw">install_github</span>(<span class="st">"jranke/pfm"</span>, <span class="dt">quick =</span> <span class="ot">TRUE</span>)</code></pre></div>
</div>
<div id="use" class="section level2">
<h2 class="hasAnchor">
-<a href="#use" class="anchor"> </a>Use</h2>
+<a href="#use" class="anchor"></a>Use</h2>
<p>Please refer to the <a href="http://pkgdown.jrwb.de/pfm/reference/index.html">reference</a>.</p>
</div>
<div id="examples" class="section level2">
<h2 class="hasAnchor">
-<a href="#examples" class="anchor"> </a>Examples</h2>
+<a href="#examples" class="anchor"></a>Examples</h2>
<p>One recent nice example of the usage of this package is the visualisation of a time weighted average for a sawtooth curve obtained from several overlays of mkinfit predictions as shown <a href="http://pkgdown.jrwb.de/pfm/reference/plot.one_box.html">here</a>.</p>
<p>Another, even more recent example shows how FOCUS PELMO can be run in parallel under Linux as shown <a href="http://pkgdown.jrwb.de/pfm/reference/PELMO_runs.html">here</a>.</p>
</div>
diff --git a/docs/pkgdown.css b/docs/pkgdown.css
index fd7b0ba..9c437c7 100644
--- a/docs/pkgdown.css
+++ b/docs/pkgdown.css
@@ -36,11 +36,8 @@ img.icon {
/* Section anchors ---------------------------------*/
-.hasAnchor {
- margin-left: -30px;
-}
-
a.anchor {
+ margin-left: -30px;
display:inline-block;
width: 30px;
height: 30px;
@@ -56,6 +53,13 @@ a.anchor {
visibility: visible;
}
+@media (max-width: 767px) {
+ .hasAnchor:hover a.anchor {
+ visibility: hidden;
+ }
+}
+
+
/* Fixes for fixed navbar --------------------------*/
.contents h1, .contents h2, .contents h3, .contents h4 {
@@ -63,6 +67,17 @@ a.anchor {
margin-top: -60px;
}
+/* Static header placement on mobile devices */
+@media (max-width: 767px) {
+ .navbar-fixed-top {
+ position: absolute;
+ }
+ .navbar {
+ padding: 0;
+ }
+}
+
+
/* Sidebar --------------------------*/
#sidebar {
@@ -81,33 +96,59 @@ a.anchor {
margin-bottom: 0.5em;
}
-/* Syntax highlighting ---------------------------------------------------- */
+/* Reference index & topics ----------------------------------------------- */
-code {
- background-color: #f7f7f7;
- color: #333;
-}
-code a {
- color: #375f84;
+.ref-index th {font-weight: normal;}
+.ref-index h2 {font-size: 20px;}
+
+.ref-index td {vertical-align: top;}
+.ref-index .alias {width: 40%;}
+.ref-index .title {width: 60%;}
+
+.ref-index .alias {width: 40%;}
+.ref-index .title {width: 60%;}
+
+.ref-arguments th {text-align: right; padding-right: 10px;}
+.ref-arguments th, .ref-arguments td {vertical-align: top;}
+.ref-arguments .name {width: 20%;}
+.ref-arguments .desc {width: 80%;}
+
+/* Nice scrolling for wide elements --------------------------------------- */
+
+table {
+ display: block;
+ overflow: auto;
}
-.warning { color: red; }
-.message { font-weight: bolder; }
-.error { color: red; font-weight: bolder; }
+/* Syntax highlighting ---------------------------------------------------- */
-.fl,.number {color:rgb(21,20,181);}
-.fu,.functioncall {color:#264D66 ;}
-.ch,.st,.string {color:#375D81 ;}
-.kw,.keyword {color:black;}
-.argument {color:#264D66 ;}
-.co,.comment {color: #777;}
-.formalargs {color: #264D66;}
-.eqformalargs {color:#264D66;}
-.slot {font-style:italic;}
-.symbol {color:black ;}
-.prompt {color:black ;}
+pre {
+ word-wrap: normal;
+ word-break: normal;
+ border: 1px solid #eee;
+}
+
+pre, code {
+ background-color: #f8f8f8;
+ color: #333;
+}
pre img {
background-color: #fff;
display: block;
}
+
+code a, pre a {
+ color: #375f84;
+}
+
+.fl {color: #1514b5;}
+.fu {color: #000000;} /* function */
+.ch,.st {color: #036a07;} /* string */
+.kw {color: #264D66;} /* keyword */
+.co {color: #888888;} /* comment */
+
+.message { color: black; font-weight: bolder;}
+.error { color: orange; font-weight: bolder;}
+.warning { color: #6A0366; font-weight: bolder;}
+
diff --git a/docs/reference/FOCUS_GW_scenarios_2012.html b/docs/reference/FOCUS_GW_scenarios_2012.html
index fbc1649..97bdebf 100644
--- a/docs/reference/FOCUS_GW_scenarios_2012.html
+++ b/docs/reference/FOCUS_GW_scenarios_2012.html
@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>A very small subset of the FOCUS Groundwater scenario defitions — FOCUS_GW_scenarios_2012 • pfm</title>
+<title>A very small subset of the FOCUS Groundwater scenario definitions — FOCUS_GW_scenarios_2012 • pfm</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -66,7 +68,7 @@
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
- <h1>A very small subset of the FOCUS Groundwater scenario defitions</h1>
+ <h1>A very small subset of the FOCUS Groundwater scenario definitions</h1>
</div>
@@ -74,7 +76,7 @@
soil definitions are from page 46ff. from FOCUS (2012).</p>
- <pre><span class='no'>FOCUS_GW_scenarios_2012</span></pre>
+ <pre class="usage"><span class='no'>FOCUS_GW_scenarios_2012</span></pre>
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
@@ -90,9 +92,9 @@ soil definitions are from page 46ff. from FOCUS (2012).</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='no'>FOCUS_GW_scenarios_2012</span></div><div class='output co'>#&gt; $names
#&gt; Cha Ham Jok Kre Oke
-#&gt; &quot;Châteaudun&quot; &quot;Hamburg&quot; &quot;Jokioinen&quot; &quot;Kremsmünster&quot; &quot;Okehampton&quot;
+#&gt; "Châteaudun" "Hamburg" "Jokioinen" "Kremsmünster" "Okehampton"
#&gt; Pia Por Sev Thi
-#&gt; &quot;Piacenza&quot; &quot;Porto&quot; &quot;Sevilla&quot; &quot;Thiva&quot;
+#&gt; "Piacenza" "Porto" "Sevilla" "Thiva"
#&gt;
#&gt; $soils
#&gt; location horizon number pH_H2O perc_clay perc_oc rel_deg
diff --git a/docs/reference/FOCUS_PELMO_crop_sze_names.html b/docs/reference/FOCUS_PELMO_crop_sze_names.html
index 5777868..16c0dc6 100644
--- a/docs/reference/FOCUS_PELMO_crop_sze_names.html
+++ b/docs/reference/FOCUS_PELMO_crop_sze_names.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -76,7 +78,7 @@ in the file names are sometimes capitalized, sometimes not. The scenario
files used for Beans (field) and Beans (vegetable) are the same.</p>
- <pre><span class='no'>FOCUS_PELMO_crop_sze_names</span></pre>
+ <pre class="usage"><span class='no'>FOCUS_PELMO_crop_sze_names</span></pre>
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
@@ -85,13 +87,13 @@ files used for Beans (field) and Beans (vegetable) are the same.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>print</span>(<span class='no'>FOCUS_PELMO_crop_sze_names</span>)</div><div class='output co'>#&gt; app gra pot sug win fbe vbe bus
-#&gt; &quot;apples&quot; &quot;grass&quot; &quot;potato&quot; &quot;sbeets&quot; &quot;wcerea&quot; &quot;beans&quot; &quot;beans&quot; &quot;bushb&quot;
+#&gt; "apples" "grass" "potato" "sbeets" "wcerea" "beans" "beans" "bushb"
#&gt; cab car cit cot lin mai soi woi
-#&gt; &quot;cabbag&quot; &quot;carrot&quot; &quot;citrus&quot; &quot;cotton&quot; &quot;linse&quot; &quot;maize&quot; &quot;rapesu&quot; &quot;rapewi&quot;
+#&gt; "cabbag" "carrot" "citrus" "cotton" "linse" "maize" "rapesu" "rapewi"
#&gt; oni ape soy spr str sun tob tom
-#&gt; &quot;onions&quot; &quot;peas&quot; &quot;soyb&quot; &quot;scerea&quot; &quot;strawb&quot; &quot;sunflo&quot; &quot;tobacc&quot; &quot;tomato&quot;
+#&gt; "onions" "peas" "soyb" "scerea" "strawb" "sunflo" "tobacc" "tomato"
#&gt; vin
-#&gt; &quot;vines&quot; </div></pre>
+#&gt; "vines" </div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
diff --git a/docs/reference/FOCUS_PELMO_crops.html b/docs/reference/FOCUS_PELMO_crops.html
index d9ad8d2..ed02c04 100644
--- a/docs/reference/FOCUS_PELMO_crops.html
+++ b/docs/reference/FOCUS_PELMO_crops.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -74,10 +76,10 @@
For the names, three letter codes were constructed by generally taking the
first three letters in lower case. Only when there is an expression in
parentheses, the first letter of this expression becomes the first letter
-in the three letter code, i.e. &#39;Peas (animals)&#39; has the code <code>ape</code>.</p>
+in the three letter code, i.e. 'Peas (animals)' has the code <code>ape</code>.</p>
- <pre><span class='no'>FOCUS_PELMO_crops</span></pre>
+ <pre class="usage"><span class='no'>FOCUS_PELMO_crops</span></pre>
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
@@ -86,23 +88,23 @@ in the three letter code, i.e. &#39;Peas (animals)&#39; has the code <code>ape</
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>print</span>(<span class='no'>FOCUS_PELMO_crops</span>)</div><div class='output co'>#&gt; app gra pot
-#&gt; &quot;Apples&quot; &quot;Grass and alfalfa&quot; &quot;Potatoes&quot;
+#&gt; "Apples" "Grass and alfalfa" "Potatoes"
#&gt; sug win fbe
-#&gt; &quot;Sugar beets&quot; &quot;Winter cereals&quot; &quot;Beans (field)&quot;
+#&gt; "Sugar beets" "Winter cereals" "Beans (field)"
#&gt; vbe bus cab
-#&gt; &quot;Beans (vegetables)&quot; &quot;Bushberries&quot; &quot;Cabbage&quot;
+#&gt; "Beans (vegetables)" "Bushberries" "Cabbage"
#&gt; car cit cot
-#&gt; &quot;Carrots&quot; &quot;Citrus&quot; &quot;Cotton&quot;
+#&gt; "Carrots" "Citrus" "Cotton"
#&gt; lin mai soi
-#&gt; &quot;Linseed&quot; &quot;Maize&quot; &quot;Oil seed rape (summer)&quot;
+#&gt; "Linseed" "Maize" "Oil seed rape (summer)"
#&gt; woi oni ape
-#&gt; &quot;Oil seed rape (winter)&quot; &quot;Onions&quot; &quot;Peas (animals)&quot;
+#&gt; "Oil seed rape (winter)" "Onions" "Peas (animals)"
#&gt; soy spr str
-#&gt; &quot;Soybeans&quot; &quot;Spring cereals&quot; &quot;Strawberries&quot;
+#&gt; "Soybeans" "Spring cereals" "Strawberries"
#&gt; sun tob tom
-#&gt; &quot;Sunflower&quot; &quot;Tobacco&quot; &quot;Tomatoes&quot;
+#&gt; "Sunflower" "Tobacco" "Tomatoes"
#&gt; vin
-#&gt; &quot;Vines&quot; </div></pre>
+#&gt; "Vines" </div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
diff --git a/docs/reference/FOCUS_PELMO_location_codes.html b/docs/reference/FOCUS_PELMO_location_codes.html
index 8051d42..7f4003d 100644
--- a/docs/reference/FOCUS_PELMO_location_codes.html
+++ b/docs/reference/FOCUS_PELMO_location_codes.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -74,7 +76,7 @@
indexed by three letter acronyms.</p>
- <pre><span class='no'>FOCUS_PELMO_location_codes</span></pre>
+ <pre class="usage"><span class='no'>FOCUS_PELMO_location_codes</span></pre>
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
@@ -83,7 +85,7 @@ indexed by three letter acronyms.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>print</span>(<span class='no'>FOCUS_PELMO_location_codes</span>)</div><div class='output co'>#&gt; Cha Ham Jok Kre Oke Pia Por Sev Thi
-#&gt; &quot;C&quot; &quot;H&quot; &quot;J&quot; &quot;K&quot; &quot;N&quot; &quot;P&quot; &quot;O&quot; &quot;S&quot; &quot;T&quot; </div></pre>
+#&gt; "C" "H" "J" "K" "N" "P" "O" "S" "T" </div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
diff --git a/docs/reference/FOCUS_Step_12_scenarios.html b/docs/reference/FOCUS_Step_12_scenarios.html
new file mode 100644
index 0000000..37bb2fd
--- /dev/null
+++ b/docs/reference/FOCUS_Step_12_scenarios.html
@@ -0,0 +1,285 @@
+<!-- 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>Step 1/2 scenario data as distributed with the FOCUS Step 1/2 calculator — FOCUS_Step_12_scenarios • 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">
+
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../jquery.sticky-kit.min.js"></script>
+<script src="../pkgdown.js"></script>
+
+<!-- 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>
+ <a class="navbar-brand" href="../index.html">pfm</a>
+ </div>
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+ </ul>
+
+ <ul class="nav navbar-nav navbar-right">
+
+ </ul>
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+ </header>
+
+ <div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Step 1/2 scenario data as distributed with the FOCUS Step 1/2 calculator</h1>
+ </div>
+
+
+ <p>The data were extracted from the scenario.txt file using the R code shown below.
+The text file is not included in the package as its licence is not clear.</p>
+
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
+
+ <p>A list containing the scenario names in a character vector called 'names',
+ the drift percentiles in a matrix called 'drift', interception percentages in
+ a matrix called 'interception' and the runoff/drainage percentages for Step 2
+ calculations in a matrix called 'rd'.</p>
+
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='fu'>not_run</span>({
+ <span class='co'># This is the code that was used to extract the data</span>
+ <span class='no'>scenario_path</span> <span class='kw'>&lt;-</span> <span class='st'>"inst/extdata/FOCUS_Step_12_scenarios.txt"</span>
+ <span class='no'>scenarios</span> <span class='kw'>&lt;-</span> <span class='fu'>readLines</span>(<span class='no'>scenario_path</span>)[<span class='fl'>9</span>:<span class='fl'>38</span>]
+ <span class='no'>FOCUS_Step_12_scenarios</span> <span class='kw'>&lt;-</span> <span class='fu'>list</span>()
+ <span class='no'>sce</span> <span class='kw'>&lt;-</span> <span class='fu'>read.table</span>(<span class='kw'>text</span> <span class='kw'>=</span> <span class='no'>scenarios</span>, <span class='kw'>sep</span> <span class='kw'>=</span> <span class='st'>"\t"</span>, <span class='kw'>header</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>check.names</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>stringsAsFactors</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
+ <span class='no'>FOCUS_Step_12_scenarios</span>$<span class='no'>names</span> <span class='kw'>=</span> <span class='no'>sce</span>$<span class='no'>Crop</span>
+ <span class='fu'>rownames</span>(<span class='no'>sce</span>) <span class='kw'>&lt;-</span> <span class='no'>sce</span>$<span class='no'>Crop</span>
+ <span class='no'>FOCUS_Step_12_scenarios</span>$<span class='no'>drift</span> <span class='kw'>=</span> <span class='no'>sce</span>[, <span class='fl'>3</span>:<span class='fl'>11</span>]
+ <span class='no'>FOCUS_Step_12_scenarios</span>$<span class='no'>interception</span> <span class='kw'>=</span> <span class='no'>sce</span>[, <span class='fl'>12</span>:<span class='fl'>15</span>]
+ <span class='no'>sce_2</span> <span class='kw'>&lt;-</span> <span class='fu'>readLines</span>(<span class='no'>scenario_path</span>)[<span class='fl'>41</span>:<span class='fl'>46</span>]
+ <span class='no'>rd</span> <span class='kw'>&lt;-</span> <span class='fu'>read.table</span>(<span class='kw'>text</span> <span class='kw'>=</span> <span class='no'>sce_2</span>, <span class='kw'>sep</span> <span class='kw'>=</span> <span class='st'>"\t"</span>)[<span class='fl'>1</span>:<span class='fl'>2</span>]
+ <span class='no'>rd_mat</span> <span class='kw'>&lt;-</span> <span class='fu'>matrix</span>(<span class='no'>rd</span>$<span class='no'>V2</span>, <span class='kw'>nrow</span> <span class='kw'>=</span> <span class='fl'>3</span>, <span class='kw'>byrow</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
+ <span class='fu'>dimnames</span>(<span class='no'>rd_mat</span>) <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>Time</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"Oct-Feb"</span>, <span class='st'>"Mar-May"</span>, <span class='st'>"Jun-Sep"</span>),
+ <span class='kw'>Region</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"North"</span>, <span class='st'>"South"</span>))
+ <span class='no'>FOCUS_Step_12_scenarios</span>$<span class='no'>rd</span> <span class='kw'>=</span> <span class='no'>rd_mat</span>
+ <span class='fu'>save</span>(<span class='no'>FOCUS_Step_12_scenarios</span>, <span class='kw'>file</span> <span class='kw'>=</span> <span class='st'>"data/FOCUS_Step_12_scenarios.RData"</span>)
+})
+
+<span class='co'># And this is the resulting data</span>
+<span class='no'>FOCUS_Step_12_scenarios</span></div><div class='output co'>#&gt; $names
+#&gt; [1] "cereals, spring" "cereals, winter"
+#&gt; [3] "citrus" "cotton"
+#&gt; [5] "field beans" "grass / alfalfa"
+#&gt; [7] "hops" "legumes"
+#&gt; [9] "maize" "oil seed rape, spring"
+#&gt; [11] "oil seed rape, winter" "olives"
+#&gt; [13] "pome / stone fruit, early applns" "pome / stone fruit, late applns"
+#&gt; [15] "potatoes" "soybeans"
+#&gt; [17] "sugar beets" "sunflowers"
+#&gt; [19] "tobacco" "vegetables, bulb"
+#&gt; [21] "vegetables, fruiting" "vegetables, leafy"
+#&gt; [23] "vegetables, root" "vines, early applns"
+#&gt; [25] "vines, late applns" "appln, aerial"
+#&gt; [27] "appln, hand (crop &lt; 50 cm)" "appln, hand (crop &gt; 50 cm)"
+#&gt; [29] "no drift (incorp or seed trtmt)"
+#&gt;
+#&gt; $drift
+#&gt; 1 2 3 4 5 6
+#&gt; cereals, spring 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; cereals, winter 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; citrus 15.725 12.129 11.011 10.124 9.743 9.204
+#&gt; cotton 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; field beans 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; grass / alfalfa 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; hops 19.326 17.723 15.928 15.378 15.114 14.902
+#&gt; legumes 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; maize 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; oil seed rape, spring 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; oil seed rape, winter 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; olives 15.725 12.129 11.011 10.124 9.743 9.204
+#&gt; pome / stone fruit, early applns 29.197 25.531 23.960 23.603 23.116 22.760
+#&gt; pome / stone fruit, late applns 15.725 12.129 11.011 10.124 9.743 9.204
+#&gt; potatoes 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; soybeans 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; sugar beets 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; sunflowers 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; tobacco 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; vegetables, bulb 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; vegetables, fruiting 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; vegetables, leafy 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; vegetables, root 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; vines, early applns 2.699 2.496 2.546 2.499 2.398 2.336
+#&gt; vines, late applns 8.028 7.119 6.898 6.631 6.636 6.431
+#&gt; appln, aerial 33.200 33.200 33.200 33.200 33.200 33.200
+#&gt; appln, hand (crop &lt; 50 cm) 2.759 2.438 2.024 1.862 1.794 1.631
+#&gt; appln, hand (crop &gt; 50 cm) 8.028 7.119 6.898 6.631 6.636 6.431
+#&gt; no drift (incorp or seed trtmt) 0.000 0.000 0.000 0.000 0.000 0.000
+#&gt; 7 8 &gt;8
+#&gt; cereals, spring 1.578 1.512 1.512
+#&gt; cereals, winter 1.578 1.512 1.512
+#&gt; citrus 9.102 8.656 8.656
+#&gt; cotton 1.578 1.512 1.512
+#&gt; field beans 1.578 1.512 1.512
+#&gt; grass / alfalfa 1.578 1.512 1.512
+#&gt; hops 14.628 13.520 13.520
+#&gt; legumes 1.578 1.512 1.512
+#&gt; maize 1.578 1.512 1.512
+#&gt; oil seed rape, spring 1.578 1.512 1.512
+#&gt; oil seed rape, winter 1.578 1.512 1.512
+#&gt; olives 9.102 8.656 8.656
+#&gt; pome / stone fruit, early applns 22.690 22.241 22.241
+#&gt; pome / stone fruit, late applns 9.102 8.656 8.656
+#&gt; potatoes 1.578 1.512 1.512
+#&gt; soybeans 1.578 1.512 1.512
+#&gt; sugar beets 1.578 1.512 1.512
+#&gt; sunflowers 1.578 1.512 1.512
+#&gt; tobacco 1.578 1.512 1.512
+#&gt; vegetables, bulb 1.578 1.512 1.512
+#&gt; vegetables, fruiting 1.578 1.512 1.512
+#&gt; vegetables, leafy 1.578 1.512 1.512
+#&gt; vegetables, root 1.578 1.512 1.512
+#&gt; vines, early applns 2.283 2.265 2.265
+#&gt; vines, late applns 6.227 6.173 6.173
+#&gt; appln, aerial 33.200 33.200 33.200
+#&gt; appln, hand (crop &lt; 50 cm) 1.578 1.512 1.512
+#&gt; appln, hand (crop &gt; 50 cm) 6.227 6.173 6.173
+#&gt; no drift (incorp or seed trtmt) 0.000 0.000 0.000
+#&gt;
+#&gt; $interception
+#&gt; no interception minimal crop cover
+#&gt; cereals, spring 0 0.00
+#&gt; cereals, winter 0 0.00
+#&gt; citrus 0 0.80
+#&gt; cotton 0 0.30
+#&gt; field beans 0 0.25
+#&gt; grass / alfalfa 0 0.40
+#&gt; hops 0 0.20
+#&gt; legumes 0 0.25
+#&gt; maize 0 0.25
+#&gt; oil seed rape, spring 0 0.40
+#&gt; oil seed rape, winter 0 0.40
+#&gt; olives 0 0.70
+#&gt; pome / stone fruit, early applns 0 0.20
+#&gt; pome / stone fruit, late applns 0 0.20
+#&gt; potatoes 0 0.15
+#&gt; soybeans 0 0.20
+#&gt; sugar beets 0 0.20
+#&gt; sunflowers 0 0.20
+#&gt; tobacco 0 0.20
+#&gt; vegetables, bulb 0 0.10
+#&gt; vegetables, fruiting 0 0.25
+#&gt; vegetables, leafy 0 0.25
+#&gt; vegetables, root 0 0.25
+#&gt; vines, early applns 0 0.40
+#&gt; vines, late applns 0 0.40
+#&gt; appln, aerial 0 0.20
+#&gt; appln, hand (crop &lt; 50 cm) 0 0.20
+#&gt; appln, hand (crop &gt; 50 cm) 0 0.20
+#&gt; no drift (incorp or seed trtmt) 0 0.00
+#&gt; average crop cover full canopy
+#&gt; cereals, spring 0.20 0.70
+#&gt; cereals, winter 0.20 0.70
+#&gt; citrus 0.80 0.80
+#&gt; cotton 0.60 0.75
+#&gt; field beans 0.40 0.70
+#&gt; grass / alfalfa 0.60 0.75
+#&gt; hops 0.50 0.70
+#&gt; legumes 0.50 0.70
+#&gt; maize 0.50 0.75
+#&gt; oil seed rape, spring 0.70 0.75
+#&gt; oil seed rape, winter 0.70 0.75
+#&gt; olives 0.70 0.70
+#&gt; pome / stone fruit, early applns 0.40 0.65
+#&gt; pome / stone fruit, late applns 0.40 0.65
+#&gt; potatoes 0.50 0.70
+#&gt; soybeans 0.50 0.75
+#&gt; sugar beets 0.70 0.75
+#&gt; sunflowers 0.50 0.75
+#&gt; tobacco 0.70 0.75
+#&gt; vegetables, bulb 0.25 0.40
+#&gt; vegetables, fruiting 0.50 0.70
+#&gt; vegetables, leafy 0.40 0.70
+#&gt; vegetables, root 0.50 0.70
+#&gt; vines, early applns 0.50 0.60
+#&gt; vines, late applns 0.50 0.60
+#&gt; appln, aerial 0.50 0.70
+#&gt; appln, hand (crop &lt; 50 cm) 0.50 0.70
+#&gt; appln, hand (crop &gt; 50 cm) 0.50 0.70
+#&gt; no drift (incorp or seed trtmt) 0.00 0.00
+#&gt;
+#&gt; $rd
+#&gt; Region
+#&gt; Time North South
+#&gt; Oct-Feb 5 4
+#&gt; Mar-May 2 4
+#&gt; Jun-Sep 2 3
+#&gt; </div></pre>
+ </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="#format">Format</a></li>
+
+ <li><a href="#examples">Examples</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://hadley.github.io/pkgdown/">pkgdown</a>.</p>
+</div>
+
+ </footer>
+ </div>
+
+ </body>
+</html>
diff --git a/docs/reference/GUS.html b/docs/reference/GUS.html
index f65c6fd..6f29e72 100644
--- a/docs/reference/GUS.html
+++ b/docs/reference/GUS.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -75,7 +77,7 @@ the following equation
$$GUS = \log_{10} DT50_{soil} (4 - \log_{10} K_{oc})$$</p>
- <pre><span class='fu'>GUS</span>(<span class='no'>...</span>)
+ <pre class="usage"><span class='fu'>GUS</span>(<span class='no'>...</span>)
<span class='co'># S3 method for numeric</span>
<span class='fu'>GUS</span>(<span class='no'>DT50</span>, <span class='no'>Koc</span>, <span class='no'>...</span>)
@@ -89,51 +91,76 @@ $$GUS = \log_{10} DT50_{soil} (4 - \log_{10} K_{oc})$$</p>
<span class='fu'>print</span>(<span class='no'>x</span>, <span class='no'>...</span>, <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>1</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>...</dt>
- <dd>Included in the generic to allow for further arguments later. Therefore
-this also had to be added to the specific methods.</dd>
- <dt>DT50</dt>
- <dd>Half-life of the chemical in soil. Should be a field
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>...</th>
+ <td><p>Included in the generic to allow for further arguments later. Therefore
+this also had to be added to the specific methods.</p></td>
+ </tr>
+ <tr>
+ <th>DT50</th>
+ <td><p>Half-life of the chemical in soil. Should be a field
half-life according to Gustafson (1989). However, leaching to the sub-soil
can not completely be excluded in field dissipation experiments and Gustafson
did not refer to any normalisation procedure, but says the field study should
-be conducted under use conditions.</dd>
- <dt>Koc</dt>
- <dd>The sorption constant normalised to organic carbon. Gustafson
+be conducted under use conditions.</p></td>
+ </tr>
+ <tr>
+ <th>Koc</th>
+ <td><p>The sorption constant normalised to organic carbon. Gustafson
does not mention the nonlinearity of the sorption constant commonly
found and usually described by Freundlich sorption, therefore it is
unclear at which reference concentration the Koc should be observed
-(and if the reference concentration would be in soil or in porewater).</dd>
- <dt>chent</dt>
- <dd>If a chent is given with appropriate information present in its
-chyaml field, this information is used, with defaults specified below.</dd>
- <dt>degradation_value</dt>
- <dd>Which of the available degradation values should
-be used?</dd>
- <dt>lab_field</dt>
- <dd>Should laboratory or field half-lives be used? This
+(and if the reference concentration would be in soil or in porewater).</p></td>
+ </tr>
+ <tr>
+ <th>chent</th>
+ <td><p>If a chent is given with appropriate information present in its
+chyaml field, this information is used, with defaults specified below.</p></td>
+ </tr>
+ <tr>
+ <th>degradation_value</th>
+ <td><p>Which of the available degradation values should
+be used?</p></td>
+ </tr>
+ <tr>
+ <th>lab_field</th>
+ <td><p>Should laboratory or field half-lives be used? This
defaults to lab in this implementation, in order to avoid
double-accounting for mobility. If comparability with the original GUS
values given by Gustafson (1989) is desired, non-normalised first-order
-field half-lives obtained under actual use conditions should be used.</dd>
- <dt>redox</dt>
- <dd>Aerobic or anaerobic degradation data</dd>
- <dt>sorption_value</dt>
- <dd>Which of the available sorption values should be used?
+field half-lives obtained under actual use conditions should be used.</p></td>
+ </tr>
+ <tr>
+ <th>redox</th>
+ <td><p>Aerobic or anaerobic degradation data</p></td>
+ </tr>
+ <tr>
+ <th>sorption_value</th>
+ <td><p>Which of the available sorption values should be used?
Defaults to Kfoc as this is what is generally available from the European
pesticide peer review process. These values generally use a reference
concentration of 1 mg/L in porewater, that means they would be expected to
-be Koc values at a concentration of 1 mg/L in the water phase.</dd>
- <dt>degradation_aggregator</dt>
- <dd>Function for aggregating half-lives</dd>
- <dt>sorption_aggregator</dt>
- <dd>Function for aggregation Koc values</dd>
- <dt>x</dt>
- <dd>An object of class GUS_result to be printed</dd>
- <dt>digits</dt>
- <dd>The number of digits used in the print method</dd>
- </dl>
+be Koc values at a concentration of 1 mg/L in the water phase.</p></td>
+ </tr>
+ <tr>
+ <th>degradation_aggregator</th>
+ <td><p>Function for aggregating half-lives</p></td>
+ </tr>
+ <tr>
+ <th>sorption_aggregator</th>
+ <td><p>Function for aggregation Koc values</p></td>
+ </tr>
+ <tr>
+ <th>x</th>
+ <td><p>An object of class GUS_result to be printed</p></td>
+ </tr>
+ <tr>
+ <th>digits</th>
+ <td><p>The number of digits used in the print method</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
diff --git a/docs/reference/PEC_soil.html b/docs/reference/PEC_soil.html
index 0449f8e..4b1b7b9 100644
--- a/docs/reference/PEC_soil.html
+++ b/docs/reference/PEC_soil.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -76,62 +78,95 @@ attempt is made at calculating a long term maximum concentration using
the concepts layed out for example in the PPR panel opinion (EFSA 2012).</p>
- <pre><span class='fu'>PEC_soil</span>(<span class='no'>rate</span>, <span class='kw'>rate_units</span> <span class='kw'>=</span> <span class='st'>"g/ha"</span>, <span class='kw'>interception</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>mixing_depth</span> <span class='kw'>=</span> <span class='fl'>5</span>,
+ <pre class="usage"><span class='fu'>PEC_soil</span>(<span class='no'>rate</span>, <span class='kw'>rate_units</span> <span class='kw'>=</span> <span class='st'>"g/ha"</span>, <span class='kw'>interception</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>mixing_depth</span> <span class='kw'>=</span> <span class='fl'>5</span>,
<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'>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_2015"</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>
- <dl class="dl-horizontal">
- <dt>rate</dt>
- <dd>Application rate in units specified below</dd>
- <dt>rate_units</dt>
- <dd>Defaults to g/ha</dd>
- <dt>interception</dt>
- <dd>The fraction of the application rate that does not reach the soil</dd>
- <dt>mixing_depth</dt>
- <dd>Mixing depth in cm</dd>
- <dt>PEC_units</dt>
- <dd>Requested units for the calculated PEC. Only mg/kg currently supported</dd>
- <dt>PEC_pw_units</dt>
- <dd>Only mg/L currently supported</dd>
- <dt>interval</dt>
- <dd>Period of the deeper mixing, defaults to 365, which is a year if
-rate units are in days</dd>
- <dt>n_periods</dt>
- <dd>Number of periods to be considered for long term PEC calculations</dd>
- <dt>tillage_depth</dt>
- <dd>Periodic (see interval) deeper mixing in cm</dd>
- <dt>chent</dt>
- <dd>An optional chent object holding substance specific information. Can
-also be a name for the substance as a character string</dd>
- <dt>DT50</dt>
- <dd>If specified, overrides soil DT50 endpoints from a chent object
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>rate</th>
+ <td><p>Application rate in units specified below</p></td>
+ </tr>
+ <tr>
+ <th>rate_units</th>
+ <td><p>Defaults to g/ha</p></td>
+ </tr>
+ <tr>
+ <th>interception</th>
+ <td><p>The fraction of the application rate that does not reach the soil</p></td>
+ </tr>
+ <tr>
+ <th>mixing_depth</th>
+ <td><p>Mixing depth in cm</p></td>
+ </tr>
+ <tr>
+ <th>PEC_units</th>
+ <td><p>Requested units for the calculated PEC. Only mg/kg currently supported</p></td>
+ </tr>
+ <tr>
+ <th>PEC_pw_units</th>
+ <td><p>Only mg/L currently supported</p></td>
+ </tr>
+ <tr>
+ <th>interval</th>
+ <td><p>Period of the deeper mixing, defaults to 365, which is a year if
+rate units are in days</p></td>
+ </tr>
+ <tr>
+ <th>n_periods</th>
+ <td><p>Number of periods to be considered for long term PEC calculations</p></td>
+ </tr>
+ <tr>
+ <th>tillage_depth</th>
+ <td><p>Periodic (see interval) deeper mixing in cm</p></td>
+ </tr>
+ <tr>
+ <th>chent</th>
+ <td><p>An optional chent object holding substance specific information. Can
+also be a name for the substance as a character string</p></td>
+ </tr>
+ <tr>
+ <th>DT50</th>
+ <td><p>If specified, overrides soil DT50 endpoints from a chent object
If DT50 is not specified here and not available from the chent object, zero
-degradation is assumed</dd>
- <dt>Koc</dt>
- <dd>If specified, overrides Koc endpoints from a chent object</dd>
- <dt>Kom</dt>
- <dd>Calculated from Koc by default, but can explicitly be specified
-as Kom here</dd>
- <dt>t_avg</dt>
- <dd>Averaging times for time weighted average concentrations</dd>
- <dt>scenarios</dt>
- <dd>If this is &#39;default&#39;, the DT50 will be used without correction
+degradation is assumed</p></td>
+ </tr>
+ <tr>
+ <th>Koc</th>
+ <td><p>If specified, overrides Koc endpoints from a chent object</p></td>
+ </tr>
+ <tr>
+ <th>Kom</th>
+ <td><p>Calculated from Koc by default, but can explicitly be specified
+as Kom here</p></td>
+ </tr>
+ <tr>
+ <th>t_avg</th>
+ <td><p>Averaging times for time weighted average concentrations</p></td>
+ </tr>
+ <tr>
+ <th>scenarios</th>
+ <td><p>If this is 'default', the DT50 will be used without correction
and soil properties as specified in the REACH guidance (R.16, Table
-R.16-9) are used for porewater PEC calculations. If this is &quot;EFSA_2015&quot;,
+R.16-9) are used for porewater PEC calculations. If this is "EFSA_2015",
the DT50 is taken to be a modelling half-life at 20°C and pF2 (for when
-&#39;chents&#39; is specified, the DegT50 with destination &#39;PECgw&#39; will be used),
+'chents' is specified, the DegT50 with destination 'PECgw' will be used),
and corrected using an Arrhenius activation energy of 65.4 kJ/mol. Also
-model and scenario adjustment factors from the EFSA guidance are used.</dd>
- <dt>porewater</dt>
- <dd>Should equilibrium porewater concentrations be estimated
+model and scenario adjustment factors from the EFSA guidance are used.</p></td>
+ </tr>
+ <tr>
+ <th>porewater</th>
+ <td><p>Should equilibrium porewater concentrations be estimated
based on Kom and the organic carbon fraction of the soil instead of total
soil concentrations? Based on equation (7) given in the PPR panel opinion
(EFSA 2012, p. 24) and the scenarios specified in the EFSA guidance (2015,
-p. 13).</dd>
- </dl>
+p. 13).</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
@@ -140,18 +175,18 @@ p. 13).</dd>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>This assumes that the complete load to soil during the time specified by
-&#39;interval&#39; (typically 365 days) is dosed at once. As in the PPR panel
+'interval' (typically 365 days) is dosed at once. As in the PPR panel
opinion cited below (PPR panel 2012), only temperature correction using the
Arrhenius equation is performed.</p>
- <p>Total soil and porewater PEC values for the scenarios as defined in the EFSA
+<p>Total soil and porewater PEC values for the scenarios as defined in the EFSA
guidance (2015, p. 13) can easily be calculated.</p>
<h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2>
<p>If temperature information is available in the selected scenarios, as
e.g. in the EFSA scenarios, the DT50 for groundwater modelling
- (destination &#39;PECgw&#39;) is taken from the chent object, otherwise the DT50
- with destination &#39;PECsoil&#39;.</p>
+ (destination 'PECgw') is taken from the chent object, otherwise the DT50
+ with destination 'PECsoil'.</p>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
@@ -160,7 +195,7 @@ guidance (2015, p. 13) can easily be calculated.</p>
selection and scenario parameterisation for predicting environmental
concentrations of plant protection products in soil. <em>EFSA Journal</em>
<b>10</b>(2) 2562, doi:10.2903/j.efsa.2012.2562</p>
- <p>EFSA (European Food Safety Authority) (2015) EFSA guidance document for
+<p>EFSA (European Food Safety Authority) (2015) EFSA guidance document for
predicting environmental concentrations of active substances of plant
protection products and transformation products of these active substances
in soil. <em>EFSA Journal</em> <b>13</b>(4) 4093
diff --git a/docs/reference/PEC_sw_drainage_UK.html b/docs/reference/PEC_sw_drainage_UK.html
index db0f85f..e52eeb8 100644
--- a/docs/reference/PEC_sw_drainage_UK.html
+++ b/docs/reference/PEC_sw_drainage_UK.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -74,27 +76,42 @@
published on the CRC website</p>
- <pre><span class='fu'>PEC_sw_drainage_UK</span>(<span class='no'>rate</span>, <span class='kw'>interception</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='no'>Koc</span>, <span class='kw'>latest_application</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
+ <pre class="usage"><span class='fu'>PEC_sw_drainage_UK</span>(<span class='no'>rate</span>, <span class='kw'>interception</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='no'>Koc</span>, <span class='kw'>latest_application</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>soil_DT50</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>model</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>model_parms</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>rate</dt>
- <dd>Application rate in g/ha</dd>
- <dt>interception</dt>
- <dd>The fraction of the application rate that does not reach the soil</dd>
- <dt>Koc</dt>
- <dd>The sorption coefficient normalised to organic carbon in L/kg</dd>
- <dt>latest_application</dt>
- <dd>Latest application date, formatted as e.g. &quot;01 July&quot;</dd>
- <dt>soil_DT50</dt>
- <dd>Soil degradation half-life, if SFO kinetics are to be used</dd>
- <dt>model</dt>
- <dd>The soil degradation model to be used. Either one of &quot;FOMC&quot;,
-&quot;DFOP&quot;, &quot;HS&quot;, or &quot;IORE&quot;, or an mkinmod object</dd>
- <dt>model_parms</dt>
- <dd>A named numeric vector containing the model parameters</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>rate</th>
+ <td><p>Application rate in g/ha</p></td>
+ </tr>
+ <tr>
+ <th>interception</th>
+ <td><p>The fraction of the application rate that does not reach the soil</p></td>
+ </tr>
+ <tr>
+ <th>Koc</th>
+ <td><p>The sorption coefficient normalised to organic carbon in L/kg</p></td>
+ </tr>
+ <tr>
+ <th>latest_application</th>
+ <td><p>Latest application date, formatted as e.g. "01 July"</p></td>
+ </tr>
+ <tr>
+ <th>soil_DT50</th>
+ <td><p>Soil degradation half-life, if SFO kinetics are to be used</p></td>
+ </tr>
+ <tr>
+ <th>model</th>
+ <td><p>The soil degradation model to be used. Either one of "FOMC",
+"DFOP", "HS", or "IORE", or an mkinmod object</p></td>
+ </tr>
+ <tr>
+ <th>model_parms</th>
+ <td><p>A named numeric vector containing the model parameters</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
diff --git a/docs/reference/PEC_sw_drift.html b/docs/reference/PEC_sw_drift.html
index a168de3..e52546b 100644
--- a/docs/reference/PEC_sw_drift.html
+++ b/docs/reference/PEC_sw_drift.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -75,32 +77,51 @@ concentration in surface water based on complete, instantaneous mixing
with input via spray drift.</p>
- <pre><span class='fu'>PEC_sw_drift</span>(<span class='no'>rate</span>, <span class='kw'>applications</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>water_depth</span> <span class='kw'>=</span> <span class='fl'>30</span>,
+ <pre class="usage"><span class='fu'>PEC_sw_drift</span>(<span class='no'>rate</span>, <span class='kw'>applications</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>water_depth</span> <span class='kw'>=</span> <span class='fl'>30</span>,
<span class='kw'>drift_percentages</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>drift_data</span> <span class='kw'>=</span> <span class='st'>"JKI"</span>, <span class='kw'>crop</span> <span class='kw'>=</span> <span class='st'>"Ackerbau"</span>,
<span class='kw'>distances</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>1</span>, <span class='fl'>5</span>, <span class='fl'>10</span>, <span class='fl'>20</span>), <span class='kw'>rate_units</span> <span class='kw'>=</span> <span class='st'>"g/ha"</span>, <span class='kw'>PEC_units</span> <span class='kw'>=</span> <span class='st'>"µg/L"</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>rate</dt>
- <dd>Application rate in units specified below</dd>
- <dt>applications</dt>
- <dd>Number of applications for selection of drift percentile</dd>
- <dt>water_depth</dt>
- <dd>Depth of the water body in cm</dd>
- <dt>drift_percentages</dt>
- <dd>Percentage drift values for which to calculate PECsw.
-&#39;drift_data&#39; and &#39;distances&#39; if not NULL.</dd>
- <dt>drift_data</dt>
- <dd>Source of drift percentage data</dd>
- <dt>crop</dt>
- <dd>Crop name (use German names for JKI data), defaults to &quot;Ackerbau&quot;</dd>
- <dt>distances</dt>
- <dd>The distances in m for which to get PEC values</dd>
- <dt>rate_units</dt>
- <dd>Defaults to g/ha</dd>
- <dt>PEC_units</dt>
- <dd>Requested units for the calculated PEC. Only µg/L currently supported</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>rate</th>
+ <td><p>Application rate in units specified below</p></td>
+ </tr>
+ <tr>
+ <th>applications</th>
+ <td><p>Number of applications for selection of drift percentile</p></td>
+ </tr>
+ <tr>
+ <th>water_depth</th>
+ <td><p>Depth of the water body in cm</p></td>
+ </tr>
+ <tr>
+ <th>drift_percentages</th>
+ <td><p>Percentage drift values for which to calculate PECsw.
+'drift_data' and 'distances' if not NULL.</p></td>
+ </tr>
+ <tr>
+ <th>drift_data</th>
+ <td><p>Source of drift percentage data</p></td>
+ </tr>
+ <tr>
+ <th>crop</th>
+ <td><p>Crop name (use German names for JKI data), defaults to "Ackerbau"</p></td>
+ </tr>
+ <tr>
+ <th>distances</th>
+ <td><p>The distances in m for which to get PEC values</p></td>
+ </tr>
+ <tr>
+ <th>rate_units</th>
+ <td><p>Defaults to g/ha</p></td>
+ </tr>
+ <tr>
+ <th>PEC_units</th>
+ <td><p>Requested units for the calculated PEC. Only µg/L currently supported</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
diff --git a/docs/reference/PEC_sw_focus.html b/docs/reference/PEC_sw_focus.html
new file mode 100644
index 0000000..c5cbfe7
--- /dev/null
+++ b/docs/reference/PEC_sw_focus.html
@@ -0,0 +1,272 @@
+<!-- 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>Calculate FOCUS Step 1 PEC surface water — PEC_sw_focus • 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">
+
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../jquery.sticky-kit.min.js"></script>
+<script src="../pkgdown.js"></script>
+
+<!-- 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>
+ <a class="navbar-brand" href="../index.html">pfm</a>
+ </div>
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+ </ul>
+
+ <ul class="nav navbar-nav navbar-right">
+
+ </ul>
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+ </header>
+
+ <div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Calculate FOCUS Step 1 PEC surface water</h1>
+ </div>
+
+
+ <p>This is reimplementation of Step 1 of the FOCUS Step 1 and 2 calculator
+version 3.2, authored by Michael Klein. Note that results for multiple
+applications should be compared to the corresponding results for a
+single application. At current, this is not done automatically in
+this implementation.</p>
+
+
+ <pre class="usage"><span class='fu'>PEC_sw_focus</span>(<span class='no'>parent</span>, <span class='no'>rate</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>i</span> <span class='kw'>=</span> <span class='fl'>NA</span>, <span class='kw'>met</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>f_drift</span> <span class='kw'>=</span> <span class='fl'>NA</span>,
+ <span class='kw'>f_rd</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>scenario</span> <span class='kw'>=</span> <span class='no'>FOCUS_Step_12_scenarios</span>$<span class='no'>names</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>parent</th>
+ <td><p>A list containing substance specific parameters</p></td>
+ </tr>
+ <tr>
+ <th>rate</th>
+ <td><p>The application rate in g/ha. Overriden when
+applications are given explicitly</p></td>
+ </tr>
+ <tr>
+ <th>n</th>
+ <td><p>The number of applications</p></td>
+ </tr>
+ <tr>
+ <th>i</th>
+ <td><p>The application interval</p></td>
+ </tr>
+ <tr>
+ <th>met</th>
+ <td><p>A list containing metabolite specific parameters. If not NULL,
+the PEC is calculated for this compound, not the parent.</p></td>
+ </tr>
+ <tr>
+ <th>f_drift</th>
+ <td><p>The fraction of the application rate reaching the waterbody
+via drift. If NA, this is derived from the scenario name and the number
+of applications via the drift data defined by the
+<code><a href='FOCUS_Step_12_scenarios.html'>FOCUS_Step_12_scenarios</a></code></p></td>
+ </tr>
+ <tr>
+ <th>f_rd</th>
+ <td><p>The fraction of the amount applied reaching the waterbody via
+runoff/drainage. At Step 1, it is assumed to be 10<!-- %, be it the -->
+parent or a metabolite</p></td>
+ </tr>
+ <tr>
+ <th>scenario</th>
+ <td><p>The name of the scenario. Must be one of the scenario
+names given in <code><a href='FOCUS_Step_12_scenarios.html'>FOCUS_Step_12_scenarios</a></code></p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2>
+
+ <p>The formulas for input to the waterbody via runoff/drainage of the
+ parent and subsequent formation of the metabolite in water is not
+ documented in the model description coming with the calculator</p>
+<p>Step 2 is not implemented</p>
+
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>FOCUS (2014) Generic guidance for Surface Water Scenarios (version 1.4).
+ FOrum for the Co-ordination of pesticde fate models and their USe.
+ http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/sw/docs/Generic<!-- %20FOCUS_SWS_vc1.4.pdf --></p>
+<p>Website of the Steps 1 and 2 calculator at the Joint Research
+ Center of the European Union:
+ http://esdac.jrc.ec.europa.eu/projects/stepsonetwo</p>
+
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='co'># Parent only</span>
+<span class='no'>dummy_1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='chent_focus_sw.html'>chent_focus_sw</a></span>(<span class='kw'>cwsat</span> <span class='kw'>=</span> <span class='fl'>6000</span>, <span class='kw'>DT50_ws</span> <span class='kw'>=</span> <span class='fl'>6</span>, <span class='kw'>Koc</span> <span class='kw'>=</span> <span class='fl'>344.8</span>)
+<span class='fu'>PEC_sw_focus</span>(<span class='no'>dummy_1</span>, <span class='fl'>3000</span>, <span class='kw'>f_drift</span> <span class='kw'>=</span> <span class='fl'>0</span>)</div><div class='output co'>#&gt; $f_drift
+#&gt; [1] 0
+#&gt;
+#&gt; $eq_rate_drift_s
+#&gt; [1] 3000
+#&gt;
+#&gt; $eq_rate_rd_s
+#&gt; [1] 3000
+#&gt;
+#&gt; $eq_rate_rd_parent_s
+#&gt; [1] NA
+#&gt;
+#&gt; $input_drift_s
+#&gt; [1] 0
+#&gt;
+#&gt; $input_rd_s
+#&gt; [1] 300
+#&gt;
+#&gt; $f_rd_sw
+#&gt; [1] 0.6850566
+#&gt;
+#&gt; $f_rd_sed
+#&gt; [1] 0.3149434
+#&gt;
+#&gt; $PEC
+#&gt; type
+#&gt; Time PECsw TWAECsw PECsed TWAECsed
+#&gt; 0 6.850566e+02 NA 2.362075e+03 NA
+#&gt; 1 6.103161e+02 647.6864 2.104370e+03 2233.223
+#&gt; 2 5.437298e+02 NA 1.874780e+03 NA
+#&gt; 4 4.315586e+02 NA 1.488014e+03 NA
+#&gt; 7 3.051580e+02 NA 1.052185e+03 NA
+#&gt; 14 1.359325e+02 NA 4.686951e+02 NA
+#&gt; 21 6.055102e+01 NA 2.087799e+02 NA
+#&gt; 28 2.697241e+01 NA 9.300089e+01 NA
+#&gt; 42 5.352005e+00 NA 1.845371e+01 NA
+#&gt; 50 2.123945e+00 NA 7.323361e+00 NA
+#&gt; 100 6.585062e-03 NA 2.270529e-02 NA
+#&gt;
+#&gt; $PEC_sw_max
+#&gt; [1] 685.0566
+#&gt;
+#&gt; $PEC_sed_max
+#&gt; [1] 2362.075
+#&gt; </div><div class='input'>
+<span class='co'># Metabolite</span>
+<span class='no'>new_dummy</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='chent_focus_sw.html'>chent_focus_sw</a></span>(<span class='kw'>mw</span> <span class='kw'>=</span> <span class='fl'>250</span>, <span class='kw'>Koc</span> <span class='kw'>=</span> <span class='fl'>100</span>)
+<span class='no'>M1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='chent_focus_sw.html'>chent_focus_sw</a></span>(<span class='kw'>mw</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>cwsat</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>DT50_ws</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>Koc</span> <span class='kw'>=</span> <span class='fl'>50</span>, <span class='kw'>max_ws</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>max_soil</span> <span class='kw'>=</span> <span class='fl'>0.5</span>)
+<span class='fu'>PEC_sw_focus</span>(<span class='no'>new_dummy</span>, <span class='fl'>1000</span>, <span class='kw'>scenario</span> <span class='kw'>=</span> <span class='st'>"cereals, winter"</span>, <span class='kw'>met</span> <span class='kw'>=</span> <span class='no'>M1</span>)</div><div class='output co'>#&gt; $f_drift
+#&gt; [1] 0.02759
+#&gt;
+#&gt; $eq_rate_drift_s
+#&gt; [1] 0
+#&gt;
+#&gt; $eq_rate_rd_s
+#&gt; [1] 200
+#&gt;
+#&gt; $eq_rate_rd_parent_s
+#&gt; [1] 0
+#&gt;
+#&gt; $input_drift_s
+#&gt; [1] 0
+#&gt;
+#&gt; $input_rd_s
+#&gt; [1] 20
+#&gt;
+#&gt; $f_rd_sw
+#&gt; [1] 0.9375
+#&gt;
+#&gt; $f_rd_sed
+#&gt; [1] 0.0625
+#&gt;
+#&gt; $PEC
+#&gt; type
+#&gt; Time PECsw TWAECsw PECsed TWAECsed
+#&gt; 0 62.50000 NA 31.25000 NA
+#&gt; 1 62.06828 62.28414 31.03414 31.14207
+#&gt; 2 61.63954 NA 30.81977 NA
+#&gt; 4 60.79093 NA 30.39547 NA
+#&gt; 7 59.53987 NA 29.76994 NA
+#&gt; 14 56.71995 NA 28.35997 NA
+#&gt; 21 54.03358 NA 27.01679 NA
+#&gt; 28 51.47444 NA 25.73722 NA
+#&gt; 42 46.71404 NA 23.35702 NA
+#&gt; 50 44.19417 NA 22.09709 NA
+#&gt; 100 31.25000 NA 15.62500 NA
+#&gt;
+#&gt; $PEC_sw_max
+#&gt; [1] 62.5
+#&gt;
+#&gt; $PEC_sed_max
+#&gt; [1] 31.25
+#&gt; </div></pre>
+ </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="#note">Note</a></li>
+
+ <li><a href="#references">References</a></li>
+
+ <li><a href="#examples">Examples</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://hadley.github.io/pkgdown/">pkgdown</a>.</p>
+</div>
+
+ </footer>
+ </div>
+
+ </body>
+</html>
diff --git a/docs/reference/PEC_sw_sed.html b/docs/reference/PEC_sw_sed.html
index 6ede4c7..ceb8ea3 100644
--- a/docs/reference/PEC_sw_sed.html
+++ b/docs/reference/PEC_sw_sed.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculate predicted environmental concentrations in sediment from surface
- — PEC_sw_sed • pfm</title>
+water concentrations — PEC_sw_sed • pfm</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
@@ -26,12 +26,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -68,37 +70,52 @@
<div class="col-md-9 contents">
<div class="page-header">
<h1>Calculate predicted environmental concentrations in sediment from surface
-</h1>
+water concentrations</h1>
</div>
- <p>The method &#39;percentage&#39; is equivalent to what is used in the CRD spreadsheet
+ <p>The method 'percentage' is equivalent to what is used in the CRD spreadsheet
PEC calculator</p>
- <pre><span class='fu'>PEC_sw_sed</span>(<span class='no'>PEC_sw</span>, <span class='kw'>percentage</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"percentage"</span>,
+ <pre class="usage"><span class='fu'>PEC_sw_sed</span>(<span class='no'>PEC_sw</span>, <span class='kw'>percentage</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"percentage"</span>,
<span class='kw'>sediment_depth</span> <span class='kw'>=</span> <span class='fl'>5</span>, <span class='kw'>water_depth</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>sediment_density</span> <span class='kw'>=</span> <span class='fl'>1.3</span>,
<span class='kw'>PEC_sed_units</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"µg/kg"</span>, <span class='st'>"mg/kg"</span>))</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>PEC_sw</dt>
- <dd>Numeric vector or matrix of surface water concentrations in µg/L for
-which the corresponding sediment concentration is to be estimated</dd>
- <dt>percentage</dt>
- <dd>The percentage in sediment, used for the percentage method</dd>
- <dt>method</dt>
- <dd>The method used for the calculation</dd>
- <dt>sediment_depth</dt>
- <dd>Depth of the sediment layer</dd>
- <dt>water_depth</dt>
- <dd>Depth of the water body in cm</dd>
- <dt>sediment_density</dt>
- <dd>The density of the sediment in L/kg (equivalent to
-g/cm3)</dd>
- <dt>PEC_sed_units</dt>
- <dd>The units of the estimated sediment PEC value</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>PEC_sw</th>
+ <td><p>Numeric vector or matrix of surface water concentrations in µg/L for
+which the corresponding sediment concentration is to be estimated</p></td>
+ </tr>
+ <tr>
+ <th>percentage</th>
+ <td><p>The percentage in sediment, used for the percentage method</p></td>
+ </tr>
+ <tr>
+ <th>method</th>
+ <td><p>The method used for the calculation</p></td>
+ </tr>
+ <tr>
+ <th>sediment_depth</th>
+ <td><p>Depth of the sediment layer</p></td>
+ </tr>
+ <tr>
+ <th>water_depth</th>
+ <td><p>Depth of the water body in cm</p></td>
+ </tr>
+ <tr>
+ <th>sediment_density</th>
+ <td><p>The density of the sediment in L/kg (equivalent to
+g/cm3)</p></td>
+ </tr>
+ <tr>
+ <th>PEC_sed_units</th>
+ <td><p>The units of the estimated sediment PEC value</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
diff --git a/docs/reference/PELMO_path.html b/docs/reference/PELMO_path.html
index ab24341..d19d640 100644
--- a/docs/reference/PELMO_path.html
+++ b/docs/reference/PELMO_path.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -73,17 +75,24 @@
<p>Create a path of run directories as the PELMO GUI does</p>
- <pre><span class='fu'>PELMO_path</span>(<span class='no'>psm</span>, <span class='no'>crop</span>, <span class='kw'>scenario</span> <span class='kw'>=</span> <span class='fl'>NA</span>)</pre>
+ <pre class="usage"><span class='fu'>PELMO_path</span>(<span class='no'>psm</span>, <span class='no'>crop</span>, <span class='kw'>scenario</span> <span class='kw'>=</span> <span class='fl'>NA</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>psm</dt>
- <dd>The psm identifier</dd>
- <dt>crop</dt>
- <dd>The PELMO crop acronym</dd>
- <dt>scenario</dt>
- <dd>The scenario</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>psm</th>
+ <td><p>The psm identifier</p></td>
+ </tr>
+ <tr>
+ <th>crop</th>
+ <td><p>The PELMO crop acronym</p></td>
+ </tr>
+ <tr>
+ <th>scenario</th>
+ <td><p>The scenario</p></td>
+ </tr>
+ </table>
</div>
diff --git a/docs/reference/PELMO_runs.html b/docs/reference/PELMO_runs.html
index 4b7f7fb..7fcbba8 100644
--- a/docs/reference/PELMO_runs.html
+++ b/docs/reference/PELMO_runs.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -79,7 +81,7 @@ installed into the package installation directory of <code>PELMO.installeR</code
and run using <code>wine</code>.</p>
- <pre><span class='fu'>PELMO_runs</span>(<span class='no'>runs</span>, <span class='kw'>psm_dir</span> <span class='kw'>=</span> <span class='st'>"."</span>, <span class='kw'>version</span> <span class='kw'>=</span> <span class='st'>"5.5.3"</span>, <span class='kw'>PELMO_base</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <pre class="usage"><span class='fu'>PELMO_runs</span>(<span class='no'>runs</span>, <span class='kw'>psm_dir</span> <span class='kw'>=</span> <span class='st'>"."</span>, <span class='kw'>version</span> <span class='kw'>=</span> <span class='st'>"5.5.3"</span>, <span class='kw'>PELMO_base</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
<span class='kw'>execute</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fu'>getOption</span>(<span class='st'>"mc.cores"</span>, <span class='fl'>2L</span>), <span class='kw'>evaluate</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>overwrite</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
@@ -89,28 +91,45 @@ and run using <code>wine</code>.</p>
<span class='fu'>evaluate_PELMO</span>(<span class='no'>runs</span>, <span class='kw'>version</span> <span class='kw'>=</span> <span class='st'>"5.5.3"</span>, <span class='kw'>PELMO_base</span> <span class='kw'>=</span> <span class='st'>"auto"</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>runs</dt>
- <dd>A list of lists. Each inner lists has an element named &#39;psm&#39;
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>runs</th>
+ <td><p>A list of lists. Each inner lists has an element named 'psm'
that holds the psm string, and elements named using three letter crop acronyms,
as used in <code><a href='FOCUS_PELMO_crops.html'>FOCUS_PELMO_crops</a></code>,
that hold character vectors of three letter scenario acronyms
-as used in <code><a href='FOCUS_GW_scenarios_2012.html'>FOCUS_GW_scenarios_2012</a></code>.</dd>
- <dt>psm_dir</dt>
- <dd>The directory where the psm files are located</dd>
- <dt>version</dt>
- <dd>The FOCUS PELMO version</dd>
- <dt>PELMO_base</dt>
- <dd>Where the FOCUS PELMO installation is located</dd>
- <dt>execute</dt>
- <dd>Should PELMO be executed directly?</dd>
- <dt>cores</dt>
- <dd>The number of cores to execute PELMO runs in parallel</dd>
- <dt>evaluate</dt>
- <dd>Should the results be returned?</dd>
- <dt>overwrite</dt>
- <dd>Should existing run directories be overwritten?</dd>
- </dl>
+as used in <code><a href='FOCUS_GW_scenarios_2012.html'>FOCUS_GW_scenarios_2012</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>psm_dir</th>
+ <td><p>The directory where the psm files are located</p></td>
+ </tr>
+ <tr>
+ <th>version</th>
+ <td><p>The FOCUS PELMO version</p></td>
+ </tr>
+ <tr>
+ <th>PELMO_base</th>
+ <td><p>Where the FOCUS PELMO installation is located</p></td>
+ </tr>
+ <tr>
+ <th>execute</th>
+ <td><p>Should PELMO be executed directly?</p></td>
+ </tr>
+ <tr>
+ <th>cores</th>
+ <td><p>The number of cores to execute PELMO runs in parallel</p></td>
+ </tr>
+ <tr>
+ <th>evaluate</th>
+ <td><p>Should the results be returned?</p></td>
+ </tr>
+ <tr>
+ <th>overwrite</th>
+ <td><p>Should existing run directories be overwritten?</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
@@ -126,65 +145,35 @@ the period.plm file generated by the FOCUS PELMO GUI.</p>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p>PELMO.installeR <a href = 'https://jranke.github.io/PELMO.installeR'>https://jranke.github.io/PELMO.installeR</a></p>
- <p>Wine <a href = 'https://winehq.org'>https://winehq.org</a></p>
- <p>PELMO test results <a href = 'http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/gw/models/pelmo/test-results/test_results_FOCUS_PELMO_5_5_3.doc'>http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/gw/models/pelmo/test-results/test_results_FOCUS_PELMO_5_5_3.doc</a></p>
+<p>Wine <a href = 'https://winehq.org'>https://winehq.org</a></p>
+<p>PELMO test results <a href = 'http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/gw/models/pelmo/test-results/test_results_FOCUS_PELMO_5_5_3.doc'>http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/gw/models/pelmo/test-results/test_results_FOCUS_PELMO_5_5_3.doc</a></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
- <pre class="examples"><div class='input'><span class='co'># Reproduce the official test results for annual application of Pesticide D</span>
-<span class='co'># to winter cereals at the day before emergence</span>
-<span class='no'>runs_1</span> <span class='kw'>&lt;-</span> <span class='fu'>list</span>(
- <span class='fu'>list</span>(<span class='kw'>psm</span> <span class='kw'>=</span> <span class='st'>'Pesticide_D'</span>,
- <span class='kw'>win</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"Cha"</span>, <span class='st'>"Ham"</span>, <span class='st'>"Jok"</span>, <span class='st'>"Kre"</span>, <span class='st'>"Oke"</span>, <span class='st'>"Pia"</span>, <span class='st'>"Por"</span>, <span class='st'>"Sev"</span>, <span class='st'>"Thi"</span>)),
- <span class='fu'>list</span>(<span class='kw'>psm</span> <span class='kw'>=</span> <span class='st'>'Pesticide_D_1_day_pre_em_every_third_year'</span>,
- <span class='kw'>pot</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"Cha"</span>, <span class='st'>"Ham"</span>, <span class='st'>"Jok"</span>, <span class='st'>"Kre"</span>, <span class='st'>"Oke"</span>, <span class='st'>"Pia"</span>, <span class='st'>"Por"</span>, <span class='st'>"Sev"</span>, <span class='st'>"Thi"</span>)))
-<span class='no'>time_1</span> <span class='kw'>&lt;-</span> <span class='fu'>system.time</span>(
- <span class='no'>PECgw_1</span> <span class='kw'>&lt;-</span> <span class='fu'>PELMO_runs</span>(<span class='no'>runs_1</span>, <span class='kw'>psm_dir</span> <span class='kw'>=</span> <span class='fu'>system.file</span>(<span class='st'>"testdata"</span>, <span class='kw'>package</span> <span class='kw'>=</span> <span class='st'>"pfm"</span>),
- <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>6</span>, <span class='kw'>overwrite</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
-)
-<span class='fu'>print</span>(<span class='no'>PECgw_1</span>)</div><div class='output co'>#&gt; $Pesticide_D
-#&gt; $Pesticide_D$win
-#&gt; FOCUS DUMMY D
-#&gt; Cha 0.025
-#&gt; Ham 1.621
-#&gt; Jok 0.388
-#&gt; Kre 0.467
-#&gt; Oke 1.608
-#&gt; Pia 0.848
-#&gt; Por 2.386
-#&gt; Sev 0.009
-#&gt; Thi 0.030
-#&gt;
-#&gt;
-#&gt; $Pesticide_D_1_day_pre_em_every_third_year
-#&gt; $Pesticide_D_1_day_pre_em_every_third_year$pot
-#&gt; FOCUS DUMMY D
-#&gt; Cha 0.010
-#&gt; Ham 0.014
-#&gt; Jok 0.009
-#&gt; Kre 0.027
-#&gt; Oke 0.085
-#&gt; Pia 0.051
-#&gt; Por 0.021
-#&gt; Sev 0.000
-#&gt; Thi 0.001
-#&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; 229.448 0.524 57.021 </div><div class='input'>
-<span class='co'># Demonstrate some results with metabolites.</span>
-<span class='no'>runs_2</span> <span class='kw'>&lt;-</span> <span class='fu'>list</span>(<span class='fu'>list</span>(<span class='kw'>psm</span> <span class='kw'>=</span> <span class='st'>'Pesticide_D_1_May_every_other_year_mets'</span>,
- <span class='kw'>win</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"Cha"</span>, <span class='st'>"Ham"</span>, <span class='st'>"Kre"</span>)))
-<span class='no'>PECgw_2</span> <span class='kw'>&lt;-</span> <span class='fu'>PELMO_runs</span>(<span class='no'>runs_2</span>, <span class='kw'>psm_dir</span> <span class='kw'>=</span> <span class='fu'>system.file</span>(<span class='st'>"testdata"</span>, <span class='kw'>package</span> <span class='kw'>=</span> <span class='st'>"pfm"</span>),
- <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>3</span>, <span class='kw'>overwrite</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
-<span class='fu'>print</span>(<span class='no'>PECgw_2</span>)</div><div class='output co'>#&gt; $Pesticide_D_1_May_every_other_year_mets
-#&gt; $Pesticide_D_1_May_every_other_year_mets$win
-#&gt; FOCUS DUMMY D M1 M2
-#&gt; Cha 0.001 126.195 0.000
-#&gt; Ham 0.054 82.196 0.001
-#&gt; Kre 0.103 75.494 0.001
-#&gt;
-#&gt; </div></pre>
+ <pre class="examples"><div class='input'><span class='co'># At the moment I can not run the examples, as my wine installation is not working</span>
+<span class='fu'>not_run</span>({
+ <span class='co'># Reproduce the official test results for annual application of Pesticide D</span>
+ <span class='co'># to winter cereals at the day before emergence</span>
+ <span class='no'>runs_1</span> <span class='kw'>&lt;-</span> <span class='fu'>list</span>(
+ <span class='fu'>list</span>(<span class='kw'>psm</span> <span class='kw'>=</span> <span class='st'>'Pesticide_D'</span>,
+ <span class='kw'>win</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"Cha"</span>, <span class='st'>"Ham"</span>, <span class='st'>"Jok"</span>, <span class='st'>"Kre"</span>, <span class='st'>"Oke"</span>, <span class='st'>"Pia"</span>, <span class='st'>"Por"</span>, <span class='st'>"Sev"</span>, <span class='st'>"Thi"</span>)),
+ <span class='fu'>list</span>(<span class='kw'>psm</span> <span class='kw'>=</span> <span class='st'>'Pesticide_D_1_day_pre_em_every_third_year'</span>,
+ <span class='kw'>pot</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"Cha"</span>, <span class='st'>"Ham"</span>, <span class='st'>"Jok"</span>, <span class='st'>"Kre"</span>, <span class='st'>"Oke"</span>, <span class='st'>"Pia"</span>, <span class='st'>"Por"</span>, <span class='st'>"Sev"</span>, <span class='st'>"Thi"</span>)))
+ <span class='no'>time_1</span> <span class='kw'>&lt;-</span> <span class='fu'>system.time</span>(
+ <span class='no'>PECgw_1</span> <span class='kw'>&lt;-</span> <span class='fu'>PELMO_runs</span>(<span class='no'>runs_1</span>, <span class='kw'>psm_dir</span> <span class='kw'>=</span> <span class='fu'>system.file</span>(<span class='st'>"testdata"</span>, <span class='kw'>package</span> <span class='kw'>=</span> <span class='st'>"pfm"</span>),
+ <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>6</span>, <span class='kw'>overwrite</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ )
+ <span class='fu'>print</span>(<span class='no'>PECgw_1</span>)
+ <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>)
+
+ <span class='co'># Demonstrate some results with metabolites.</span>
+ <span class='no'>runs_2</span> <span class='kw'>&lt;-</span> <span class='fu'>list</span>(<span class='fu'>list</span>(<span class='kw'>psm</span> <span class='kw'>=</span> <span class='st'>'Pesticide_D_1_May_every_other_year_mets'</span>,
+ <span class='kw'>win</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"Cha"</span>, <span class='st'>"Ham"</span>, <span class='st'>"Kre"</span>)))
+ <span class='no'>PECgw_2</span> <span class='kw'>&lt;-</span> <span class='fu'>PELMO_runs</span>(<span class='no'>runs_2</span>, <span class='kw'>psm_dir</span> <span class='kw'>=</span> <span class='fu'>system.file</span>(<span class='st'>"testdata"</span>, <span class='kw'>package</span> <span class='kw'>=</span> <span class='st'>"pfm"</span>),
+ <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>3</span>, <span class='kw'>overwrite</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='fu'>print</span>(<span class='no'>PECgw_2</span>)
+})</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
diff --git a/docs/reference/SFO_actual_twa.html b/docs/reference/SFO_actual_twa.html
index 4285191..98a2ea3 100644
--- a/docs/reference/SFO_actual_twa.html
+++ b/docs/reference/SFO_actual_twa.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -73,16 +75,21 @@
<p>Actual and maximum moving window time average concentrations for SFO kinetics</p>
- <pre><span class='fu'>SFO_actual_twa</span>(<span class='kw'>DT50</span> <span class='kw'>=</span> <span class='fl'>1000</span>, <span class='kw'>times</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>2</span>, <span class='fl'>4</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>21</span>, <span class='fl'>28</span>, <span class='fl'>42</span>, <span class='fl'>50</span>,
+ <pre class="usage"><span class='fu'>SFO_actual_twa</span>(<span class='kw'>DT50</span> <span class='kw'>=</span> <span class='fl'>1000</span>, <span class='kw'>times</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>2</span>, <span class='fl'>4</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>21</span>, <span class='fl'>28</span>, <span class='fl'>42</span>, <span class='fl'>50</span>,
<span class='fl'>100</span>))</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>DT50</dt>
- <dd>The half-life.</dd>
- <dt>times</dt>
- <dd>The output times, and window sizes for time weighted average concentrations</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>DT50</th>
+ <td><p>The half-life.</p></td>
+ </tr>
+ <tr>
+ <th>times</th>
+ <td><p>The output times, and window sizes for time weighted average concentrations</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
diff --git a/docs/reference/SSLRC_mobility_classification.html b/docs/reference/SSLRC_mobility_classification.html
index f207a7a..b6c6c2d 100644
--- a/docs/reference/SSLRC_mobility_classification.html
+++ b/docs/reference/SSLRC_mobility_classification.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -74,13 +76,16 @@
checked against the spreadsheet published on the CRC website</p>
- <pre><span class='fu'>SSLRC_mobility_classification</span>(<span class='no'>Koc</span>)</pre>
+ <pre class="usage"><span class='fu'>SSLRC_mobility_classification</span>(<span class='no'>Koc</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>Koc</dt>
- <dd>The sorption coefficient normalised to organic carbon in L/kg</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>Koc</th>
+ <td><p>The sorption coefficient normalised to organic carbon in L/kg</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
@@ -90,7 +95,7 @@ checked against the spreadsheet published on the CRC website</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>SSLRC_mobility_classification</span>(<span class='fl'>100</span>)</div><div class='output co'>#&gt; $`Mobility classification`
-#&gt; [1] &quot;Moderately mobile&quot;
+#&gt; [1] "Moderately mobile"
#&gt;
#&gt; $`Percentage drained per mm of drain water`
#&gt; [1] 0.7
diff --git a/docs/reference/TOXSWA_cwa.html b/docs/reference/TOXSWA_cwa.html
index 3f9310a..908f233 100644
--- a/docs/reference/TOXSWA_cwa.html
+++ b/docs/reference/TOXSWA_cwa.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -74,7 +76,7 @@
Usually, an instance of this class will be generated by <code><a href='read.TOXSWA_cwa.html'>read.TOXSWA_cwa</a></code>.</p>
- <pre><span class='no'>TOXSWA_cwa</span></pre>
+ <pre class="usage"><span class='no'>TOXSWA_cwa</span></pre>
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
@@ -82,34 +84,30 @@ Usually, an instance of this class will be generated by <code><a href='read.TOXS
<h2 class="hasAnchor" id="fields"><a class="anchor" href="#fields"></a>Fields</h2>
- <p></p>
- <p><dl class='dl-horizontal'>
-<dt><code>filename</code></dt><dd>Length one character vector.</dd></p>
- <p><dt><code>basedir</code></dt><dd>Length one character vector.</dd></p>
- <p><dt><code>segment</code></dt><dd>Length one integer, specifying for which segment the cwa data were read.</dd></p>
- <p><dt><code>cwas</code></dt><dd>Dataframe holding the concentrations.</dd></p>
- <p><dt><code>events</code></dt><dd>List of dataframes holding the event statistics for each threshold.</dd></p>
- <p><dt><code>windows</code></dt><dd>Matrix of maximum time weighted average concentrations (TWAC_max)
+
+ <dl class='dl-horizontal'>
+<dt><code>filename</code></dt><dd><p>Length one character vector.</p></dd>
+ <dt><code>basedir</code></dt><dd><p>Length one character vector.</p></dd>
+ <dt><code>segment</code></dt><dd><p>Length one integer, specifying for which segment the cwa data were read.</p></dd>
+ <dt><code>cwas</code></dt><dd><p>Dataframe holding the concentrations.</p></dd>
+ <dt><code>events</code></dt><dd><p>List of dataframes holding the event statistics for each threshold.</p></dd>
+ <dt><code>windows</code></dt><dd><p>Matrix of maximum time weighted average concentrations (TWAC_max)
and areas under the curve in µg/day * h (AUC_max_h) or µg/day * d (AUC_max_d)
-for the requested moving window sizes in days.</dd>
-</dl></p>
+for the requested moving window sizes in days.</p></dd>
+</dl>
<h2 class="hasAnchor" id="methods"><a class="anchor" href="#methods"></a>Methods</h2>
- <p></p>
- <p><dl class='dl-horizontal'>
- <dt><code>get_events(threshold, total = FALSE)</code></dt><dd>
- Populate a datataframe with event information for the specified threshold value
+
+ <dl class='dl-horizontal'>
+ <dt><code>get_events(threshold, total = FALSE)</code></dt><dd><p>Populate a datataframe with event information for the specified threshold value
in µg/L. If <code>total = TRUE</code>, the total concentration including the amount
adsorbed to suspended matter will be used. The resulting dataframe is stored in the
- <code>events</code> field of the object.
- </dd>
- <dt><code>moving_windows(windows, total = FALSE)</code></dt><dd>
- Add to the <code>windows</code> field described above.
+ <code>events</code> field of the object.</p></dd>
+ <dt><code>moving_windows(windows, total = FALSE)</code></dt><dd><p>Add to the <code>windows</code> field described above.
Again, if <code>total = TRUE</code>, the total concentration including the amount
- adsorbed to suspended matter will be used.
- </dd>
-</dl></p>
+ adsorbed to suspended matter will be used.</p></dd>
+</dl>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
diff --git a/docs/reference/run_PELMO.html b/docs/reference/chent_focus_sw.html
index 067d3c1..bd3d084 100644
--- a/docs/reference/run_PELMO.html
+++ b/docs/reference/chent_focus_sw.html
@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>Run PELMO — run_PELMO • pfm</title>
+<title>Create a chemical compound object for FOCUS Step 1 calculations — chent_focus_sw • pfm</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -66,31 +68,50 @@
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
- <h1>Run PELMO</h1>
+ <h1>Create a chemical compound object for FOCUS Step 1 calculations</h1>
</div>
- <p>Run PELMO</p>
+ <p>Create a chemical compound object for FOCUS Step 1 calculations</p>
- <pre><span class='fu'>run_PELMO</span>(<span class='no'>runs</span>, <span class='kw'>version</span> <span class='kw'>=</span> <span class='st'>"5.5.3"</span>, <span class='kw'>PELMO_base</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
- <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fu'>getOption</span>(<span class='st'>"mc.cores"</span>, <span class='fl'>2L</span>))</pre>
+ <pre class="usage"><span class='fu'>chent_focus_sw</span>(<span class='no'>Koc</span>, <span class='kw'>DT50_ws</span> <span class='kw'>=</span> <span class='fl'>NA</span>, <span class='kw'>cwsat</span> <span class='kw'>=</span> <span class='fl'>1000</span>, <span class='kw'>mw</span> <span class='kw'>=</span> <span class='fl'>NA</span>, <span class='kw'>max_soil</span> <span class='kw'>=</span> <span class='fl'>1</span>,
+ <span class='kw'>max_ws</span> <span class='kw'>=</span> <span class='fl'>1</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>runs</dt>
- <dd>A list of lists. Each inner lists has an element named &#39;psm&#39;
-that holds the psm string, and elements named using three letter crop acronyms,
-as used in <code><a href='FOCUS_PELMO_crops.html'>FOCUS_PELMO_crops</a></code>,
-that hold character vectors of three letter scenario acronyms
-as used in <code><a href='FOCUS_GW_scenarios_2012.html'>FOCUS_GW_scenarios_2012</a></code>.</dd>
- <dt>version</dt>
- <dd>The FOCUS PELMO version</dd>
- <dt>PELMO_base</dt>
- <dd>Where the FOCUS PELMO installation is located</dd>
- <dt>cores</dt>
- <dd>The number of cores to execute PELMO runs in parallel</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>Koc</th>
+ <td><p>Partition coefficient between organic carbon and water
+in L/kg.</p></td>
+ </tr>
+ <tr>
+ <th>DT50_ws</th>
+ <td><p>Half-life in water/sediment systems in days</p></td>
+ </tr>
+ <tr>
+ <th>cwsat</th>
+ <td><p>Water solubility in mg/L</p></td>
+ </tr>
+ <tr>
+ <th>mw</th>
+ <td><p>Molar weight in g/mol</p></td>
+ </tr>
+ <tr>
+ <th>max_soil</th>
+ <td><p>Maximum observed fraction (dimensionless) in soil</p></td>
+ </tr>
+ <tr>
+ <th>max_ws</th>
+ <td><p>Maximum observed fraction (dimensionless) in water/sediment
+systems</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>A list with the substance specific properties</p>
</div>
@@ -98,7 +119,9 @@ as used in <code><a href='FOCUS_GW_scenarios_2012.html'>FOCUS_GW_scenarios_2012<
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
- </ul>
+
+ <li><a href="#value">Value</a></li>
+ </ul>
</div>
</div>
diff --git a/docs/reference/create_run_list.html b/docs/reference/create_run_list.html
index b2c9798..dfd7ca5 100644
--- a/docs/reference/create_run_list.html
+++ b/docs/reference/create_run_list.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -73,21 +75,28 @@
<p>Create a list of runs that we can traverse</p>
- <pre><span class='fu'>create_run_list</span>(<span class='no'>runs</span>, <span class='kw'>psm_dir</span> <span class='kw'>=</span> <span class='st'>"."</span>, <span class='kw'>check_psm_files</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
+ <pre class="usage"><span class='fu'>create_run_list</span>(<span class='no'>runs</span>, <span class='kw'>psm_dir</span> <span class='kw'>=</span> <span class='st'>"."</span>, <span class='kw'>check_psm_files</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>runs</dt>
- <dd>A list of lists. Each inner lists has an element named &#39;psm&#39;
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>runs</th>
+ <td><p>A list of lists. Each inner lists has an element named 'psm'
that holds the psm string, and elements named using three letter crop acronyms,
as used in <code><a href='FOCUS_PELMO_crops.html'>FOCUS_PELMO_crops</a></code>,
that hold character vectors of three letter scenario acronyms
-as used in <code><a href='FOCUS_GW_scenarios_2012.html'>FOCUS_GW_scenarios_2012</a></code>.</dd>
- <dt>psm_dir</dt>
- <dd>The directory where the psm files are located</dd>
- <dt>check_psm_files</dt>
- <dd>Should we check if the psm file exists</dd>
- </dl>
+as used in <code><a href='FOCUS_GW_scenarios_2012.html'>FOCUS_GW_scenarios_2012</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>psm_dir</th>
+ <td><p>The directory where the psm files are located</p></td>
+ </tr>
+ <tr>
+ <th>check_psm_files</th>
+ <td><p>Should we check if the psm file exists</p></td>
+ </tr>
+ </table>
</div>
diff --git a/docs/reference/drift_data_JKI.html b/docs/reference/drift_data_JKI.html
index 527c1cb..b85dae6 100644
--- a/docs/reference/drift_data_JKI.html
+++ b/docs/reference/drift_data_JKI.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Deposition from spray drift expressed as percent of the applied dose as
- — drift_data_JKI • pfm</title>
+published by the JKI — drift_data_JKI • pfm</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
@@ -26,12 +26,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -68,7 +70,7 @@
<div class="col-md-9 contents">
<div class="page-header">
<h1>Deposition from spray drift expressed as percent of the applied dose as
-</h1>
+published by the JKI</h1>
</div>
@@ -85,7 +87,7 @@ data for field crops (Ackerbau), and Pome/stone fruit, early and late
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
- <p>JKI (2010) Spreadsheet &#39;Tabelle der Abdrifteckwerte.xls&#39;, retrieved
+ <p>JKI (2010) Spreadsheet 'Tabelle der Abdrifteckwerte.xls', retrieved
from
http://www.jki.bund.de/no_cache/de/startseite/institute/anwendungstechnik/abdrift-eckwerte.html
on 2015-06-11</p>
@@ -99,23 +101,23 @@ as its licence is not clear.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'>
-<span class='co'>## Not run: ------------------------------------</span>
-<span class='co'># # This is the code that was used to extract the data</span>
-<span class='co'># library(readxl)</span>
-<span class='co'># abdrift_path &lt;- "inst/extdata/Tabelle der Abdrifteckwerte.xls"</span>
-<span class='co'># JKI_crops &lt;- c("Ackerbau", "Obstbau frueh", "Obstbau spaet")</span>
-<span class='co'># names(JKI_crops) &lt;- c("Field crops", "Pome/stone fruit, early", "Pome/stone fruit, late")</span>
-<span class='co'># drift_data_JKI &lt;- list()</span>
-<span class='co'># </span>
-<span class='co'># for (n in 1:8) {</span>
-<span class='co'># drift_data_raw &lt;- read_excel(abdrift_path, sheet = n + 1, skip = 2)</span>
-<span class='co'># drift_data &lt;- as.matrix(drift_data_raw[1:9, 2:4]) </span>
-<span class='co'># dimnames(drift_data) &lt;- list(distance = as.integer(drift_data_raw[1:9, 1]),</span>
-<span class='co'># crop = JKI_crops)</span>
-<span class='co'># drift_data_JKI[[n]] &lt;- drift_data</span>
-<span class='co'># }</span>
-<span class='co'># save(drift_data_JKI, file = "data/drift_data_JKI.RData")</span>
-<span class='co'>## ---------------------------------------------</span>
+<span class='fu'>not_run</span>({
+ <span class='co'># This is the code that was used to extract the data</span>
+ <span class='fu'>library</span>(<span class='no'>readxl</span>)
+ <span class='no'>abdrift_path</span> <span class='kw'>&lt;-</span> <span class='st'>"inst/extdata/Tabelle der Abdrifteckwerte.xls"</span>
+ <span class='no'>JKI_crops</span> <span class='kw'>&lt;-</span> <span class='fu'>c</span>(<span class='st'>"Ackerbau"</span>, <span class='st'>"Obstbau frueh"</span>, <span class='st'>"Obstbau spaet"</span>)
+ <span class='fu'>names</span>(<span class='no'>JKI_crops</span>) <span class='kw'>&lt;-</span> <span class='fu'>c</span>(<span class='st'>"Field crops"</span>, <span class='st'>"Pome/stone fruit, early"</span>, <span class='st'>"Pome/stone fruit, late"</span>)
+ <span class='no'>drift_data_JKI</span> <span class='kw'>&lt;-</span> <span class='fu'>list</span>()
+
+ <span class='kw'>for</span> (<span class='no'>n</span> <span class='kw'>in</span> <span class='fl'>1</span>:<span class='fl'>8</span>) {
+ <span class='no'>drift_data_raw</span> <span class='kw'>&lt;-</span> <span class='fu'>read_excel</span>(<span class='no'>abdrift_path</span>, <span class='kw'>sheet</span> <span class='kw'>=</span> <span class='no'>n</span> + <span class='fl'>1</span>, <span class='kw'>skip</span> <span class='kw'>=</span> <span class='fl'>2</span>)
+ <span class='no'>drift_data</span> <span class='kw'>&lt;-</span> <span class='fu'>as.matrix</span>(<span class='no'>drift_data_raw</span>[<span class='fl'>1</span>:<span class='fl'>9</span>, <span class='fl'>2</span>:<span class='fl'>4</span>])
+ <span class='fu'>dimnames</span>(<span class='no'>drift_data</span>) <span class='kw'>&lt;-</span> <span class='fu'>list</span>(<span class='kw'>distance</span> <span class='kw'>=</span> <span class='fu'>as.integer</span>(<span class='no'>drift_data_raw</span>[<span class='fl'>1</span>:<span class='fl'>9</span>, <span class='fl'>1</span>]),
+ <span class='kw'>crop</span> <span class='kw'>=</span> <span class='no'>JKI_crops</span>)
+ <span class='no'>drift_data_JKI</span><span class='kw'>[[</span><span class='no'>n</span>]] <span class='kw'>&lt;-</span> <span class='no'>drift_data</span>
+ }
+ <span class='fu'>save</span>(<span class='no'>drift_data_JKI</span>, <span class='kw'>file</span> <span class='kw'>=</span> <span class='st'>"data/drift_data_JKI.RData"</span>)
+})
<span class='co'># And this is the resulting data</span>
<span class='no'>drift_data_JKI</span></div><div class='output co'>#&gt; [[1]]
diff --git a/docs/reference/endpoint.html b/docs/reference/endpoint.html
index 57a7652..1cc4da4 100644
--- a/docs/reference/endpoint.html
+++ b/docs/reference/endpoint.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -76,7 +78,7 @@ chyaml field. Such information is extracted and optionally aggregated by
this function.</p>
- <pre><span class='fu'>endpoint</span>(<span class='no'>chent</span>, <span class='kw'>medium</span> <span class='kw'>=</span> <span class='st'>"soil"</span>, <span class='kw'>type</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"degradation"</span>, <span class='st'>"sorption"</span>),
+ <pre class="usage"><span class='fu'>endpoint</span>(<span class='no'>chent</span>, <span class='kw'>medium</span> <span class='kw'>=</span> <span class='st'>"soil"</span>, <span class='kw'>type</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"degradation"</span>, <span class='st'>"sorption"</span>),
<span class='kw'>lab_field</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>NA</span>, <span class='st'>"laboratory"</span>, <span class='st'>"field"</span>), <span class='kw'>redox</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>NA</span>, <span class='st'>"aerobic"</span>,
<span class='st'>"anaerobic"</span>), <span class='kw'>value</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"DT50ref"</span>, <span class='st'>"Kfoc"</span>, <span class='st'>"N"</span>), <span class='kw'>aggregator</span> <span class='kw'>=</span> <span class='no'>geomean</span>,
<span class='kw'>raw</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>signif</span> <span class='kw'>=</span> <span class='fl'>3</span>)
@@ -95,34 +97,57 @@ this function.</p>
<span class='kw'>raw</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>chent</dt>
- <dd>The chent object to get the information from</dd>
- <dt>medium</dt>
- <dd>The medium for which information is sought</dd>
- <dt>type</dt>
- <dd>The information type</dd>
- <dt>lab_field</dt>
- <dd>If not NA, do we want laboratory or field endpoints</dd>
- <dt>redox</dt>
- <dd>If not NA, are we looking for aerobic or anaerobic data</dd>
- <dt>value</dt>
- <dd>The name of the value we want. The list given in the
-usage section is not exclusive</dd>
- <dt>aggregator</dt>
- <dd>The aggregator function. Can be mean,
-<code><a href='geomean.html'>geomean</a></code>, or identity, for example.</dd>
- <dt>raw</dt>
- <dd>Should the number(s) be returned as stored in the chent
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>chent</th>
+ <td><p>The chent object to get the information from</p></td>
+ </tr>
+ <tr>
+ <th>medium</th>
+ <td><p>The medium for which information is sought</p></td>
+ </tr>
+ <tr>
+ <th>type</th>
+ <td><p>The information type</p></td>
+ </tr>
+ <tr>
+ <th>lab_field</th>
+ <td><p>If not NA, do we want laboratory or field endpoints</p></td>
+ </tr>
+ <tr>
+ <th>redox</th>
+ <td><p>If not NA, are we looking for aerobic or anaerobic data</p></td>
+ </tr>
+ <tr>
+ <th>value</th>
+ <td><p>The name of the value we want. The list given in the
+usage section is not exclusive</p></td>
+ </tr>
+ <tr>
+ <th>aggregator</th>
+ <td><p>The aggregator function. Can be mean,
+<code><a href='geomean.html'>geomean</a></code>, or identity, for example.</p></td>
+ </tr>
+ <tr>
+ <th>raw</th>
+ <td><p>Should the number(s) be returned as stored in the chent
object (could be a character value) to retain original information
-about precision?</dd>
- <dt>signif</dt>
- <dd>How many significant digits do we want</dd>
- <dt>values</dt>
- <dd>The values to be returned</dd>
- <dt>aggregators</dt>
- <dd>A named vector of aggregator functions to be used</dd>
- </dl>
+about precision?</p></td>
+ </tr>
+ <tr>
+ <th>signif</th>
+ <td><p>How many significant digits do we want</p></td>
+ </tr>
+ <tr>
+ <th>values</th>
+ <td><p>The values to be returned</p></td>
+ </tr>
+ <tr>
+ <th>aggregators</th>
+ <td><p>A named vector of aggregator functions to be used</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
diff --git a/docs/reference/evaluate_PELMO.html b/docs/reference/evaluate_PELMO.html
deleted file mode 100644
index 58e7843..0000000
--- a/docs/reference/evaluate_PELMO.html
+++ /dev/null
@@ -1,116 +0,0 @@
-<!-- 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>Evaluate PELMO runs — evaluate_PELMO • 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">
-
-
-<!-- pkgdown -->
-<link href="../pkgdown.css" rel="stylesheet">
-<script src="../jquery.sticky-kit.min.js"></script>
-<script src="../pkgdown.js"></script>
-
-<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/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>
- <a class="navbar-brand" href="../index.html">pfm</a>
- </div>
- <div id="navbar" class="navbar-collapse collapse">
- <ul class="nav navbar-nav">
- <li>
- <a href="../reference/index.html">Reference</a>
-</li>
- </ul>
-
- <ul class="nav navbar-nav navbar-right">
-
- </ul>
- </div><!--/.nav-collapse -->
- </div><!--/.container -->
-</div><!--/.navbar -->
-
-
- </header>
-
- <div class="row">
- <div class="col-md-9 contents">
- <div class="page-header">
- <h1>Evaluate PELMO runs</h1>
- </div>
-
-
- <p>Evaluate PELMO runs</p>
-
-
- <pre><span class='fu'>evaluate_PELMO</span>(<span class='no'>runs</span>, <span class='kw'>version</span> <span class='kw'>=</span> <span class='st'>"5.5.3"</span>, <span class='kw'>PELMO_base</span> <span class='kw'>=</span> <span class='st'>"auto"</span>)</pre>
-
- <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>runs</dt>
- <dd>A list of lists. Each inner lists has an element named &#39;psm&#39;
-that holds the psm string, and elements named using three letter crop acronyms,
-as used in <code><a href='FOCUS_PELMO_crops.html'>FOCUS_PELMO_crops</a></code>,
-that hold character vectors of three letter scenario acronyms
-as used in <code><a href='FOCUS_GW_scenarios_2012.html'>FOCUS_GW_scenarios_2012</a></code>.</dd>
- <dt>version</dt>
- <dd>The FOCUS PELMO version</dd>
- <dt>PELMO_base</dt>
- <dd>Where the FOCUS PELMO installation is located</dd>
- </dl>
-
-
- </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>
- </ul>
-
- </div>
-</div>
-
- <footer>
- <div class="copyright">
- <p>Developed by Johannes Ranke.</p>
-</div>
-
-<div class="pkgdown">
- <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
-</div>
-
- </footer>
- </div>
-
- </body>
-</html>
diff --git a/docs/reference/focus_80th.html b/docs/reference/focus_80th.html
index 8160746..6b0dcc5 100644
--- a/docs/reference/focus_80th.html
+++ b/docs/reference/focus_80th.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -76,15 +78,20 @@ highest value. Previously, the 17th highest values was used (FOCUS 2014, p.
values obtained by PELMO.</p>
- <pre><span class='fu'>focus_80th</span>(<span class='no'>c_period</span>, <span class='kw'>old</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
+ <pre class="usage"><span class='fu'>focus_80th</span>(<span class='no'>c_period</span>, <span class='kw'>old</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>c_period</dt>
- <dd>A numeric vector of values to calculate the percentile from</dd>
- <dt>old</dt>
- <dd>Should the old calculation method be used (the 17th highest value)?</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>c_period</th>
+ <td><p>A numeric vector of values to calculate the percentile from</p></td>
+ </tr>
+ <tr>
+ <th>old</th>
+ <td><p>Should the old calculation method be used (the 17th highest value)?</p></td>
+ </tr>
+ </table>
</div>
diff --git a/docs/reference/geomean.html b/docs/reference/geomean.html
index 4634f99..70fb98d 100644
--- a/docs/reference/geomean.html
+++ b/docs/reference/geomean.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -76,15 +78,20 @@ This function checks for negative values, removes NA values per default and
returns 0 if at least one element of the vector is 0.</p>
- <pre><span class='fu'>geomean</span>(<span class='no'>x</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
+ <pre class="usage"><span class='fu'>geomean</span>(<span class='no'>x</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>x</dt>
- <dd>Vector of numbers</dd>
- <dt>na.rm</dt>
- <dd>Should NA values be omitted?</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>Vector of numbers</p></td>
+ </tr>
+ <tr>
+ <th>na.rm</th>
+ <td><p>Should NA values be omitted?</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
diff --git a/docs/reference/get_flux.html b/docs/reference/get_flux.html
index 64ea25e..8de8b14 100644
--- a/docs/reference/get_flux.html
+++ b/docs/reference/get_flux.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -73,13 +75,23 @@
<p>Get the flux of a chemical out of the FOCUS layer from a CHEM*.PLM file</p>
- <pre><span class='fu'>get_flux</span>(<span class='no'>chem_file</span>)</pre>
-
+ <pre class="usage"><span class='fu'>get_flux</span>(<span class='no'>chem_file</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>chem_file</th>
+ <td><p>The full path to a CHEM*.PLM file</p></td>
+ </tr>
+ </table>
+
</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>
</ul>
</div>
diff --git a/docs/reference/get_interval.html b/docs/reference/get_interval.html
index 13171c1..a716b23 100644
--- a/docs/reference/get_interval.html
+++ b/docs/reference/get_interval.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -73,13 +75,27 @@
<p>Get the application interval in years from a psm file</p>
- <pre><span class='fu'>get_interval</span>(<span class='no'>psm_file</span>, <span class='no'>location_code</span>)</pre>
-
+ <pre class="usage"><span class='fu'>get_interval</span>(<span class='no'>psm_file</span>, <span class='no'>location_code</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>psm_file</th>
+ <td><p>The path to the .psm file</p></td>
+ </tr>
+ <tr>
+ <th>location_code</th>
+ <td><p>The location code</p></td>
+ </tr>
+ </table>
+
</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>
</ul>
</div>
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 33713b6..a6ae657 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -66,113 +68,171 @@
<div class="row">
<div class="col-md-9">
<div class="page-header">
- <h1>Function reference</h1>
- <h4>version&nbsp;0.4-2</h4>
+ <h1>
+ Reference
+ <small>version&nbsp;0.4-3</small>
+ </h1>
</div>
<div class="contents">
- <h2 id="section-general-utility-functions" class="hasAnchor"><a href="#section-general-utility-functions" class="anchor"></a>General utility functions</h2>
- <p class="section-desc"><p>Functions that are independent of specific fate modelling areas</p></p>
-
-
- <p><a href="geomean.html">Calculate the geometric mean</a></p>
- <ul>
- <li><code><a href="geomean.html">geomean</a></code></li>
- </ul>
-
- <p><a href="one_box.html">Create a time series of decline data</a></p>
- <ul>
- <li><code><a href="one_box.html">one_box</a></code></li><li><code><a href="one_box.html">one_box.numeric</a></code></li><li><code><a href="one_box.html">one_box.character</a></code></li><li><code><a href="one_box.html">one_box.mkinfit</a></code></li>
- </ul>
-
- <p><a href="plot.one_box.html">Plot time series of decline data</a></p>
- <ul>
- <li><code><a href="plot.one_box.html">plot.one_box</a></code></li>
- </ul>
-
- <p><a href="sawtooth.html">Create decline time series for multiple applications</a></p>
- <ul>
- <li><code><a href="sawtooth.html">sawtooth</a></code></li>
- </ul>
-
- <p><a href="twa.html">Calculate a time weighted average concentration</a></p>
- <ul>
- <li><code><a href="twa.html">twa</a></code></li><li><code><a href="twa.html">twa.one_box</a></code></li>
- </ul>
-
- <p><a href="max_twa.html">The maximum time weighted average concentration for a moving window</a></p>
- <ul>
- <li><code><a href="max_twa.html">max_twa</a></code></li>
- </ul>
- <h2 id="section-predicted-environmental-concentrations-in-soil" class="hasAnchor"><a href="#section-predicted-environmental-concentrations-in-soil" class="anchor"></a>Predicted environmental concentrations in soil</h2>
- <p class="section-desc"></p>
+ <table class="ref-index">
-
- <p><a href="PEC_soil.html">Calculate predicted environmental concentrations in soil</a></p>
- <ul>
- <li><code><a href="PEC_soil.html">PEC_soil</a></code></li>
- </ul>
-
- <p><a href="soil_scenario_data_EFSA_2015.html">Properties of the predefined scenarios from the EFSA guidance from 2015</a></p>
- <ul>
- <li><code><a href="soil_scenario_data_EFSA_2015.html">soil_scenario_data_EFSA_2015</a></code></li>
- </ul>
- <h2 id="section-predicted-environmental-concentrations-in-groundwater" class="hasAnchor"><a href="#section-predicted-environmental-concentrations-in-groundwater" class="anchor"></a>Predicted environmental concentrations in groundwater</h2>
- <p class="section-desc"></p>
+ <colgroup>
+ <col class="alias" />
+ <col class="title" />
+ </colgroup>
-
- <p><a href="PELMO_runs.html">Set up runs for FOCUS PELMO</a></p>
- <ul>
- <li><code><a href="PELMO_runs.html">PELMO_runs</a></code></li><li><code><a href="PELMO_runs.html">run_PELMO</a></code></li><li><code><a href="PELMO_runs.html">evaluate_PELMO</a></code></li>
- </ul>
- <h2 id="section-predicted-environmental-concentrations-in-surface-water" class="hasAnchor"><a href="#section-predicted-environmental-concentrations-in-surface-water" class="anchor"></a>Predicted environmental concentrations in surface water</h2>
- <p class="section-desc"></p>
-
-
- <p><a href="PEC_sw_drift.html">Calculate predicted environmental concentrations in surface water due to drift</a></p>
- <ul>
- <li><code><a href="PEC_sw_drift.html">PEC_sw_drift</a></code></li>
- </ul>
-
- <p><a href="drift_data_JKI.html">Deposition from spray drift expressed as percent of the applied dose as
-</a></p>
- <ul>
- <li><code><a href="drift_data_JKI.html">drift_data_JKI</a></code></li>
- </ul>
-
- <p><a href="PEC_sw_drainage_UK.html">Calculate initial predicted environmental concentrations in surface water due to drainage using the UK method</a></p>
- <ul>
- <li><code><a href="PEC_sw_drainage_UK.html">PEC_sw_drainage_UK</a></code></li>
- </ul>
-
- <p><a href="TOXSWA_cwa.html">R6 class for holding TOXSWA cwa concentration data and associated statistics</a></p>
- <ul>
- <li><code><a href="TOXSWA_cwa.html">TOXSWA_cwa</a></code></li>
- </ul>
-
- <p><a href="read.TOXSWA_cwa.html">Read TOXSWA surface water concentrations</a></p>
- <ul>
- <li><code><a href="read.TOXSWA_cwa.html">read.TOXSWA_cwa</a></code></li>
- </ul>
-
- <p><a href="plot.TOXSWA_cwa.html">Plot TOXSWA surface water concentrations</a></p>
- <ul>
- <li><code><a href="plot.TOXSWA_cwa.html">plot.TOXSWA_cwa</a></code></li>
- </ul>
- <h2 id="section-classifications-and-indicators" class="hasAnchor"><a href="#section-classifications-and-indicators" class="anchor"></a>Classifications and indicators</h2>
- <p class="section-desc"><p>Evaluating environmental fate properties</p></p>
-
-
- <p><a href="SSLRC_mobility_classification.html">Determine the SSLRC mobility classification for a chemical substance from its Koc</a></p>
- <ul>
- <li><code><a href="SSLRC_mobility_classification.html">SSLRC_mobility_classification</a></code></li>
- </ul>
-
- <p><a href="GUS.html">Groundwater ubiquity score based on Gustafson (1989)</a></p>
- <ul>
- <li><code><a href="GUS.html">GUS</a></code></li><li><code><a href="GUS.html">GUS.numeric</a></code></li><li><code><a href="GUS.html">GUS.chent</a></code></li><li><code><a href="GUS.html">print.GUS_result</a></code></li>
- </ul>
-
+ <tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-general-utility-functions" class="hasAnchor"><a href="#section-general-utility-functions" class="anchor"></a>General utility functions</h2>
+ <p class="section-desc"><p>Functions that are independent of specific fate modelling areas</p></p>
+ </th>
+ </tr>
+ <tr>
+ <!-- -->
+ <td>
+ <p><code><a href="geomean.html">geomean</a></code> </p>
+ </td>
+ <td><p>Calculate the geometric mean</p></td>
+ </tr><tr>
+ <!-- -->
+ <td>
+ <p><code><a href="one_box.html">one_box</a></code> </p>
+ </td>
+ <td><p>Create a time series of decline data</p></td>
+ </tr><tr>
+ <!-- -->
+ <td>
+ <p><code><a href="plot.one_box.html">plot</a></code> </p>
+ </td>
+ <td><p>Plot time series of decline data</p></td>
+ </tr><tr>
+ <!-- -->
+ <td>
+ <p><code><a href="sawtooth.html">sawtooth</a></code> </p>
+ </td>
+ <td><p>Create decline time series for multiple applications</p></td>
+ </tr><tr>
+ <!-- -->
+ <td>
+ <p><code><a href="twa.html">twa</a></code> </p>
+ </td>
+ <td><p>Calculate a time weighted average concentration</p></td>
+ </tr><tr>
+ <!-- -->
+ <td>
+ <p><code><a href="max_twa.html">max_twa</a></code> </p>
+ </td>
+ <td><p>The maximum time weighted average concentration for a moving window</p></td>
+ </tr>
+ </tbody><tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-predicted-environmental-concentrations-in-soil" class="hasAnchor"><a href="#section-predicted-environmental-concentrations-in-soil" class="anchor"></a>Predicted environmental concentrations in soil</h2>
+ <p class="section-desc"></p>
+ </th>
+ </tr>
+ <tr>
+ <!-- -->
+ <td>
+ <p><code><a href="PEC_soil.html">PEC_soil</a></code> </p>
+ </td>
+ <td><p>Calculate predicted environmental concentrations in soil</p></td>
+ </tr><tr>
+ <!-- -->
+ <td>
+ <p><code><a href="soil_scenario_data_EFSA_2015.html">soil_scenario_data_EFSA_2015</a></code> </p>
+ </td>
+ <td><p>Properties of the predefined scenarios from the EFSA guidance from 2015</p></td>
+ </tr>
+ </tbody><tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-predicted-environmental-concentrations-in-groundwater" class="hasAnchor"><a href="#section-predicted-environmental-concentrations-in-groundwater" class="anchor"></a>Predicted environmental concentrations in groundwater</h2>
+ <p class="section-desc"></p>
+ </th>
+ </tr>
+ <tr>
+ <!-- -->
+ <td>
+ <p><code><a href="PELMO_runs.html">PELMO_runs</a></code> <code><a href="PELMO_runs.html">run_PELMO</a></code> <code><a href="PELMO_runs.html">evaluate_PELMO</a></code> </p>
+ </td>
+ <td><p>Set up runs for FOCUS PELMO</p></td>
+ </tr>
+ </tbody><tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-predicted-environmental-concentrations-in-surface-water" class="hasAnchor"><a href="#section-predicted-environmental-concentrations-in-surface-water" class="anchor"></a>Predicted environmental concentrations in surface water</h2>
+ <p class="section-desc"></p>
+ </th>
+ </tr>
+ <tr>
+ <!-- -->
+ <td>
+ <p><code><a href="PEC_sw_drift.html">PEC_sw_drift</a></code> </p>
+ </td>
+ <td><p>Calculate predicted environmental concentrations in surface water due to drift</p></td>
+ </tr><tr>
+ <!-- -->
+ <td>
+ <p><code><a href="drift_data_JKI.html">drift_data_JKI</a></code> </p>
+ </td>
+ <td><p>Deposition from spray drift expressed as percent of the applied dose as
+published by the JKI</p></td>
+ </tr><tr>
+ <!-- -->
+ <td>
+ <p><code><a href="PEC_sw_drainage_UK.html">PEC_sw_drainage_UK</a></code> </p>
+ </td>
+ <td><p>Calculate initial predicted environmental concentrations in surface water due to drainage using the UK method</p></td>
+ </tr><tr>
+ <!-- -->
+ <td>
+ <p><code><a href="PEC_sw_focus.html">PEC_sw_focus</a></code> </p>
+ </td>
+ <td><p>Calculate FOCUS Step 1 PEC surface water</p></td>
+ </tr><tr>
+ <!-- -->
+ <td>
+ <p><code><a href="TOXSWA_cwa.html">TOXSWA_cwa</a></code> </p>
+ </td>
+ <td><p>R6 class for holding TOXSWA cwa concentration data and associated statistics</p></td>
+ </tr><tr>
+ <!-- -->
+ <td>
+ <p><code><a href="read.TOXSWA_cwa.html">read.TOXSWA_cwa</a></code> </p>
+ </td>
+ <td><p>Read TOXSWA surface water concentrations</p></td>
+ </tr><tr>
+ <!-- -->
+ <td>
+ <p><code><a href="plot.TOXSWA_cwa.html">plot</a></code> </p>
+ </td>
+ <td><p>Plot TOXSWA surface water concentrations</p></td>
+ </tr>
+ </tbody><tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-classifications-and-indicators" class="hasAnchor"><a href="#section-classifications-and-indicators" class="anchor"></a>Classifications and indicators</h2>
+ <p class="section-desc"><p>Evaluating environmental fate properties</p></p>
+ </th>
+ </tr>
+ <tr>
+ <!-- -->
+ <td>
+ <p><code><a href="SSLRC_mobility_classification.html">SSLRC_mobility_classification</a></code> </p>
+ </td>
+ <td><p>Determine the SSLRC mobility classification for a chemical substance from its Koc</p></td>
+ </tr><tr>
+ <!-- -->
+ <td>
+ <p><code><a href="GUS.html">GUS</a></code> <code><a href="GUS.html">print</a></code> </p>
+ </td>
+ <td><p>Groundwater ubiquity score based on Gustafson (1989)</p></td>
+ </tr>
+ </tbody>
+ </table>
</div>
</div>
diff --git a/docs/reference/max_twa.html b/docs/reference/max_twa.html
index f78da58..431bbd7 100644
--- a/docs/reference/max_twa.html
+++ b/docs/reference/max_twa.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -77,15 +79,20 @@ for finding the maximum. It is therefore recommended to check this using
<code>max_twa</code>.</p>
- <pre><span class='fu'>max_twa</span>(<span class='no'>x</span>, <span class='kw'>window</span> <span class='kw'>=</span> <span class='fl'>21</span>)</pre>
+ <pre class="usage"><span class='fu'>max_twa</span>(<span class='no'>x</span>, <span class='kw'>window</span> <span class='kw'>=</span> <span class='fl'>21</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>x</dt>
- <dd>An object of type <code><a href='one_box.html'>one_box</a></code></dd>
- <dt>window</dt>
- <dd>The size of the moving window</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>An object of type <code><a href='one_box.html'>one_box</a></code></p></td>
+ </tr>
+ <tr>
+ <th>window</th>
+ <td><p>The size of the moving window</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
diff --git a/docs/reference/one_box-12.png b/docs/reference/one_box-12.png
deleted file mode 100644
index 31e2f4b..0000000
--- a/docs/reference/one_box-12.png
+++ /dev/null
Binary files differ
diff --git a/docs/reference/one_box-6.png b/docs/reference/one_box-6.png
deleted file mode 100644
index 10ebb35..0000000
--- a/docs/reference/one_box-6.png
+++ /dev/null
Binary files differ
diff --git a/docs/reference/one_box.html b/docs/reference/one_box.html
index 800ca66..931e722 100644
--- a/docs/reference/one_box.html
+++ b/docs/reference/one_box.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -73,7 +75,7 @@
<p>Create a time series of decline data</p>
- <pre><span class='fu'>one_box</span>(<span class='no'>x</span>, <span class='no'>ini</span>, <span class='no'>...</span>, <span class='kw'>t_end</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>res</span> <span class='kw'>=</span> <span class='fl'>0.01</span>)
+ <pre class="usage"><span class='fu'>one_box</span>(<span class='no'>x</span>, <span class='no'>ini</span>, <span class='no'>...</span>, <span class='kw'>t_end</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>res</span> <span class='kw'>=</span> <span class='fl'>0.01</span>)
<span class='co'># S3 method for numeric</span>
<span class='fu'>one_box</span>(<span class='no'>x</span>, <span class='kw'>ini</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='no'>...</span>, <span class='kw'>t_end</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>res</span> <span class='kw'>=</span> <span class='fl'>0.01</span>)
@@ -86,28 +88,41 @@
<span class='fu'>one_box</span>(<span class='no'>x</span>, <span class='kw'>ini</span> <span class='kw'>=</span> <span class='st'>"model"</span>, <span class='no'>...</span>, <span class='kw'>t_end</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>res</span> <span class='kw'>=</span> <span class='fl'>0.01</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>x</dt>
- <dd>When numeric, this is the half-life to be used for an exponential
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>When numeric, this is the half-life to be used for an exponential
decline. When a character string specifying a parent decline model is given
e.g. <code>FOMC</code>, <code>parms</code> must contain the corresponding paramters.
If x is an <code>mkinfit</code> object, the decline is calculated from this
-object.</dd>
- <dt>ini</dt>
- <dd>The initial amount. If x is an <code>mkinfit</code> object, and
-ini is &#39;model&#39;, the fitted initial concentrations are used. Otherwise, ini
+object.</p></td>
+ </tr>
+ <tr>
+ <th>ini</th>
+ <td><p>The initial amount. If x is an <code>mkinfit</code> object, and
+ini is 'model', the fitted initial concentrations are used. Otherwise, ini
must be numeric. If it has length one, it is used for the parent and
initial values of metabolites are zero, otherwise, it must give values for
-all observed variables.</dd>
- <dt>...</dt>
- <dd>Further arguments passed to methods</dd>
- <dt>t_end</dt>
- <dd>End of the time series</dd>
- <dt>res</dt>
- <dd>Resolution of the time series</dd>
- <dt>parms</dt>
- <dd>A named numeric vector containing the model parameters</dd>
- </dl>
+all observed variables.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Further arguments passed to methods</p></td>
+ </tr>
+ <tr>
+ <th>t_end</th>
+ <td><p>End of the time series</p></td>
+ </tr>
+ <tr>
+ <th>res</th>
+ <td><p>Resolution of the time series</p></td>
+ </tr>
+ <tr>
+ <th>parms</th>
+ <td><p>A named numeric vector containing the model parameters</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
diff --git a/docs/reference/pfm_degradation.html b/docs/reference/pfm_degradation.html
index d98778b..9198f6b 100644
--- a/docs/reference/pfm_degradation.html
+++ b/docs/reference/pfm_degradation.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -73,27 +75,40 @@
<p>Calculate a time course of relative concentrations based on an mkinmod model</p>
- <pre><span class='fu'>pfm_degradation</span>(<span class='kw'>model</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>DT50</span> <span class='kw'>=</span> <span class='fl'>1000</span>, <span class='kw'>parms</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='kw'>k_parent_sink</span> <span class='kw'>=</span>
+ <pre class="usage"><span class='fu'>pfm_degradation</span>(<span class='kw'>model</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>DT50</span> <span class='kw'>=</span> <span class='fl'>1000</span>, <span class='kw'>parms</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='kw'>k_parent_sink</span> <span class='kw'>=</span>
<span class='fu'>log</span>(<span class='fl'>2</span>)/<span class='no'>DT50</span>), <span class='kw'>years</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>step_days</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>times</span> <span class='kw'>=</span> <span class='fu'>seq</span>(<span class='fl'>0</span>, <span class='no'>years</span> * <span class='fl'>365</span>, <span class='kw'>by</span> <span class='kw'>=</span>
<span class='no'>step_days</span>))</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>model</dt>
- <dd>The degradation model to be used. Either a parent only model like
-&#39;SFO&#39; or &#39;FOMC&#39;, or an mkinmod object</dd>
- <dt>DT50</dt>
- <dd>The half-life. This is only used when simple exponential decline
-is calculated (SFO model).</dd>
- <dt>parms</dt>
- <dd>The parameters used for the degradation model</dd>
- <dt>years</dt>
- <dd>For how many years should the degradation be predicted?</dd>
- <dt>step_days</dt>
- <dd>What step size in days should the output have?</dd>
- <dt>times</dt>
- <dd>The output times</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>model</th>
+ <td><p>The degradation model to be used. Either a parent only model like
+'SFO' or 'FOMC', or an mkinmod object</p></td>
+ </tr>
+ <tr>
+ <th>DT50</th>
+ <td><p>The half-life. This is only used when simple exponential decline
+is calculated (SFO model).</p></td>
+ </tr>
+ <tr>
+ <th>parms</th>
+ <td><p>The parameters used for the degradation model</p></td>
+ </tr>
+ <tr>
+ <th>years</th>
+ <td><p>For how many years should the degradation be predicted?</p></td>
+ </tr>
+ <tr>
+ <th>step_days</th>
+ <td><p>What step size in days should the output have?</p></td>
+ </tr>
+ <tr>
+ <th>times</th>
+ <td><p>The output times</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
diff --git a/docs/reference/plot.TOXSWA_cwa.html b/docs/reference/plot.TOXSWA_cwa.html
index 7cbe238..5375673 100644
--- a/docs/reference/plot.TOXSWA_cwa.html
+++ b/docs/reference/plot.TOXSWA_cwa.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -74,30 +76,45 @@
segment of a TOXSWA surface water body.</p>
- <pre><span class='co'># S3 method for TOXSWA_cwa</span>
+ <pre class="usage"><span class='co'># S3 method for TOXSWA_cwa</span>
<span class='fu'>plot</span>(<span class='no'>x</span>, <span class='kw'>time_column</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"datetime"</span>, <span class='st'>"t"</span>, <span class='st'>"t_firstjan"</span>,
<span class='st'>"t_rel_to_max"</span>), <span class='kw'>xlab</span> <span class='kw'>=</span> <span class='st'>"default"</span>, <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='st'>"default"</span>, <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>total</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>LC_TIME</span> <span class='kw'>=</span> <span class='st'>"C"</span>, <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>x</dt>
- <dd>The TOXSWA_cwa object to be plotted.</dd>
- <dt>time_column</dt>
- <dd>What should be used for the time axis. If &quot;t_firstjan&quot; is chosen,
-the time is given in days relative to the first of January in the first year.</dd>
- <dt>xlab, ylab</dt>
- <dd>Labels for x and y axis.</dd>
- <dt>add</dt>
- <dd>Should we add to an existing plot?</dd>
- <dt>total</dt>
- <dd>Should the total concentration in water be plotted, including substance sorbed
-to suspended matter?</dd>
- <dt>LC_TIME</dt>
- <dd>Specification of the locale used to format dates</dd>
- <dt>...</dt>
- <dd>Further arguments passed to <code>plot</code> if we are not adding to an existing plot</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>The TOXSWA_cwa object to be plotted.</p></td>
+ </tr>
+ <tr>
+ <th>time_column</th>
+ <td><p>What should be used for the time axis. If "t_firstjan" is chosen,
+the time is given in days relative to the first of January in the first year.</p></td>
+ </tr>
+ <tr>
+ <th>xlab, ylab</th>
+ <td><p>Labels for x and y axis.</p></td>
+ </tr>
+ <tr>
+ <th>add</th>
+ <td><p>Should we add to an existing plot?</p></td>
+ </tr>
+ <tr>
+ <th>total</th>
+ <td><p>Should the total concentration in water be plotted, including substance sorbed
+to suspended matter?</p></td>
+ </tr>
+ <tr>
+ <th>LC_TIME</th>
+ <td><p>Specification of the locale used to format dates</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Further arguments passed to <code>plot</code> if we are not adding to an existing plot</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
diff --git a/docs/reference/plot.one_box.html b/docs/reference/plot.one_box.html
index 4c3cb82..0a876e3 100644
--- a/docs/reference/plot.one_box.html
+++ b/docs/reference/plot.one_box.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -73,32 +75,49 @@
<p>Plot time series of decline data</p>
- <pre><span class='co'># S3 method for one_box</span>
+ <pre class="usage"><span class='co'># S3 method for one_box</span>
<span class='fu'>plot</span>(<span class='no'>x</span>, <span class='kw'>xlim</span> <span class='kw'>=</span> <span class='fu'>range</span>(<span class='fu'>time</span>(<span class='no'>x</span>)), <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>0</span>, <span class='fu'>max</span>(<span class='no'>x</span>)),
<span class='kw'>xlab</span> <span class='kw'>=</span> <span class='st'>"Time"</span>, <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='st'>"Residue"</span>, <span class='kw'>max_twa</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>max_twa_var</span> <span class='kw'>=</span> <span class='fu'>dimnames</span>(<span class='no'>x</span>)<span class='kw'>[[</span><span class='fl'>2</span>]][<span class='fl'>1</span>], <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>x</dt>
- <dd>The object of type <code><a href='one_box.html'>one_box</a></code> to be plotted</dd>
- <dt>xlim</dt>
- <dd>Limits for the x axis</dd>
- <dt>ylim</dt>
- <dd>Limits for the y axis</dd>
- <dt>xlab</dt>
- <dd>Label for the x axis</dd>
- <dt>ylab</dt>
- <dd>Label for the y axis</dd>
- <dt>max_twa</dt>
- <dd>If a numeric value is given, the maximum time weighted
-average concentration(s) is/are shown in the graph.</dd>
- <dt>max_twa_var</dt>
- <dd>Variable for which the maximum time weighted average should
-be shown if max_twa is not NULL.</dd>
- <dt>...</dt>
- <dd>Further arguments passed to methods</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>The object of type <code><a href='one_box.html'>one_box</a></code> to be plotted</p></td>
+ </tr>
+ <tr>
+ <th>xlim</th>
+ <td><p>Limits for the x axis</p></td>
+ </tr>
+ <tr>
+ <th>ylim</th>
+ <td><p>Limits for the y axis</p></td>
+ </tr>
+ <tr>
+ <th>xlab</th>
+ <td><p>Label for the x axis</p></td>
+ </tr>
+ <tr>
+ <th>ylab</th>
+ <td><p>Label for the y axis</p></td>
+ </tr>
+ <tr>
+ <th>max_twa</th>
+ <td><p>If a numeric value is given, the maximum time weighted
+average concentration(s) is/are shown in the graph.</p></td>
+ </tr>
+ <tr>
+ <th>max_twa_var</th>
+ <td><p>Variable for which the maximum time weighted average should
+be shown if max_twa is not NULL.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Further arguments passed to methods</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
diff --git a/docs/reference/read.TOXSWA_cwa.html b/docs/reference/read.TOXSWA_cwa.html
index 3afec9c..30e29cd 100644
--- a/docs/reference/read.TOXSWA_cwa.html
+++ b/docs/reference/read.TOXSWA_cwa.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -77,37 +79,54 @@ segment are imported. As TOXSWA 4 reports the values at the end of the hour
of the hourly averages (ConLiqWatLay).</p>
- <pre><span class='fu'>read.TOXSWA_cwa</span>(<span class='no'>filename</span>, <span class='kw'>basedir</span> <span class='kw'>=</span> <span class='st'>"."</span>, <span class='kw'>zipfile</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>segment</span> <span class='kw'>=</span> <span class='st'>"last"</span>,
+ <pre class="usage"><span class='fu'>read.TOXSWA_cwa</span>(<span class='no'>filename</span>, <span class='kw'>basedir</span> <span class='kw'>=</span> <span class='st'>"."</span>, <span class='kw'>zipfile</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>segment</span> <span class='kw'>=</span> <span class='st'>"last"</span>,
<span class='kw'>substance</span> <span class='kw'>=</span> <span class='st'>"parent"</span>, <span class='kw'>total</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>windows</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>thresholds</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>filename</dt>
- <dd>The filename of the cwa file (TOXSWA 2.x.y or similar) or the
-out file (FOCUS TOXSWA 4, i.e. TOXSWA 4.4.2 or similar).</dd>
- <dt>basedir</dt>
- <dd>The path to the directory where the cwa file resides.</dd>
- <dt>zipfile</dt>
- <dd>Optional path to a zip file containing the cwa file.</dd>
- <dt>segment</dt>
- <dd>The segment for which the data should be read. Either &quot;last&quot;, or
-the segment number.</dd>
- <dt>substance</dt>
- <dd>For TOXSWA 4 .out files, the default value &quot;parent&quot; leads
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>filename</th>
+ <td><p>The filename of the cwa file (TOXSWA 2.x.y or similar) or the
+out file (FOCUS TOXSWA 4, i.e. TOXSWA 4.4.2 or similar).</p></td>
+ </tr>
+ <tr>
+ <th>basedir</th>
+ <td><p>The path to the directory where the cwa file resides.</p></td>
+ </tr>
+ <tr>
+ <th>zipfile</th>
+ <td><p>Optional path to a zip file containing the cwa file.</p></td>
+ </tr>
+ <tr>
+ <th>segment</th>
+ <td><p>The segment for which the data should be read. Either "last", or
+the segment number.</p></td>
+ </tr>
+ <tr>
+ <th>substance</th>
+ <td><p>For TOXSWA 4 .out files, the default value "parent" leads
to reading concentrations of the parent compound. Alternatively, the substance
-of interested can be selected by its code name.</dd>
- <dt>total</dt>
- <dd>Set this to TRUE in order to read total concentrations as well. This is
+of interested can be selected by its code name.</p></td>
+ </tr>
+ <tr>
+ <th>total</th>
+ <td><p>Set this to TRUE in order to read total concentrations as well. This is
only necessary for .out files as generated by TOXSWA 4.4.2 or similar, not for .cwa
-files. For .cwa files, the total concentration is always read as well.</dd>
- <dt>windows</dt>
- <dd>Numeric vector of width of moving windows in days, for calculating
-maximum time weighted average concentrations and areas under the curve.</dd>
- <dt>thresholds</dt>
- <dd>Numeric vector of threshold concentrations in µg/L for
-generating event statistics.</dd>
- </dl>
+files. For .cwa files, the total concentration is always read as well.</p></td>
+ </tr>
+ <tr>
+ <th>windows</th>
+ <td><p>Numeric vector of width of moving windows in days, for calculating
+maximum time weighted average concentrations and areas under the curve.</p></td>
+ </tr>
+ <tr>
+ <th>thresholds</th>
+ <td><p>Numeric vector of threshold concentrations in µg/L for
+generating event statistics.</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
diff --git a/docs/reference/sawtooth-8.png b/docs/reference/sawtooth-8.png
deleted file mode 100644
index 161ecb4..0000000
--- a/docs/reference/sawtooth-8.png
+++ /dev/null
Binary files differ
diff --git a/docs/reference/sawtooth.html b/docs/reference/sawtooth.html
index be43745..0d5c9a9 100644
--- a/docs/reference/sawtooth.html
+++ b/docs/reference/sawtooth.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -75,22 +77,31 @@ application pattern specified in <code>applications</code> is repeated <code>n</
times, with an interval <code>i</code>.</p>
- <pre><span class='fu'>sawtooth</span>(<span class='no'>x</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>i</span> <span class='kw'>=</span> <span class='fl'>365</span>, <span class='kw'>applications</span> <span class='kw'>=</span> <span class='fu'>data.frame</span>(<span class='kw'>time</span> <span class='kw'>=</span> <span class='fu'>seq</span>(<span class='fl'>0</span>, <span class='fl'>0</span> + <span class='no'>n</span>
+ <pre class="usage"><span class='fu'>sawtooth</span>(<span class='no'>x</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>i</span> <span class='kw'>=</span> <span class='fl'>365</span>, <span class='kw'>applications</span> <span class='kw'>=</span> <span class='fu'>data.frame</span>(<span class='kw'>time</span> <span class='kw'>=</span> <span class='fu'>seq</span>(<span class='fl'>0</span>, <span class='fl'>0</span> + <span class='no'>n</span>
* <span class='no'>i</span>, <span class='kw'>length.out</span> <span class='kw'>=</span> <span class='no'>n</span>), <span class='kw'>amount</span> <span class='kw'>=</span> <span class='fl'>1</span>))</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>x</dt>
- <dd>A <code><a href='one_box.html'>one_box</a></code> object</dd>
- <dt>n</dt>
- <dd>The number of applications. If <code>applications</code> is specified, <code>n</code> is ignored</dd>
- <dt>i</dt>
- <dd>The interval between applications. If <code>applications</code> is specified, <code>i</code>
-is ignored</dd>
- <dt>applications</dt>
- <dd>A data frame holding the application times in the first column and
-the corresponding amounts applied in the second column.</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>A <code><a href='one_box.html'>one_box</a></code> object</p></td>
+ </tr>
+ <tr>
+ <th>n</th>
+ <td><p>The number of applications. If <code>applications</code> is specified, <code>n</code> is ignored</p></td>
+ </tr>
+ <tr>
+ <th>i</th>
+ <td><p>The interval between applications. If <code>applications</code> is specified, <code>i</code>
+is ignored</p></td>
+ </tr>
+ <tr>
+ <th>applications</th>
+ <td><p>A data frame holding the application times in the first column and
+the corresponding amounts applied in the second column.</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
diff --git a/docs/reference/soil_scenario_data_EFSA_2015.html b/docs/reference/soil_scenario_data_EFSA_2015.html
index f842d08..39841ed 100644
--- a/docs/reference/soil_scenario_data_EFSA_2015.html
+++ b/docs/reference/soil_scenario_data_EFSA_2015.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -92,24 +94,24 @@ doi:10.2903/j.efsa.2015.4093</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
- <pre class="examples"><div class='input'><span class='co'>## Not run: ------------------------------------</span>
-<span class='co'># # This is the code that was used to define the data</span>
-<span class='co'># soil_scenario_data_EFSA_2015 &lt;- data.frame(</span>
-<span class='co'># Zone = rep(c("North", "Central", "South"), 2),</span>
-<span class='co'># Country = c("Estonia", "Germany", "France", "Denmark", "Czech Republik", "Spain"),</span>
-<span class='co'># T_arit = c(4.7, 8.0, 11.0, 8.2, 9.1, 12.8),</span>
-<span class='co'># T_arr = c(7.0, 10.1, 12.3, 9.8, 11.2, 14.7),</span>
-<span class='co'># Texture = c("Coarse", "Coarse", "Medium fine", "Medium", "Medium", "Medium"),</span>
-<span class='co'># f_om = c(0.118, 0.086, 0.048, 0.023, 0.018, 0.011),</span>
-<span class='co'># theta_fc = c(0.244, 0.244, 0.385, 0.347, 0.347, 0.347),</span>
-<span class='co'># rho = c(0.95, 1.05, 1.22, 1.39, 1.43, 1.51),</span>
-<span class='co'># f_sce = c(3, 2, 2, 2, 1.5, 1.5),</span>
-<span class='co'># f_mod = c(2, 2, 2, 4, 4, 4),</span>
-<span class='co'># stringsAsFactors = FALSE,</span>
-<span class='co'># row.names = c("CTN", "CTC", "CTS", "CLN", "CLC", "CLS")</span>
-<span class='co'># )</span>
-<span class='co'># save(soil_scenario_data_EFSA_2015, file = '../data/soil_scenario_data_EFSA_2015.RData')</span>
-<span class='co'>## ---------------------------------------------</span>
+ <pre class="examples"><div class='input'><span class='fu'>not_run</span>({
+ <span class='co'># This is the code that was used to define the data</span>
+ <span class='no'>soil_scenario_data_EFSA_2015</span> <span class='kw'>&lt;-</span> <span class='fu'>data.frame</span>(
+ <span class='kw'>Zone</span> <span class='kw'>=</span> <span class='fu'>rep</span>(<span class='fu'>c</span>(<span class='st'>"North"</span>, <span class='st'>"Central"</span>, <span class='st'>"South"</span>), <span class='fl'>2</span>),
+ <span class='kw'>Country</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"Estonia"</span>, <span class='st'>"Germany"</span>, <span class='st'>"France"</span>, <span class='st'>"Denmark"</span>, <span class='st'>"Czech Republik"</span>, <span class='st'>"Spain"</span>),
+ <span class='kw'>T_arit</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>4.7</span>, <span class='fl'>8.0</span>, <span class='fl'>11.0</span>, <span class='fl'>8.2</span>, <span class='fl'>9.1</span>, <span class='fl'>12.8</span>),
+ <span class='kw'>T_arr</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>7.0</span>, <span class='fl'>10.1</span>, <span class='fl'>12.3</span>, <span class='fl'>9.8</span>, <span class='fl'>11.2</span>, <span class='fl'>14.7</span>),
+ <span class='kw'>Texture</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"Coarse"</span>, <span class='st'>"Coarse"</span>, <span class='st'>"Medium fine"</span>, <span class='st'>"Medium"</span>, <span class='st'>"Medium"</span>, <span class='st'>"Medium"</span>),
+ <span class='kw'>f_om</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>0.118</span>, <span class='fl'>0.086</span>, <span class='fl'>0.048</span>, <span class='fl'>0.023</span>, <span class='fl'>0.018</span>, <span class='fl'>0.011</span>),
+ <span class='kw'>theta_fc</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>0.244</span>, <span class='fl'>0.244</span>, <span class='fl'>0.385</span>, <span class='fl'>0.347</span>, <span class='fl'>0.347</span>, <span class='fl'>0.347</span>),
+ <span class='kw'>rho</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>0.95</span>, <span class='fl'>1.05</span>, <span class='fl'>1.22</span>, <span class='fl'>1.39</span>, <span class='fl'>1.43</span>, <span class='fl'>1.51</span>),
+ <span class='kw'>f_sce</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>3</span>, <span class='fl'>2</span>, <span class='fl'>2</span>, <span class='fl'>2</span>, <span class='fl'>1.5</span>, <span class='fl'>1.5</span>),
+ <span class='kw'>f_mod</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>2</span>, <span class='fl'>2</span>, <span class='fl'>2</span>, <span class='fl'>4</span>, <span class='fl'>4</span>, <span class='fl'>4</span>),
+ <span class='kw'>stringsAsFactors</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>row.names</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"CTN"</span>, <span class='st'>"CTC"</span>, <span class='st'>"CTS"</span>, <span class='st'>"CLN"</span>, <span class='st'>"CLC"</span>, <span class='st'>"CLS"</span>)
+ )
+ <span class='fu'>save</span>(<span class='no'>soil_scenario_data_EFSA_2015</span>, <span class='kw'>file</span> <span class='kw'>=</span> <span class='st'>'../data/soil_scenario_data_EFSA_2015.RData'</span>)
+})
<span class='co'># And this is the resulting dataframe</span>
<span class='no'>soil_scenario_data_EFSA_2015</span></div><div class='output co'>#&gt; Zone Country T_arit T_arr Texture f_om theta_fc rho f_sce
diff --git a/docs/reference/sum_periods.html b/docs/reference/sum_periods.html
index 66466ac..147a698 100644
--- a/docs/reference/sum_periods.html
+++ b/docs/reference/sum_periods.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -73,13 +75,27 @@
<p>Sum up values according to FOCUS periods</p>
- <pre><span class='fu'>sum_periods</span>(<span class='no'>annual</span>, <span class='no'>interval</span>)</pre>
-
+ <pre class="usage"><span class='fu'>sum_periods</span>(<span class='no'>annual</span>, <span class='no'>interval</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>annual</th>
+ <td><p>The annual flux as obtained by <code>get_flux</code></p></td>
+ </tr>
+ <tr>
+ <th>interval</th>
+ <td><p>The interval in years</p></td>
+ </tr>
+ </table>
+
</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>
</ul>
</div>
diff --git a/docs/reference/twa.html b/docs/reference/twa.html
index 414b372..32fa459 100644
--- a/docs/reference/twa.html
+++ b/docs/reference/twa.html
@@ -25,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -75,18 +77,23 @@ the earliest possible time for the maximum in the time series returned
is after one window has passed.</p>
- <pre><span class='fu'>twa</span>(<span class='no'>x</span>, <span class='kw'>window</span> <span class='kw'>=</span> <span class='fl'>21</span>)
+ <pre class="usage"><span class='fu'>twa</span>(<span class='no'>x</span>, <span class='kw'>window</span> <span class='kw'>=</span> <span class='fl'>21</span>)
<span class='co'># S3 method for one_box</span>
<span class='fu'>twa</span>(<span class='no'>x</span>, <span class='kw'>window</span> <span class='kw'>=</span> <span class='fl'>21</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>x</dt>
- <dd>An object of type <code><a href='one_box.html'>one_box</a></code></dd>
- <dt>window</dt>
- <dd>The size of the moving window</dd>
- </dl>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>An object of type <code><a href='one_box.html'>one_box</a></code></p></td>
+ </tr>
+ <tr>
+ <th>window</th>
+ <td><p>The size of the moving window</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
diff --git a/inst/extdata/FOCUS_Step_12_scenarios.txt b/inst/extdata/FOCUS_Step_12_scenarios.txt
new file mode 100755
index 0000000..a022166
--- /dev/null
+++ b/inst/extdata/FOCUS_Step_12_scenarios.txt
@@ -0,0 +1,48 @@
+Ver 02 FOCUS step 1 & 2 scenario data file
+water depth (cm): 30
+sediment depth(cm): 5
+effective sediment depth (cm): 1
+sediment oc (%): 5
+sediment bulk density (kg/L): 0.8
+ratio of field to water body: 10
+Spray drift Number of crops: 29 Number of variations: 9 Number of Interception classes: 4
+Crop Distance crop-water 1 2 3 4 5 6 7 8 >8 no interception minimal crop cover average crop cover full canopy
+cereals, spring 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0 0.2 0.7
+cereals, winter 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0 0.2 0.7
+citrus 3 15.725 12.129 11.011 10.124 9.743 9.204 9.102 8.656 8.656 0 0.8 0.8 0.8
+cotton 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.3 0.6 0.75
+field beans 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.25 0.4 0.7
+grass / alfalfa 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.4 0.6 0.75
+hops 3 19.326 17.723 15.928 15.378 15.114 14.902 14.628 13.52 13.52 0 0.2 0.5 0.7
+legumes 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.25 0.5 0.7
+maize 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.25 0.5 0.75
+oil seed rape, spring 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.4 0.7 0.75
+oil seed rape, winter 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.4 0.7 0.75
+olives 3 15.725 12.129 11.011 10.124 9.743 9.204 9.102 8.656 8.656 0 0.7 0.7 0.7
+pome / stone fruit, early applns 3 29.197 25.531 23.96 23.603 23.116 22.76 22.69 22.241 22.241 0 0.2 0.4 0.65
+pome / stone fruit, late applns 3 15.725 12.129 11.011 10.124 9.743 9.204 9.102 8.656 8.656 0 0.2 0.4 0.65
+potatoes 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.15 0.5 0.7
+soybeans 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.2 0.5 0.75
+sugar beets 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.2 0.7 0.75
+sunflowers 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.2 0.5 0.75
+tobacco 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.2 0.7 0.75
+vegetables, bulb 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.1 0.25 0.4
+vegetables, fruiting 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.25 0.5 0.7
+vegetables, leafy 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.25 0.4 0.7
+vegetables, root 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.25 0.5 0.7
+vines, early applns 3 2.699 2.496 2.546 2.499 2.398 2.336 2.283 2.265 2.265 0 0.4 0.5 0.6
+vines, late applns 3 8.028 7.119 6.898 6.631 6.636 6.431 6.227 6.173 6.173 0 0.4 0.5 0.6
+appln, aerial 3 33.2 33.2 33.2 33.2 33.2 33.2 33.2 33.2 33.2 0 0.2 0.5 0.7
+appln, hand (crop < 50 cm) 1 2.759 2.438 2.024 1.862 1.794 1.631 1.578 1.512 1.512 0 0.2 0.5 0.7
+appln, hand (crop > 50 cm) 3 8.028 7.119 6.898 6.631 6.636 6.431 6.227 6.173 6.173 0 0.2 0.5 0.7
+no drift (incorp or seed trtmt) 1 0 0 0 0 0 0 0 0 0 0 0 0 0
+Runoff/Drainage Numbers for step 1 1 Numbers for step 2 7
+Step 1 10
+North Europe, Oct. - Feb. 5
+North Europe, Mar. - May 2
+North Europe, June - Sep. 2
+South Europe, Oct. - Feb. 4
+South Europe, Mar. - May 4
+South Europe, June - Sep. 3
+No Runoff/Drainage 0
+Equilibrium Factor 1.5
diff --git a/man/FOCUS_GW_scenarios_2012.Rd b/man/FOCUS_GW_scenarios_2012.Rd
index a19bbe5..4529816 100644
--- a/man/FOCUS_GW_scenarios_2012.Rd
+++ b/man/FOCUS_GW_scenarios_2012.Rd
@@ -3,7 +3,7 @@
\docType{data}
\name{FOCUS_GW_scenarios_2012}
\alias{FOCUS_GW_scenarios_2012}
-\title{A very small subset of the FOCUS Groundwater scenario defitions}
+\title{A very small subset of the FOCUS Groundwater scenario definitions}
\format{An object of class \code{list} of length 2.}
\usage{
FOCUS_GW_scenarios_2012
diff --git a/man/FOCUS_Step_12_scenarios.Rd b/man/FOCUS_Step_12_scenarios.Rd
new file mode 100644
index 0000000..f58dea7
--- /dev/null
+++ b/man/FOCUS_Step_12_scenarios.Rd
@@ -0,0 +1,40 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/FOCUS_Step_12_scenarios.R
+\docType{data}
+\name{FOCUS_Step_12_scenarios}
+\alias{FOCUS_Step_12_scenarios}
+\title{Step 1/2 scenario data as distributed with the FOCUS Step 1/2 calculator}
+\format{A list containing the scenario names in a character vector called 'names',
+ the drift percentiles in a matrix called 'drift', interception percentages in
+ a matrix called 'interception' and the runoff/drainage percentages for Step 2
+ calculations in a matrix called 'rd'.}
+\description{
+The data were extracted from the scenario.txt file using the R code shown below.
+The text file is not included in the package as its licence is not clear.
+}
+\examples{
+
+\dontrun{
+ # This is the code that was used to extract the data
+ scenario_path <- "inst/extdata/FOCUS_Step_12_scenarios.txt"
+ scenarios <- readLines(scenario_path)[9:38]
+ FOCUS_Step_12_scenarios <- list()
+ sce <- read.table(text = scenarios, sep = "\\t", header = TRUE, check.names = FALSE,
+ stringsAsFactors = FALSE)
+ FOCUS_Step_12_scenarios$names = sce$Crop
+ rownames(sce) <- sce$Crop
+ FOCUS_Step_12_scenarios$drift = sce[, 3:11]
+ FOCUS_Step_12_scenarios$interception = sce[, 12:15]
+ sce_2 <- readLines(scenario_path)[41:46]
+ rd <- read.table(text = sce_2, sep = "\\t")[1:2]
+ rd_mat <- matrix(rd$V2, nrow = 3, byrow = FALSE)
+ dimnames(rd_mat) = list(Time = c("Oct-Feb", "Mar-May", "Jun-Sep"),
+ Region = c("North", "South"))
+ FOCUS_Step_12_scenarios$rd = rd_mat
+ save(FOCUS_Step_12_scenarios, file = "data/FOCUS_Step_12_scenarios.RData")
+}
+
+# And this is the resulting data
+FOCUS_Step_12_scenarios
+}
+\keyword{datasets}
diff --git a/man/PEC_sw_focus.Rd b/man/PEC_sw_focus.Rd
index 0f444ca..22c20c5 100644
--- a/man/PEC_sw_focus.Rd
+++ b/man/PEC_sw_focus.Rd
@@ -4,9 +4,8 @@
\alias{PEC_sw_focus}
\title{Calculate FOCUS Step 1 PEC surface water}
\usage{
-PEC_sw_focus(parent, rate, n = 1, i = NA, applications = data.frame(time =
- seq(0, 0 + n * i, length.out = n), amount = rate), met = NULL, step = 1,
- f_drift = 0.02759, f_rd = 0.1)
+PEC_sw_focus(parent, rate, n = 1, i = NA, met = NULL, f_drift = NA,
+ f_rd = 0.1, scenario = FOCUS_Step_12_scenarios$names)
}
\arguments{
\item{parent}{A list containing substance specific parameters}
@@ -18,19 +17,51 @@ applications are given explicitly}
\item{i}{The application interval}
-\item{applications}{A dataframe containing times and amounts of each application}
+\item{met}{A list containing metabolite specific parameters. If not NULL,
+the PEC is calculated for this compound, not the parent.}
-\item{step}{At the moment, only Step 1 is implemented}
+\item{f_drift}{The fraction of the application rate reaching the waterbody
+via drift. If NA, this is derived from the scenario name and the number
+of applications via the drift data defined by the
+\code{\link{FOCUS_Step_12_scenarios}}}
+
+\item{f_rd}{The fraction of the amount applied reaching the waterbody via
+runoff/drainage. At Step 1, it is assumed to be 10%, be it the
+parent or a metabolite}
+
+\item{scenario}{The name of the scenario. Must be one of the scenario
+names given in \code{\link{FOCUS_Step_12_scenarios}}}
}
\description{
-This is an attempt to reimplement the FOCUS Step 1 and 2 calculator authored
-by Michael Klein. The Step 1 and 2 scenario assumes an area ratio of 10:1
-between field and waterbody, and a water depth of 30 cm.
-I did not (yet) implement the TWA formulas for times later than day 1, as I
-did not understand them right away.
-Also, Step 2 is not implemented (yet).
+This is reimplementation of Step 1 of the FOCUS Step 1 and 2 calculator
+version 3.2, authored by Michael Klein. Note that results for multiple
+applications should be compared to the corresponding results for a
+single application. At current, this is not done automatically in
+this implementation.
+}
+\note{
+The formulas for input to the waterbody via runoff/drainage of the
+ parent and subsequent formation of the metabolite in water is not
+ documented in the model description coming with the calculator
+
+Step 2 is not implemented
}
\examples{
+# Parent only
dummy_1 <- chent_focus_sw(cwsat = 6000, DT50_ws = 6, Koc = 344.8)
PEC_sw_focus(dummy_1, 3000, f_drift = 0)
+
+# Metabolite
+new_dummy <- chent_focus_sw(mw = 250, Koc = 100)
+M1 <- chent_focus_sw(mw = 100, cwsat = 100, DT50_ws = 100, Koc = 50, max_ws = 0, max_soil = 0.5)
+PEC_sw_focus(new_dummy, 1000, scenario = "cereals, winter", met = M1)
+}
+\references{
+FOCUS (2014) Generic guidance for Surface Water Scenarios (version 1.4).
+ FOrum for the Co-ordination of pesticde fate models and their USe.
+ http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/sw/docs/Generic%20FOCUS_SWS_vc1.4.pdf
+
+Website of the Steps 1 and 2 calculator at the Joint Research
+ Center of the European Union:
+ http://esdac.jrc.ec.europa.eu/projects/stepsonetwo
}
diff --git a/man/PELMO_runs.Rd b/man/PELMO_runs.Rd
index aa02a89..a0d0df8 100644
--- a/man/PELMO_runs.Rd
+++ b/man/PELMO_runs.Rd
@@ -44,7 +44,7 @@ If evaluate is TRUE, a list of lists of matrices holding the
Per default, the runs are not only set up but also executed with FOCUS
PELMO, the results are processed and returned. Currently, only FOCUS PELMO
as installed on Linux (or other Unix systems)
-using the \code{\link{install_PELMO}} from the \code{PELMO.installeR} package
+using the \code{install_PELMO} from the \code{PELMO.installeR} package
maintained on github is supported. In such installations, FOCUS PELMO is
installed into the package installation directory of \code{PELMO.installeR}
and run using \code{wine}.
@@ -55,6 +55,8 @@ run directory, holding the results for all FOCUS periods, equivalent to
the period.plm file generated by the FOCUS PELMO GUI.
}
\examples{
+# At the moment I can not run the examples, as my wine installation is not working
+\dontrun{
# Reproduce the official test results for annual application of Pesticide D
# to winter cereals at the day before emergence
runs_1 <- list(
@@ -77,6 +79,7 @@ PECgw_2 <- PELMO_runs(runs_2, psm_dir = system.file("testdata", package = "pfm")
cores = 3, overwrite = TRUE)
print(PECgw_2)
}
+}
\references{
PELMO.installeR \url{https://jranke.github.io/PELMO.installeR}
diff --git a/man/chent_focus_sw.Rd b/man/chent_focus_sw.Rd
index 26742d0..945c343 100644
--- a/man/chent_focus_sw.Rd
+++ b/man/chent_focus_sw.Rd
@@ -2,9 +2,10 @@
% Please edit documentation in R/PEC_sw_focus.R
\name{chent_focus_sw}
\alias{chent_focus_sw}
-\title{Create an chemical compound object for FOCUS Step 1 and 2 calculations}
+\title{Create a chemical compound object for FOCUS Step 1 calculations}
\usage{
-chent_focus_sw(Koc, DT50_ws, cwsat = 1000)
+chent_focus_sw(Koc, DT50_ws = NA, cwsat = 1000, mw = NA, max_soil = 1,
+ max_ws = 1)
}
\arguments{
\item{Koc}{Partition coefficient between organic carbon and water
@@ -13,10 +14,17 @@ in L/kg.}
\item{DT50_ws}{Half-life in water/sediment systems in days}
\item{cwsat}{Water solubility in mg/L}
+
+\item{mw}{Molar weight in g/mol}
+
+\item{max_soil}{Maximum observed fraction (dimensionless) in soil}
+
+\item{max_ws}{Maximum observed fraction (dimensionless) in water/sediment
+systems}
}
\value{
A list with the substance specific properties
}
\description{
-Create an chemical compound object for FOCUS Step 1 and 2 calculations
+Create a chemical compound object for FOCUS Step 1 calculations
}
diff --git a/man/get_flux.Rd b/man/get_flux.Rd
index 93778cb..c56b891 100644
--- a/man/get_flux.Rd
+++ b/man/get_flux.Rd
@@ -6,6 +6,9 @@
\usage{
get_flux(chem_file)
}
+\arguments{
+\item{chem_file}{The full path to a CHEM*.PLM file}
+}
\description{
Get the flux of a chemical out of the FOCUS layer from a CHEM*.PLM file
}
diff --git a/man/get_interval.Rd b/man/get_interval.Rd
index a751996..519cf36 100644
--- a/man/get_interval.Rd
+++ b/man/get_interval.Rd
@@ -6,6 +6,11 @@
\usage{
get_interval(psm_file, location_code)
}
+\arguments{
+\item{psm_file}{The path to the .psm file}
+
+\item{location_code}{The location code}
+}
\description{
Get the application interval in years from a psm file
}
diff --git a/man/sum_periods.Rd b/man/sum_periods.Rd
index 5051af4..21bd2c9 100644
--- a/man/sum_periods.Rd
+++ b/man/sum_periods.Rd
@@ -6,6 +6,11 @@
\usage{
sum_periods(annual, interval)
}
+\arguments{
+\item{annual}{The annual flux as obtained by \code{get_flux}}
+
+\item{interval}{The interval in years}
+}
\description{
Sum up values according to FOCUS periods
}
diff --git a/tests/testthat/test_PELMO.R b/tests/testthat/test_PELMO.R
index 9bebc95..e6d3a0f 100644
--- a/tests/testthat/test_PELMO.R
+++ b/tests/testthat/test_PELMO.R
@@ -20,6 +20,7 @@ runs <- list(
win = names(FOCUS_GW_scenarios_2012$names)))
test_that("PELMO paths are correctly created", {
+ skip("A wine installation is needed for this test")
psm_paths = c(
PELMO_path(runs[[1]]$psm, "fbe", "Por"),
PELMO_path(runs[[2]]$psm, "pot", "Ham"),
@@ -34,6 +35,7 @@ test_that("PELMO paths are correctly created", {
})
test_that("PELMO runs are correctly set up", {
+ skip("A wine installation is needed for this test")
# Prepare runs in analogy to the test archive
PELMO_runs(runs, psm_dir = PELMO_base, execute = FALSE, evaluate = FALSE, overwrite = TRUE)
@@ -57,6 +59,7 @@ test_that("PELMO runs are correctly set up", {
})
test_that("PELMO runs can be run and give the expected result files", {
+ skip("A wine installation is needed for this test")
run_PELMO(runs, cores = 7)
plm_files <- c("CHEM.PLM", "ECHO.PLM",
@@ -85,9 +88,10 @@ test_that("PELMO runs can be run and give the expected result files", {
}
})
-pfm_PECgw <- evaluate_PELMO(runs)
+# pfm_PECgw <- evaluate_PELMO(runs)
test_that("PELMO runs are correctly evaluated", {
+ skip("A wine installation is needed for this test")
# Check that if output is the same as in the test archive
for (run in runs) {
@@ -145,6 +149,7 @@ test_that("PELMO runs are correctly evaluated", {
})
test_that("PECgw from FOCUS summary files can be reproduced", {
+ skip("A wine installation is needed for this test")
focus_summary <- list()
for (run in runs) {
diff --git a/tests/testthat/test_step_1.R b/tests/testthat/test_step_1.R
index abef72c..b067e8f 100644
--- a/tests/testthat/test_step_1.R
+++ b/tests/testthat/test_step_1.R
@@ -1,11 +1,12 @@
context("FOCUS Step 1 calculations")
+t_out <- c(0, 1, 2, 4) # Checking the first four days should be sufficient for Step 1
+
test_that("Results of Steps 1/2 calculator for Dummy 1 are reproduced", {
dummy_1 <- chent_focus_sw(cwsat = 6000, DT50_ws = 6, Koc = 344.8)
res_dummy_1 <- PEC_sw_focus(dummy_1, 3000, f_drift = 0)
- t_out <- c(0, 1, 2, 4) # Checking the first four days should be sufficient for Step 1
- PEC_orig = matrix(NA, nrow = length(t_out), ncol = 4,
+ PEC_orig_1 = matrix(NA, nrow = length(t_out), ncol = 4,
dimnames = list(Time = t_out, type = c("PECsw", "TWAECsw", "PECsed", "TWAECsed")))
PEC_orig_1[, "PECsw"] = c(685.06, 610.32, 543.73, 431.56)
@@ -21,7 +22,6 @@ test_that("Results of Steps 1/2 calculator for Dummy 2 are reproduced", {
dummy_2 <- chent_focus_sw(cwsat = 30, DT50_ws = 26, Koc = 110)
res_dummy_2 <- PEC_sw_focus(dummy_2, 1000)
- t_out <- c(0, 1, 2, 4) # Checking the first four days should be sufficient for Step 1
PEC_orig_2 = matrix(NA, nrow = length(t_out), ncol = 4,
dimnames = list(Time = t_out, type = c("PECsw", "TWAECsw", "PECsed", "TWAECsed")))
@@ -31,22 +31,89 @@ test_that("Results of Steps 1/2 calculator for Dummy 2 are reproduced", {
PEC_orig_2["1", "TWAECsed"] = 319.86 # Later TWAEC not implemented
expect_equal(res_dummy_2$PEC[1:4, c(1, 2)], PEC_orig_2[, c(1, 2)], tolerance = 0.01, scale = 1)
- expect_equal(res_dummy_2$PEC[1:4, c(3, 4)], PEC_orig_2[, c(3, 4)], tolerance = 10, scale = 1)
+ expect_equal(res_dummy_2$PEC[1:4, c(3, 4)], PEC_orig_2[, c(3, 4)], tolerance = 0.01, scale = 1)
})
-test_that("Results of Steps 1/2 calculator for Dummy 2 are reproduced", {
- dummy_2 <- chent_focus_sw(cwsat = 30, DT50_ws = 26, Koc = 110)
- res_dummy_2 <- PEC_sw_focus(dummy_2, 1000)
+test_that("Results of Steps 1/2 calculator for Dummy 4 are reproduced", {
+ dummy_4 <- chent_focus_sw(cwsat = 2e-3, DT50_ws = 4, Koc = 970)
+ res_dummy_4 <- PEC_sw_focus(dummy_4, 7.5, n = 3, i = 14,
+ scenario = "pome / stone fruit, early")
- t_out <- c(0, 1, 2, 4) # Checking the first four days should be sufficient for Step 1
- PEC_orig_2 = matrix(NA, nrow = length(t_out), ncol = 4,
+ PEC_orig_4 = matrix(NA, nrow = length(t_out), ncol = 4,
dimnames = list(Time = t_out, type = c("PECsw", "TWAECsw", "PECsed", "TWAECsed")))
- PEC_orig_2[, "PECsw"] = c(299.89, 290.86, 283.21, 268.50)
- PEC_orig_2["1", "TWAECsw"] = 295.38 # Later TWAEC not implemented
- PEC_orig_2[, "PECsed"] = c(319.77, 319.95, 311.53, 295.35)
- PEC_orig_2["1", "TWAECsed"] = 319.86 # Later TWAEC not implemented
+ PEC_orig_4[, "PECsw"] = c(1.82, 1.18, 1.00, 0.70)
+ PEC_orig_4["1", "TWAECsw"] = 1.50 # Later TWAEC not implemented
+ PEC_orig_4[, "PECsed"] = c(10.57, 11.49, 9.66, 6.83)
+ PEC_orig_4["1", "TWAECsed"] = 11.03 # Later TWAEC not implemented
- expect_equal(res_dummy_2$PEC[1:4, c(1, 2)], PEC_orig_2[, c(1, 2)], tolerance = 0.01, scale = 1)
- expect_equal(res_dummy_2$PEC[1:4, c(3, 4)], PEC_orig_2[, c(3, 4)], tolerance = 10, scale = 1)
+ expect_equal(res_dummy_4$PEC[1:4, c(1, 2)], PEC_orig_4[, c(1, 2)], tolerance = 0.01, scale = 1)
+ expect_equal(res_dummy_4$PEC[1:4, c(3, 4)], PEC_orig_4[, c(3, 4)], tolerance = 0.01, scale = 1)
+})
+
+test_that("Results of Steps 1/2 calculator for Dummy 5 are reproduced", {
+ dummy_5 <- chent_focus_sw(cwsat = 1.15, DT50_ws = 118, Koc = 860)
+ res_dummy_5 <- PEC_sw_focus(dummy_5, 75, n = 5, i = 14,
+ scenario = "vines, early")
+
+ PEC_orig_5 = matrix(NA, nrow = length(t_out), ncol = 4,
+ dimnames = list(Time = t_out, type = c("PECsw", "TWAECsw", "PECsed", "TWAECsed")))
+
+ PEC_orig_5[, "PECsw"] = c(61.60, 59.45, 59.10, 58.41)
+ PEC_orig_5["1", "TWAECsw"] = 60.53 # Later TWAEC not implemented
+ PEC_orig_5[, "PECsed"] = c(500.78, 511.28, 508.29, 502.35)
+ PEC_orig_5["1", "TWAECsed"] = 506.03 # Later TWAEC not implemented
+
+ expect_equal(res_dummy_5$PEC[1:4, c(1, 2)], PEC_orig_5[, c(1, 2)], tolerance = 0.01, scale = 1)
+ expect_equal(res_dummy_5$PEC[1:4, c(3, 4)], PEC_orig_5[, c(3, 4)], tolerance = 0.01, scale = 1)
+})
+
+test_that("Results of Steps 1/2 calculator for Dummy 7 are reproduced", {
+ dummy_7 <- chent_focus_sw(cwsat = 2.60, DT50_ws = 28, Koc = 500)
+ res_dummy_7 <- PEC_sw_focus(dummy_7, 750, n = 4, i = 14,
+ scenario = "vines, early")
+
+ PEC_orig_7 = matrix(NA, nrow = length(t_out), ncol = 4,
+ dimnames = list(Time = t_out, type = c("PECsw", "TWAECsw", "PECsed", "TWAECsed")))
+
+ PEC_orig_7[, "PECsw"] = c(626.99, 601.13, 586.43, 558.10)
+ PEC_orig_7["1", "TWAECsw"] = 614.06 # Later TWAEC not implemented
+ PEC_orig_7[, "PECsed"] = c(3.0, 3.01, 2.93, 2.79) * 1e3
+ PEC_orig_7["1", "TWAECsed"] = 3.01e3 # Later TWAEC not implemented
+
+ expect_equal(res_dummy_7$PEC[1:4, c(1, 2)], PEC_orig_7[, c(1, 2)], tolerance = 0.01, scale = 1)
+ expect_equal(res_dummy_7$PEC[1:4, c(3, 4)], PEC_orig_7[, c(3, 4)], tolerance = 10, scale = 1)
+})
+
+test_that("Results of Steps 1/2 calculator for New Dummy (M1-M3) are reproduced", {
+ new_dummy <- chent_focus_sw(mw = 250, Koc = 100)
+ M1 <- chent_focus_sw(mw = 100, cwsat = 100, DT50_ws = 100, Koc = 50, max_ws = 0, max_soil = 0.5)
+ res_M1 <- PEC_sw_focus(new_dummy, 1000, scenario = "cereals, winter",
+ met = M1)
+
+ PEC_orig_M1 = matrix(NA, nrow = length(t_out), ncol = 4,
+ dimnames = list(Time = t_out, type = c("PECsw", "TWAECsw", "PECsed", "TWAECsed")))
+
+ PEC_orig_M1[, "PECsw"] = c(62.5, 62.07, 61.64, 60.79)
+ PEC_orig_M1["1", "TWAECsw"] = 62.28 # Later TWAEC not implemented
+ PEC_orig_M1[, "PECsed"] = c(31.25, 31.03, 30.82, 30.40)
+ PEC_orig_M1["1", "TWAECsed"] = 31.14 # Later TWAEC not implemented
+
+ expect_equal(res_M1$PEC[1:4, c(1, 2)], PEC_orig_M1[, c(1, 2)], tolerance = 0.01, scale = 1)
+ expect_equal(res_M1$PEC[1:4, c(3, 4)], PEC_orig_M1[, c(3, 4)], tolerance = 0.01, scale = 1)
+
+ M2 <- chent_focus_sw(mw = 100, cwsat = 100, DT50_ws = 100, Koc = 50, max_ws = 0.5, max_soil = 0)
+ res_M2 <- PEC_sw_focus(new_dummy, 1000, scenario = "cereals, winter",
+ met = M2)
+
+ PEC_orig_M2 = matrix(NA, nrow = length(t_out), ncol = 4,
+ dimnames = list(Time = t_out, type = c("PECsw", "TWAECsw", "PECsed", "TWAECsed")))
+
+ PEC_orig_M2[, "PECsw"] = c(64.34, 63.78, 63.34, 62.47)
+ PEC_orig_M2["1", "TWAECsw"] = 64.06 # Later TWAEC not implemented
+ PEC_orig_M2[, "PECsed"] = c(31.25, 31.89, 31.67, 31.23)
+ PEC_orig_M2["1", "TWAECsed"] = 31.57 # Later TWAEC not implemented
+
+ expect_equal(res_M2$PEC[1:4, c(1, 2)], PEC_orig_M2[, c(1, 2)], tolerance = 0.01, scale = 1)
+ expect_equal(res_M2$PEC[1:4, c(3, 4)], PEC_orig_M2[, c(3, 4)], tolerance = 0.01, scale = 1)
})

Contact - Imprint