diff options
Diffstat (limited to 'docs/reference')
104 files changed, 4616 insertions, 730 deletions
diff --git a/docs/reference/EFSA_GW_interception_2014.html b/docs/reference/EFSA_GW_interception_2014.html index cf97c02..4c20985 100644 --- a/docs/reference/EFSA_GW_interception_2014.html +++ b/docs/reference/EFSA_GW_interception_2014.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Subset of EFSA crop interception default values for groundwater modelling — EFSA_GW_interception_2014 • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Subset of EFSA crop interception default values for groundwater modelling — EFSA_GW_interception_2014"><meta name="description" content="Subset of EFSA crop interception default values for groundwater modelling"><meta property="og:description" content="Subset of EFSA crop interception default values for groundwater modelling"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Subset of EFSA crop interception default values for groundwater modelling — EFSA_GW_interception_2014 • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Subset of EFSA crop interception default values for groundwater modelling — EFSA_GW_interception_2014"><meta name="description" content="Subset of EFSA crop interception default values for groundwater modelling"><meta property="og:description" content="Subset of EFSA crop interception default values for groundwater modelling"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -7,7 +13,7 @@ <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -78,7 +84,7 @@ products of these active substances in soil. <em>EFSA Journal</em> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/EFSA_GW_interception_2014.md b/docs/reference/EFSA_GW_interception_2014.md new file mode 100644 index 0000000..cca84b2 --- /dev/null +++ b/docs/reference/EFSA_GW_interception_2014.md @@ -0,0 +1,38 @@ +# Subset of EFSA crop interception default values for groundwater modelling + +Subset of EFSA crop interception default values for groundwater +modelling + +## Usage + +``` r +EFSA_GW_interception_2014 +``` + +## Format + +A matrix containing interception values, currently only for some +selected crops + +## Source + +European Food Safety Authority (2014) EFSA Guidance Document for +evaluating laboratory and field dissipation studies to obtain DegT50 +values of active substances of plant protection products and +transformation products of these active substances in soil. *EFSA +Journal* **12**(5):3662, 37 pp., doi:10.2903/j.efsa.2014.3662 + +## Examples + +``` r +EFSA_GW_interception_2014 +#> BBCH +#> Crop 0x 1x 2x 3x 4x 5x 6x 7x 8x 9x +#> Beans (field + vegetable) 0 0.25 0.40 0.40 0.70 0.70 0.70 0.70 0.70 0.80 +#> Peas 0 0.35 0.55 0.55 0.85 0.85 0.85 0.85 0.85 0.85 +#> Summer oilseed rape 0 0.40 0.80 0.80 0.80 0.80 0.80 0.80 0.80 0.90 +#> Winter oilseed rape 0 0.40 0.80 0.80 0.80 0.80 0.80 0.80 0.80 0.90 +#> Tomatoes 0 0.50 0.70 0.70 0.80 0.80 0.80 0.80 0.80 0.50 +#> Spring cereals 0 0.00 0.20 0.80 0.90 0.90 0.90 0.80 0.80 0.80 +#> Winter cereals 0 0.00 0.20 0.80 0.90 0.90 0.90 0.80 0.80 0.80 +``` diff --git a/docs/reference/EFSA_washoff_2017.html b/docs/reference/EFSA_washoff_2017.html index a6b51d9..b1b047b 100644 --- a/docs/reference/EFSA_washoff_2017.html +++ b/docs/reference/EFSA_washoff_2017.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Subset of EFSA crop washoff default values — EFSA_washoff_2017 • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Subset of EFSA crop washoff default values — EFSA_washoff_2017"><meta name="description" content="Subset of EFSA crop washoff default values"><meta property="og:description" content="Subset of EFSA crop washoff default values"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Subset of EFSA crop washoff default values — EFSA_washoff_2017 • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Subset of EFSA crop washoff default values — EFSA_washoff_2017"><meta name="description" content="Subset of EFSA crop washoff default values"><meta property="og:description" content="Subset of EFSA crop washoff default values"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -7,7 +13,7 @@ <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -78,7 +84,7 @@ doi:10.2903/j.efsa.2017.4982</p> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/EFSA_washoff_2017.md b/docs/reference/EFSA_washoff_2017.md new file mode 100644 index 0000000..4dd90c5 --- /dev/null +++ b/docs/reference/EFSA_washoff_2017.md @@ -0,0 +1,37 @@ +# Subset of EFSA crop washoff default values + +Subset of EFSA crop washoff default values + +## Usage + +``` r +EFSA_washoff_2017 +``` + +## Format + +A matrix containing wash-off factors, currently only for some selected +crops + +## Source + +European Food Safety Authority (2017) EFSA guidance document for +predicting environmental concentrations of active substances of plant +protection products and transformation products of these active +substances in soil. *EFSA Journal* **15**(10) 4982 +doi:10.2903/j.efsa.2017.4982 + +## Examples + +``` r +EFSA_washoff_2017 +#> BBCH +#> Crop 0x 1x 2x 3x 4x 5x 6x 7x 8x 9x +#> Beans (field + vegetable) NA 0.60 0.75 0.75 0.80 0.80 0.80 0.80 0.80 0.35 +#> Peas NA 0.40 0.60 0.60 0.65 0.65 0.65 0.65 0.65 0.35 +#> Summer oilseed rape NA 0.40 0.50 0.50 0.60 0.60 0.60 0.60 0.60 0.50 +#> Winter oilseed rape NA 0.10 0.40 0.40 0.55 0.55 0.55 0.55 0.55 0.30 +#> Tomatoes NA 0.55 0.75 0.75 0.70 0.70 0.70 0.70 0.70 0.35 +#> Spring cereals NA 0.40 0.50 0.50 0.65 0.65 0.65 0.65 0.65 0.55 +#> Winter cereals NA 0.10 0.40 0.60 0.55 0.55 0.55 0.60 0.60 0.40 +``` diff --git a/docs/reference/FOCUS_GW_scenarios_2012.html b/docs/reference/FOCUS_GW_scenarios_2012.html index b2295c5..d21d340 100644 --- a/docs/reference/FOCUS_GW_scenarios_2012.html +++ b/docs/reference/FOCUS_GW_scenarios_2012.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>A very small subset of the FOCUS Groundwater scenario definitions — FOCUS_GW_scenarios_2012 • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="A very small subset of the FOCUS Groundwater scenario definitions — FOCUS_GW_scenarios_2012"><meta name="description" content="Currently, only scenario names with acronyms and a small subset of the soil definitions are provided. The +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>A very small subset of the FOCUS Groundwater scenario definitions — FOCUS_GW_scenarios_2012 • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="A very small subset of the FOCUS Groundwater scenario definitions — FOCUS_GW_scenarios_2012"><meta name="description" content="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)."><meta property="og:description" content="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)."></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -9,7 +15,7 @@ soil definitions are from page 46ff. from FOCUS (2012)."></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -46,10 +52,6 @@ soil definitions are from page 46ff. from FOCUS (2012).</p> </div> <div class="section level2"> - <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> - <p>An object of class <code>list</code> of length 2.</p> - </div> - <div class="section level2"> <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> <p>FOCUS (2012) Generic guidance for Tier 1 FOCUS ground water assessments. Version 2.1. FOrum for the Co-ordination of pesticde fate models and their USe. @@ -130,7 +132,7 @@ http://focus.jrc.ec.europa.eu/gw/docs/Generic_guidance_FOCV2_1.pdf</p> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/FOCUS_GW_scenarios_2012.md b/docs/reference/FOCUS_GW_scenarios_2012.md new file mode 100644 index 0000000..43d05e8 --- /dev/null +++ b/docs/reference/FOCUS_GW_scenarios_2012.md @@ -0,0 +1,84 @@ +# 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). + +## Usage + +``` r +FOCUS_GW_scenarios_2012 +``` + +## References + +FOCUS (2012) Generic guidance for Tier 1 FOCUS ground water assessments. +Version 2.1. FOrum for the Co-ordination of pesticde fate models and +their USe. +http://focus.jrc.ec.europa.eu/gw/docs/Generic_guidance_FOCV2_1.pdf + +## Examples + +``` r +FOCUS_GW_scenarios_2012 +#> $names +#> Cha Ham Jok Kre Oke +#> "Châteadun" "Hamburg" "Jokioinen" "Kremsmünster" "Okehampton" +#> Pia Por Sev Thi +#> "Piacenza" "Porto" "Sevilla" "Thiva" +#> +#> $soils +#> location horizon number pH_H2O perc_clay perc_oc rel_deg +#> 1 Cha Ap 1 8.0 30.0 1.39 1.0 +#> 2 Cha B1 2 8.1 31.0 0.93 0.5 +#> 3 Cha B2 3 8.2 25.0 0.70 0.5 +#> 4 Cha II C1 4 8.5 26.0 0.30 0.3 +#> 5 Cha II C1 5 8.5 26.0 0.30 0.0 +#> 6 Cha II C2 6 8.5 24.0 0.27 0.0 +#> 7 Cha M 7 8.3 31.0 0.21 0.0 +#> 8 Ham Ap 1 6.4 7.2 1.50 1.0 +#> 9 Ham BvI 2 5.6 6.7 1.00 0.5 +#> 10 Ham BvII 3 5.6 0.9 0.20 0.3 +#> 11 Ham Bv/Cv 4 5.7 0.0 0.00 0.3 +#> 12 Ham Cv 5 5.5 0.0 0.00 0.3 +#> 13 Ham Cv 6 5.5 0.0 0.00 0.0 +#> 14 Jok Ap 1 6.2 3.6 4.06 1.0 +#> 15 Jok Bs 2 5.6 1.8 0.84 0.5 +#> 16 Jok BC1 3 5.4 1.2 0.36 0.3 +#> 17 Jok BC2 4 5.4 1.7 0.29 0.3 +#> 18 Jok BC2 5 5.4 1.7 0.29 0.0 +#> 19 Jok Cg 6 5.3 1.9 0.21 0.0 +#> 20 Kre <NA> 1 7.7 14.0 3.60 1.0 +#> 21 Kre <NA> 2 7.0 25.0 1.00 0.5 +#> 22 Kre <NA> 3 7.1 27.0 0.50 0.5 +#> 23 Kre <NA> 4 7.1 27.0 0.50 0.3 +#> 24 Kre <NA> 5 7.1 27.0 0.50 0.0 +#> 25 Oke A 1 5.8 18.0 2.20 1.0 +#> 26 Oke Bw1 2 6.3 17.0 0.70 0.5 +#> 27 Oke BC 3 6.5 14.0 0.40 0.3 +#> 28 Oke C 4 6.6 9.0 0.10 0.3 +#> 29 Oke C 5 6.6 9.0 0.10 0.0 +#> 30 Pia Ap 1 7.0 15.0 1.26 1.0 +#> 31 Pia Ap 2 7.0 15.0 1.26 0.5 +#> 32 Pia Bw 3 6.3 7.0 0.47 0.5 +#> 33 Pia Bw 4 6.3 7.0 0.47 0.3 +#> 34 Pia 2C 5 6.4 0.0 0.00 0.3 +#> 35 Pia 2C 6 6.4 0.0 0.00 0.0 +#> 36 Por <NA> 1 4.9 10.0 1.42 1.0 +#> 37 Por <NA> 2 4.8 8.0 0.78 0.5 +#> 38 Por <NA> 3 4.8 8.0 0.78 0.3 +#> 39 Por <NA> 4 4.8 8.0 0.78 0.0 +#> 40 Sev <NA> 1 7.3 14.0 0.93 1.0 +#> 41 Sev <NA> 2 7.3 13.0 0.93 1.0 +#> 42 Sev <NA> 3 7.8 15.0 0.70 0.5 +#> 43 Sev <NA> 4 8.1 16.0 0.58 0.3 +#> 44 Sev <NA> 5 8.1 16.0 0.58 0.0 +#> 45 Sev <NA> 6 8.2 22.0 0.49 0.0 +#> 46 Thi Ap1 1 7.7 25.3 0.74 1.0 +#> 47 Thi Ap2 2 7.7 25.3 0.74 0.5 +#> 48 Thi Bw 3 7.8 29.6 0.57 0.5 +#> 49 Thi Bw 4 7.8 31.9 0.31 0.3 +#> 50 Thi Ck1 5 7.8 32.9 0.18 0.3 +#> 51 Thi Ck1 6 7.8 32.9 0.18 0.0 +#> +``` diff --git a/docs/reference/FOCUS_Step_12_scenarios.html b/docs/reference/FOCUS_Step_12_scenarios.html index 536b974..41d4547 100644 --- a/docs/reference/FOCUS_Step_12_scenarios.html +++ b/docs/reference/FOCUS_Step_12_scenarios.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Step 1/2 scenario data as distributed with the FOCUS Step 1/2 calculator — FOCUS_Step_12_scenarios • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Step 1/2 scenario data as distributed with the FOCUS Step 1/2 calculator — FOCUS_Step_12_scenarios"><meta name="description" content="The data were extracted from the scenario.txt file using the R code shown below. +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Step 1/2 scenario data as distributed with the FOCUS Step 1/2 calculator — FOCUS_Step_12_scenarios • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Step 1/2 scenario data as distributed with the FOCUS Step 1/2 calculator — FOCUS_Step_12_scenarios"><meta name="description" content="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."><meta property="og:description" content="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."></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -9,7 +15,7 @@ The text file is not included in the package as its licence is not clear."></hea <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -61,27 +67,27 @@ calculations in a matrix called 'rd'.</p> <span class="r-in"><span> <span class="va">FOCUS_Step_12_scenarios</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="op">)</span></span></span> <span class="r-in"><span> <span class="va">sce</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/utils/read.table.html" class="external-link">read.table</a></span><span class="op">(</span>text <span class="op">=</span> <span class="va">scenarios</span>, sep <span class="op">=</span> <span class="st">"\t"</span>, header <span class="op">=</span> <span class="cn">TRUE</span>, check.names <span class="op">=</span> <span class="cn">FALSE</span>,</span></span> <span class="r-in"><span> stringsAsFactors <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></span> -<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'scenarios' not found</span> +<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error:</span> object 'scenarios' not found</span> <span class="r-in"><span> <span class="va">FOCUS_Step_12_scenarios</span><span class="op">$</span><span class="va">names</span> <span class="op">=</span> <span class="va">sce</span><span class="op">$</span><span class="va">Crop</span></span></span> -<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'sce' not found</span> +<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error:</span> object 'sce' not found</span> <span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/colnames.html" class="external-link">rownames</a></span><span class="op">(</span><span class="va">sce</span><span class="op">)</span> <span class="op"><-</span> <span class="va">sce</span><span class="op">$</span><span class="va">Crop</span></span></span> -<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'sce' not found</span> +<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error:</span> object 'sce' not found</span> <span class="r-in"><span> <span class="va">FOCUS_Step_12_scenarios</span><span class="op">$</span><span class="va">drift</span> <span class="op">=</span> <span class="va">sce</span><span class="op">[</span>, <span class="fl">3</span><span class="op">:</span><span class="fl">11</span><span class="op">]</span></span></span> -<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'sce' not found</span> +<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error:</span> object 'sce' not found</span> <span class="r-in"><span> <span class="va">FOCUS_Step_12_scenarios</span><span class="op">$</span><span class="va">interception</span> <span class="op">=</span> <span class="va">sce</span><span class="op">[</span>, <span class="fl">12</span><span class="op">:</span><span class="fl">15</span><span class="op">]</span></span></span> -<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'sce' not found</span> +<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error:</span> object 'sce' not found</span> <span class="r-in"><span> <span class="va">sce_2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/readLines.html" class="external-link">readLines</a></span><span class="op">(</span><span class="va">scenario_path</span><span class="op">)</span><span class="op">[</span><span class="fl">41</span><span class="op">:</span><span class="fl">46</span><span class="op">]</span></span></span> <span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>cannot open file 'inst/extdata/FOCUS_Step_12_scenarios.txt': No such file or directory</span> <span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in file(con, "r"):</span> cannot open the connection</span> <span class="r-in"><span> <span class="va">rd</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/utils/read.table.html" class="external-link">read.table</a></span><span class="op">(</span>text <span class="op">=</span> <span class="va">sce_2</span>, sep <span class="op">=</span> <span class="st">"\t"</span><span class="op">)</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">2</span><span class="op">]</span></span></span> -<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'sce_2' not found</span> +<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error:</span> object 'sce_2' not found</span> <span class="r-in"><span> <span class="va">rd_mat</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/matrix.html" class="external-link">matrix</a></span><span class="op">(</span><span class="va">rd</span><span class="op">$</span><span class="va">V2</span>, nrow <span class="op">=</span> <span class="fl">3</span>, byrow <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></span> -<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'rd' not found</span> +<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error:</span> object 'rd' not found</span> <span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/dimnames.html" class="external-link">dimnames</a></span><span class="op">(</span><span class="va">rd_mat</span><span class="op">)</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>Time <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Oct-Feb"</span>, <span class="st">"Mar-May"</span>, <span class="st">"Jun-Sep"</span><span class="op">)</span>,</span></span> <span class="r-in"><span> Region <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"North"</span>, <span class="st">"South"</span><span class="op">)</span><span class="op">)</span></span></span> <span class="r-err co"><span class="r-pr">#></span> <span class="error">Error:</span> object 'rd_mat' not found</span> <span class="r-in"><span> <span class="va">FOCUS_Step_12_scenarios</span><span class="op">$</span><span class="va">rd</span> <span class="op">=</span> <span class="va">rd_mat</span></span></span> -<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'rd_mat' not found</span> +<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error:</span> object 'rd_mat' not found</span> <span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/save.html" class="external-link">save</a></span><span class="op">(</span><span class="va">FOCUS_Step_12_scenarios</span>, file <span class="op">=</span> <span class="st">"data/FOCUS_Step_12_scenarios.RData"</span><span class="op">)</span></span></span> <span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>cannot open compressed file 'data/FOCUS_Step_12_scenarios.RData', probable reason 'No such file or directory'</span> <span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in gzfile(file, "wb"):</span> cannot open the connection</span> @@ -101,7 +107,7 @@ calculations in a matrix called 'rd'.</p> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/FOCUS_Step_12_scenarios.md b/docs/reference/FOCUS_Step_12_scenarios.md new file mode 100644 index 0000000..63d1959 --- /dev/null +++ b/docs/reference/FOCUS_Step_12_scenarios.md @@ -0,0 +1,55 @@ +# 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. The text file is not included in the package as its licence +is not clear. + +## 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'. + +## Examples + +``` r +# \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] +#> Warning: cannot open file 'inst/extdata/FOCUS_Step_12_scenarios.txt': No such file or directory +#> Error in file(con, "r"): cannot open the connection + FOCUS_Step_12_scenarios <- list() + sce <- read.table(text = scenarios, sep = "\t", header = TRUE, check.names = FALSE, + stringsAsFactors = FALSE) +#> Error: object 'scenarios' not found + FOCUS_Step_12_scenarios$names = sce$Crop +#> Error: object 'sce' not found + rownames(sce) <- sce$Crop +#> Error: object 'sce' not found + FOCUS_Step_12_scenarios$drift = sce[, 3:11] +#> Error: object 'sce' not found + FOCUS_Step_12_scenarios$interception = sce[, 12:15] +#> Error: object 'sce' not found + sce_2 <- readLines(scenario_path)[41:46] +#> Warning: cannot open file 'inst/extdata/FOCUS_Step_12_scenarios.txt': No such file or directory +#> Error in file(con, "r"): cannot open the connection + rd <- read.table(text = sce_2, sep = "\t")[1:2] +#> Error: object 'sce_2' not found + rd_mat <- matrix(rd$V2, nrow = 3, byrow = FALSE) +#> Error: object 'rd' not found + dimnames(rd_mat) = list(Time = c("Oct-Feb", "Mar-May", "Jun-Sep"), + Region = c("North", "South")) +#> Error: object 'rd_mat' not found + FOCUS_Step_12_scenarios$rd = rd_mat +#> Error: object 'rd_mat' not found + save(FOCUS_Step_12_scenarios, file = "data/FOCUS_Step_12_scenarios.RData") +#> Warning: cannot open compressed file 'data/FOCUS_Step_12_scenarios.RData', probable reason 'No such file or directory' +#> Error in gzfile(file, "wb"): cannot open the connection +# } + +# And this is the resulting data +FOCUS_Step_12_scenarios +#> list() +``` diff --git a/docs/reference/FOMC_actual_twa.html b/docs/reference/FOMC_actual_twa.html index 1e0fd64..2a772a1 100644 --- a/docs/reference/FOMC_actual_twa.html +++ b/docs/reference/FOMC_actual_twa.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Actual and maximum moving window time average concentrations for FOMC kinetics — FOMC_actual_twa • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Actual and maximum moving window time average concentrations for FOMC kinetics — FOMC_actual_twa"><meta name="description" content="Actual and maximum moving window time average concentrations for FOMC kinetics"><meta property="og:description" content="Actual and maximum moving window time average concentrations for FOMC kinetics"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Actual and maximum moving window time average concentrations for FOMC kinetics — FOMC_actual_twa • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Actual and maximum moving window time average concentrations for FOMC kinetics — FOMC_actual_twa"><meta name="description" content="Actual and maximum moving window time average concentrations for FOMC kinetics"><meta property="og:description" content="Actual and maximum moving window time average concentrations for FOMC kinetics"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -7,7 +13,7 @@ <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -99,7 +105,7 @@ Kinetics from Environmental Fate Studies on Pesticides in EU Registration, Versi </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/FOMC_actual_twa.md b/docs/reference/FOMC_actual_twa.md new file mode 100644 index 0000000..e49c1bb --- /dev/null +++ b/docs/reference/FOMC_actual_twa.md @@ -0,0 +1,57 @@ +# Actual and maximum moving window time average concentrations for FOMC kinetics + +Actual and maximum moving window time average concentrations for FOMC +kinetics + +## Usage + +``` r +FOMC_actual_twa( + alpha = 1.0001, + beta = 10, + times = c(0, 1, 2, 4, 7, 14, 21, 28, 42, 50, 100) +) +``` + +## Source + +FOCUS (2014) Generic Guidance for Estimating Persistence and Degradation +Kinetics from Environmental Fate Studies on Pesticides in EU +Registration, Version 1.1, 18 December 2014, p. 251 + +## Arguments + +- alpha: + + Parameter of the FOMC model + +- beta: + + Parameter of the FOMC model + +- times: + + The output times, and window sizes for time weighted average + concentrations + +## Author + +Johannes Ranke + +## Examples + +``` r +FOMC_actual_twa(alpha = 1.0001, beta = 10) +#> actual twa +#> 0 1.00000000 NaN +#> 1 0.90908224 0.9530973 +#> 2 0.83331814 0.9115995 +#> 4 0.71426168 0.8411664 +#> 7 0.58820408 0.7580202 +#> 14 0.41663019 0.6253074 +#> 21 0.32254415 0.5387324 +#> 28 0.26312277 0.4767543 +#> 42 0.19227599 0.3925054 +#> 50 0.16663681 0.3583198 +#> 100 0.09088729 0.2397608 +``` diff --git a/docs/reference/GUS.html b/docs/reference/GUS.html index a613d98..0e86666 100644 --- a/docs/reference/GUS.html +++ b/docs/reference/GUS.html @@ -1,8 +1,14 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Groundwater ubiquity score based on Gustafson (1989) — GUS • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Groundwater ubiquity score based on Gustafson (1989) — GUS"><meta name="description" content="The groundwater ubiquity score GUS is calculated according to -the following equation -$$GUS = \log_{10} DT50_{soil} (4 - \log_{10} K_{oc})$$"><meta property="og:description" content="The groundwater ubiquity score GUS is calculated according to -the following equation +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Groundwater ubiquity score based on Gustafson (1989) — GUS • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Groundwater ubiquity score based on Gustafson (1989) — GUS"><meta name="description" content="The groundwater ubiquity score GUS is calculated according to the +equation +$$GUS = \log_{10} DT50_{soil} (4 - \log_{10} K_{oc})$$"><meta property="og:description" content="The groundwater ubiquity score GUS is calculated according to the +equation $$GUS = \log_{10} DT50_{soil} (4 - \log_{10} K_{oc})$$"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -11,7 +17,7 @@ $$GUS = \log_{10} DT50_{soil} (4 - \log_{10} K_{oc})$$"></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -38,8 +44,8 @@ $$GUS = \log_{10} DT50_{soil} (4 - \log_{10} K_{oc})$$"></head><body> </div> <div class="ref-description section level2"> - <p>The groundwater ubiquity score GUS is calculated according to -the following equation + <p>The groundwater ubiquity score GUS is calculated according to the +equation $$GUS = \log_{10} DT50_{soil} (4 - \log_{10} K_{oc})$$</p> </div> @@ -162,7 +168,7 @@ toxicology and chemistry</em> <b>8</b>(4) 339–57.</p> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/GUS.md b/docs/reference/GUS.md new file mode 100644 index 0000000..8bc2a62 --- /dev/null +++ b/docs/reference/GUS.md @@ -0,0 +1,112 @@ +# Groundwater ubiquity score based on Gustafson (1989) + +The groundwater ubiquity score GUS is calculated according to the +equation \$\$GUS = \log\_{10} DT50\_{soil} (4 - \log\_{10} K\_{oc})\$\$ + +## Usage + +``` r +GUS(...) + +# S3 method for class 'numeric' +GUS(DT50, Koc, ...) + +# S3 method for class 'chent' +GUS( + chent, + degradation_value = "DT50ref", + lab_field = "laboratory", + redox = "aerobic", + sorption_value = "Kfoc", + degradation_aggregator = geomean, + sorption_aggregator = geomean, + ... +) + +# S3 method for class 'GUS_result' +print(x, ..., digits = 1) +``` + +## Arguments + +- ...: + + Included in the generic to allow for further arguments later. + Therefore this also had to be added to the specific methods. + +- DT50: + + 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. + +- Koc: + + 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). + +- chent: + + If a chent is given with appropriate information present in its chyaml + field, this information is used, with defaults specified below. + +- degradation_value: + + Which of the available degradation values should be used? + +- lab_field: + + 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. + +- redox: + + Aerobic or anaerobic degradation data + +- sorption_value: + + 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. + +- degradation_aggregator: + + Function for aggregating half-lives + +- sorption_aggregator: + + Function for aggregation Koc values + +- x: + + An object of class GUS_result to be printed + +- digits: + + The number of digits used in the print method + +## Value + +A list with the DT50 and Koc used as well as the resulting score of +class GUS_result + +## References + +Gustafson, David I. (1989) Groundwater ubiquity score: a simple method +for assessing pesticide leachability. *Environmental toxicology and +chemistry* **8**(4) 339–57. + +## Author + +Johannes Ranke diff --git a/docs/reference/PEC_FOMC_accu_rel.html b/docs/reference/PEC_FOMC_accu_rel.html index fc4a2ea..6139c28 100644 --- a/docs/reference/PEC_FOMC_accu_rel.html +++ b/docs/reference/PEC_FOMC_accu_rel.html @@ -1,43 +1,40 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Get the relative accumulation of an FOMC model over multiples of an interval"><title>Get the relative accumulation of an FOMC model over multiples of an interval — PEC_FOMC_accu_rel • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Get the relative accumulation of an FOMC model over multiples of an interval — PEC_FOMC_accu_rel"><meta property="og:description" content="Get the relative accumulation of an FOMC model over multiples of an interval"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Get the relative accumulation of an FOMC model over multiples of an interval — PEC_FOMC_accu_rel • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Get the relative accumulation of an FOMC model over multiples of an interval — PEC_FOMC_accu_rel"><meta name="description" content="Get the relative accumulation of an FOMC model over multiples of an interval"><meta property="og:description" content="Get the relative accumulation of an FOMC model over multiples of an interval"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> - - <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container"> - + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.1</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> + - <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar" class="collapse navbar-collapse ms-3"> - <ul class="navbar-nav me-auto"><li class="active nav-item"> - <a class="nav-link" href="../reference/index.html">Reference</a> -</li> - </ul><form class="form-inline my-2 my-lg-0" role="search"> - <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form> - - <ul class="navbar-nav"><li class="nav-item"> - <a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="github"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> </ul></div> - + </div> </nav><div class="container template-reference-topic"> <div class="row"> <main id="main" class="col-md-9"><div class="page-header"> - <img src="" class="logo" alt=""><h1>Get the relative accumulation of an FOMC model over multiples of an interval</h1> + + <h1>Get the relative accumulation of an FOMC model over multiples of an interval</h1> <small class="dont-index">Source: <a href="https://github.com/jranke/pfm/blob/HEAD/R/PEC_soil.R" class="external-link"><code>R/PEC_soil.R</code></a></small> <div class="d-none name"><code>PEC_FOMC_accu_rel.Rd</code></div> </div> @@ -53,42 +50,42 @@ <div class="section level2"> <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> - <dl><dt>n</dt> + + +<dl><dt id="arg-n">n<a class="anchor" aria-label="anchor" href="#arg-n"></a></dt> <dd><p>number of applications</p></dd> -<dt>interval</dt> +<dt id="arg-interval">interval<a class="anchor" aria-label="anchor" href="#arg-interval"></a></dt> <dd><p>Time between applications</p></dd> -<dt>FOMC</dt> +<dt id="arg-fomc">FOMC<a class="anchor" aria-label="anchor" href="#arg-fomc"></a></dt> <dd><p>Named numeric vector containing the FOMC parameters alpha and beta</p></dd> </dl></div> <div class="section level2"> <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> - - -<p>A numeric vector containing all n accumulation factors for the n applications</p> + <p>A numeric vector containing all n accumulation factors for the n applications</p> </div> - </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </nav></aside></div> <footer><div class="pkgdown-footer-left"> - <p></p><p>Developed by Johannes Ranke.</p> + <p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown-footer-right"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> - - + + </body></html> diff --git a/docs/reference/PEC_FOMC_accu_rel.md b/docs/reference/PEC_FOMC_accu_rel.md new file mode 100644 index 0000000..7ae2982 --- /dev/null +++ b/docs/reference/PEC_FOMC_accu_rel.md @@ -0,0 +1,29 @@ +# Get the relative accumulation of an FOMC model over multiples of an interval + +Get the relative accumulation of an FOMC model over multiples of an +interval + +## Usage + +``` r +PEC_FOMC_accu_rel(n, interval, FOMC) +``` + +## Arguments + +- n: + + number of applications + +- interval: + + Time between applications + +- FOMC: + + Named numeric vector containing the FOMC parameters alpha and beta + +## Value + +A numeric vector containing all n accumulation factors for the n +applications diff --git a/docs/reference/PEC_soil.html b/docs/reference/PEC_soil.html index e86dd6d..7ef86fd 100644 --- a/docs/reference/PEC_soil.html +++ b/docs/reference/PEC_soil.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate predicted environmental concentrations in soil — PEC_soil • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate predicted environmental concentrations in soil — PEC_soil"><meta name="description" content="This is a basic calculation of a contaminant concentration in bulk soil +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate predicted environmental concentrations in soil — PEC_soil • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate predicted environmental concentrations in soil — PEC_soil"><meta name="description" content="This is a basic calculation of a contaminant concentration in bulk soil based on complete, instantaneous mixing. If an interval is given, an attempt is made at calculating a long term maximum concentration using the concepts layed out in the PPR panel opinion (EFSA PPR panel 2012 @@ -15,7 +21,7 @@ and in the EFSA guidance on PEC soil calculations (EFSA, 2015, 2017)."></head><b <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -174,7 +180,8 @@ as Kom here</p></dd> <dt id="arg-scenarios">scenarios<a class="anchor" aria-label="anchor" href="#arg-scenarios"></a></dt> -<dd><p>If this is 'default', the DT50 will be used without correction +<dd><p>If this is 'default', a soil bulk density of 1.5 kg/L will +be used. 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 "EFSA_2015", the DT50 is taken to be a modelling half-life at 20°C and pF2 (for when @@ -212,7 +219,7 @@ guidance (2017, p. 14/15) can easily be calculated.</p> <div class="section level2"> <h2 id="note">Note<a class="anchor" aria-label="anchor" href="#note"></a></h2> <p>While time weighted average (TWA) concentrations given in the examples -from the EFSA guidance from 2015 (p. 80) are be reproduced, this is not +from the EFSA guidance from 2015 (p. 80) can be reproduced, this is not true for the TWA concentrations given for the same example in the EFSA guidance from 2017 (p. 92).</p> <p>According to the EFSA guidance (EFSA, 2017, p. 43), leaching should be @@ -305,7 +312,7 @@ doi:10.2903/j.efsa.2015.4093</p> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/PEC_soil.md b/docs/reference/PEC_soil.md new file mode 100644 index 0000000..d7666dc --- /dev/null +++ b/docs/reference/PEC_soil.md @@ -0,0 +1,261 @@ +# Calculate predicted environmental concentrations in soil + +This is a basic calculation of a contaminant concentration in bulk soil +based on complete, instantaneous mixing. If an interval is given, an +attempt is made at calculating a long term maximum concentration using +the concepts layed out in the PPR panel opinion (EFSA PPR panel 2012 and +in the EFSA guidance on PEC soil calculations (EFSA, 2015, 2017). + +## Usage + +``` r +PEC_soil( + rate, + rate_units = "g/ha", + interception = 0, + mixing_depth = 5, + PEC_units = "mg/kg", + PEC_pw_units = "mg/L", + interval = NA, + n_periods = Inf, + tillage_depth = 20, + leaching_depth = tillage_depth, + crop = "annual", + cultivation = FALSE, + chent = NA, + DT50 = NA, + FOMC = NA, + Koc = NA, + Kom = Koc/1.724, + t_avg = 0, + t_act = NULL, + scenarios = c("default", "EFSA_2017", "EFSA_2015"), + leaching = scenarios == "EFSA_2017", + porewater = FALSE +) +``` + +## Arguments + +- rate: + + Application rate in units specified below + +- rate_units: + + Defaults to g/ha + +- interception: + + The fraction of the application rate that does not reach the soil + +- mixing_depth: + + Mixing depth in cm + +- PEC_units: + + Requested units for the calculated PEC. Only mg/kg currently supported + +- PEC_pw_units: + + Only mg/L currently supported + +- interval: + + Period of the deeper mixing. The default is NA, i.e. no deeper mixing. + For annual deeper mixing, set this to 365 when degradation units are + in days + +- n_periods: + + Number of periods to be considered for long term PEC calculations + +- tillage_depth: + + Periodic (see interval) deeper mixing in cm + +- leaching_depth: + + EFSA (2017) uses the mixing depth (ecotoxicological evaluation depth) + to calculate leaching for annual crops where tillage takes place. By + default, losses from the layer down to the tillage depth are taken + into account in this implementation. + +- crop: + + Ignored for scenarios other than EFSA_2017. Only annual crops are + supported when these scenarios are used. Only crops with a single + cropping cycle per year are currently supported. + +- cultivation: + + Does mechanical cultivation in the sense of EFSA (2017) take place, + i.e. twice a year to a depth of 5 cm? Ignored for scenarios other than + EFSA_2017 + +- chent: + + An optional chent object holding substance specific information. Can + also be a name for the substance as a character string + +- DT50: + + 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 + +- FOMC: + + If specified, it should be a named numeric vector containing the FOMC + parameters alpha and beta. This overrides any other degradation + endpoints, and the degradation during the interval and after the + maximum PEC is calculated using these parameters without temperature + correction + +- Koc: + + If specified, overrides Koc endpoints from a chent object + +- Kom: + + Calculated from Koc by default, but can explicitly be specified as Kom + here + +- t_avg: + + Averaging times for time weighted average concentrations + +- t_act: + + Time series for actual concentrations + +- scenarios: + + If this is 'default', a soil bulk density of 1.5 kg/L will be used. + 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 "EFSA_2015", the DT50 is taken + to be a modelling half-life at 20°C and pF2 (for when 'chent' 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. + +- leaching: + + Should leaching be taken into account? The default is FALSE, except + when the EFSA_2017 scenarios are used. + +- porewater: + + 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). + +## Value + +The predicted concentration in soil + +## Details + +This assumes that the complete load to soil during the time specified by +'interval' (typically 365 days) is dosed at once. As in the PPR panel +opinion cited below (EFSA PPR panel 2012), only temperature correction +using the Arrhenius equation is performed. + +Total soil and porewater PEC values for the scenarios as defined in the +EFSA guidance (2017, p. 14/15) can easily be calculated. + +## Note + +While time weighted average (TWA) concentrations given in the examples +from the EFSA guidance from 2015 (p. 80) can be reproduced, this is not +true for the TWA concentrations given for the same example in the EFSA +guidance from 2017 (p. 92). + +According to the EFSA guidance (EFSA, 2017, p. 43), leaching should be +taken into account for the EFSA 2017 scenarios, using the evaluation +depth (here mixing depth) as the depth of the layer from which leaching +takes place. However, as the amount leaching below the evaluation depth +(often 5 cm) will partly be mixed back during tillage, the default in +this function is to use the tillage depth for the calculation of the +leaching rate. + +If temperature information is available in the selected scenarios, as +e.g. in the EFSA scenarios, the DT50 for groundwater modelling +(destination 'PECgw') is taken from the chent object, otherwise the DT50 +with destination 'PECsoil'. + +## References + +EFSA Panel on Plant Protection Products and their Residues (2012) +Scientific Opinion on the science behind the guidance for scenario +selection and scenario parameterisation for predicting environmental +concentrations of plant protection products in soil. *EFSA Journal* +**10**(2) 2562, doi:10.2903/j.efsa.2012.2562 + +EFSA (European Food Safety Authority) 2017) EFSA guidance document for +predicting environmental concentrations of active substances of plant +protection products and transformation products of these active +substances in soil. *EFSA Journal* **15**(10) 4982 +doi:10.2903/j.efsa.2017.4982 + +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. *EFSA Journal* **13**(4) 4093 +doi:10.2903/j.efsa.2015.4093 + +## Author + +Johannes Ranke + +## Examples + +``` r +PEC_soil(100, interception = 0.25) +#> scenario +#> t_avg default +#> 0 0.1 + +# This is example 1 starting at p. 92 of the EFSA guidance (2017) +# Note that TWA concentrations differ from the ones given in the guidance +# for an unknown reason (the values from EFSA (2015) can be reproduced). +PEC_soil(1000, interval = 365, DT50 = 250, t_avg = c(0, 21), + Kom = 1000, scenarios = "EFSA_2017") +#> scenario +#> t_avg CTN CTC CTS +#> 0 19.76834 13.8619 10.53795 +#> 21 19.59345 13.7169 10.39882 +PEC_soil(1000, interval = 365, DT50 = 250, t_av = c(0, 21), + Kom = 1000, scenarios = "EFSA_2017", porewater = TRUE) +#> scenario +#> t_avg CLN CLC CLS +#> 0 0.5541984 0.6779249 0.9816693 +#> 21 0.5484576 0.6693125 0.9609119 + +# This is example 1 starting at p. 79 of the EFSA guidance (2015) +PEC_soil(1000, interval = 365, DT50 = 250, t_avg = c(0, 21), + scenarios = "EFSA_2015") +#> scenario +#> t_avg CTN CTC CTS +#> 0 21.96827 11.53750 9.145259 +#> 21 21.78517 11.40701 9.017370 +PEC_soil(1000, interval = 365, DT50 = 250, t_av = c(0, 21), + Kom = 1000, scenarios = "EFSA_2015", porewater = TRUE) +#> scenario +#> t_avg CLN CLC CLS +#> 0 0.7589401 0.6674322 0.9147861 +#> 21 0.7506036 0.6590345 0.8987279 + +# The following is from example 4 starting at p. 85 of the EFSA guidance (2015) +# Metabolite M2 +# Calculate total and porewater soil concentrations for tier 1 scenarios +# Relative molar mass is 100/300, formation fraction is 0.7 * 1 +results_pfm <- PEC_soil(100/300 * 0.7 * 1 * 1000, interval = 365, DT50 = 250, t_avg = c(0, 21), + scenarios = "EFSA_2015") +results_pfm_pw <- PEC_soil(100/300 * 0.7 * 1000, interval = 365, DT50 = 250, t_av = c(0, 21), + Kom = 100, scenarios = "EFSA_2015", porewater = TRUE) +``` diff --git a/docs/reference/PEC_soil_mets.html b/docs/reference/PEC_soil_mets.html index 3bce8cc..950d17a 100644 --- a/docs/reference/PEC_soil_mets.html +++ b/docs/reference/PEC_soil_mets.html @@ -1,43 +1,40 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Calculate initial and accumulation PEC soil for a set of metabolites"><title>Calculate initial and accumulation PEC soil for a set of metabolites — PEC_soil_mets • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate initial and accumulation PEC soil for a set of metabolites — PEC_soil_mets"><meta property="og:description" content="Calculate initial and accumulation PEC soil for a set of metabolites"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate initial and accumulation PEC soil for a set of metabolites — PEC_soil_mets • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate initial and accumulation PEC soil for a set of metabolites — PEC_soil_mets"><meta name="description" content="Calculate initial and accumulation PEC soil for a set of metabolites"><meta property="og:description" content="Calculate initial and accumulation PEC soil for a set of metabolites"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> - - <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container"> - + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.1</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> + - <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar" class="collapse navbar-collapse ms-3"> - <ul class="navbar-nav me-auto"><li class="active nav-item"> - <a class="nav-link" href="../reference/index.html">Reference</a> -</li> - </ul><form class="form-inline my-2 my-lg-0" role="search"> - <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form> - - <ul class="navbar-nav"><li class="nav-item"> - <a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="github"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> </ul></div> - + </div> </nav><div class="container template-reference-topic"> <div class="row"> <main id="main" class="col-md-9"><div class="page-header"> - <img src="" class="logo" alt=""><h1>Calculate initial and accumulation PEC soil for a set of metabolites</h1> + + <h1>Calculate initial and accumulation PEC soil for a set of metabolites</h1> <small class="dont-index">Source: <a href="https://github.com/jranke/pfm/blob/HEAD/R/PEC_soil.R" class="external-link"><code>R/PEC_soil.R</code></a></small> <div class="d-none name"><code>PEC_soil_mets.Rd</code></div> </div> @@ -53,46 +50,48 @@ <div class="section level2"> <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> - <dl><dt>rate</dt> + + +<dl><dt id="arg-rate">rate<a class="anchor" aria-label="anchor" href="#arg-rate"></a></dt> <dd><p>Application rate in units specified below</p></dd> -<dt>mw_parent</dt> +<dt id="arg-mw-parent">mw_parent<a class="anchor" aria-label="anchor" href="#arg-mw-parent"></a></dt> <dd><p>The molecular weight of the parent compound</p></dd> -<dt>mets</dt> +<dt id="arg-mets">mets<a class="anchor" aria-label="anchor" href="#arg-mets"></a></dt> <dd><p>A dataframe with metabolite identifiers as rownames and columns "mw", "occ" and "DT50" holding their molecular weight, maximum occurrence in soil and their soil DT50</p></dd> -<dt>interval</dt> +<dt id="arg-interval">interval<a class="anchor" aria-label="anchor" href="#arg-interval"></a></dt> <dd><p>The interval for accumulation calculations</p></dd> -<dt>...</dt> +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> <dd><p>Further arguments are passed to PEC_soil</p></dd> </dl></div> - </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </nav></aside></div> <footer><div class="pkgdown-footer-left"> - <p></p><p>Developed by Johannes Ranke.</p> + <p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown-footer-right"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> - - + + </body></html> diff --git a/docs/reference/PEC_soil_mets.md b/docs/reference/PEC_soil_mets.md new file mode 100644 index 0000000..5811b9e --- /dev/null +++ b/docs/reference/PEC_soil_mets.md @@ -0,0 +1,33 @@ +# Calculate initial and accumulation PEC soil for a set of metabolites + +Calculate initial and accumulation PEC soil for a set of metabolites + +## Usage + +``` r +PEC_soil_mets(rate, mw_parent, mets, interval = 365, ...) +``` + +## Arguments + +- rate: + + Application rate in units specified below + +- mw_parent: + + The molecular weight of the parent compound + +- mets: + + A dataframe with metabolite identifiers as rownames and columns "mw", + "occ" and "DT50" holding their molecular weight, maximum occurrence in + soil and their soil DT50 + +- interval: + + The interval for accumulation calculations + +- ...: + + Further arguments are passed to PEC_soil diff --git a/docs/reference/PEC_sw_drainage_UK.html b/docs/reference/PEC_sw_drainage_UK.html index d8b885f..30a146e 100644 --- a/docs/reference/PEC_sw_drainage_UK.html +++ b/docs/reference/PEC_sw_drainage_UK.html @@ -1,7 +1,17 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate initial predicted environmental concentrations in surface water due to drainage using the UK method — PEC_sw_drainage_UK • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate initial predicted environmental concentrations in surface water due to drainage using the UK method — PEC_sw_drainage_UK"><meta name="description" content="This implements the method specified in the UK data requirements handbook and was checked against the spreadsheet -published on the CRC website"><meta property="og:description" content="This implements the method specified in the UK data requirements handbook and was checked against the spreadsheet -published on the CRC website"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate initial predicted environmental concentrations in surface water due to drainage using the UK method — PEC_sw_drainage_UK • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate initial predicted environmental concentrations in surface water due to drainage using the UK method — PEC_sw_drainage_UK"><meta name="description" content="This implements the method specified in the UK data requirements handbook and was checked against the spreadsheet +published on the CRC website. Degradation between the end (30 April) and the start (1 October) of +the drainage period is taken into account if +latest_application is specified and the degradation parameters are given either as a soil_DT50 or a model."><meta property="og:description" content="This implements the method specified in the UK data requirements handbook and was checked against the spreadsheet +published on the CRC website. Degradation between the end (30 April) and the start (1 October) of +the drainage period is taken into account if +latest_application is specified and the degradation parameters are given either as a soil_DT50 or a model."></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -9,7 +19,7 @@ published on the CRC website"></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -37,7 +47,9 @@ published on the CRC website"></head><body> <div class="ref-description section level2"> <p>This implements the method specified in the UK data requirements handbook and was checked against the spreadsheet -published on the CRC website</p> +published on the CRC website. Degradation between the end (30 April) and the start (1 October) of +the drainage period is taken into account if +<code>latest_application</code> is specified and the degradation parameters are given either as a <code>soil_DT50</code> or a <code>model</code>.</p> </div> <div class="section level2"> @@ -50,7 +62,9 @@ published on the CRC website</p> <span> soil_DT50 <span class="op">=</span> <span class="cn">NULL</span>,</span> <span> model <span class="op">=</span> <span class="cn">NULL</span>,</span> <span> model_parms <span class="op">=</span> <span class="cn">NULL</span></span> -<span><span class="op">)</span></span></code></pre></div> +<span><span class="op">)</span></span> +<span></span> +<span><span class="fu">drainage_date_UK</span><span class="op">(</span><span class="va">application_date</span><span class="op">)</span></span></code></pre></div> </div> <div class="section level2"> @@ -58,7 +72,8 @@ published on the CRC website</p> <dl><dt id="arg-rate">rate<a class="anchor" aria-label="anchor" href="#arg-rate"></a></dt> -<dd><p>Application rate in g/ha</p></dd> +<dd><p>Application rate in g/ha or with a compatible unit specified +with the units package</p></dd> <dt id="arg-interception">interception<a class="anchor" aria-label="anchor" href="#arg-interception"></a></dt> @@ -66,7 +81,8 @@ published on the CRC website</p> <dt id="arg-koc">Koc<a class="anchor" aria-label="anchor" href="#arg-koc"></a></dt> -<dd><p>The sorption coefficient normalised to organic carbon in L/kg</p></dd> +<dd><p>The sorption coefficient normalised to organic carbon in L/kg or a unit specified +with the units package</p></dd> <dt id="arg-latest-application">latest_application<a class="anchor" aria-label="anchor" href="#arg-latest-application"></a></dt> @@ -74,7 +90,8 @@ published on the CRC website</p> <dt id="arg-soil-dt-">soil_DT50<a class="anchor" aria-label="anchor" href="#arg-soil-dt-"></a></dt> -<dd><p>Soil degradation half-life, if SFO kinetics are to be used</p></dd> +<dd><p>Soil degradation half-life, if SFO kinetics are to be used, in +days or a time unit specified with the units package</p></dd> <dt id="arg-model">model<a class="anchor" aria-label="anchor" href="#arg-model"></a></dt> @@ -85,6 +102,10 @@ published on the CRC website</p> <dt id="arg-model-parms">model_parms<a class="anchor" aria-label="anchor" href="#arg-model-parms"></a></dt> <dd><p>A named numeric vector containing the model parameters</p></dd> + +<dt id="arg-application-date">application_date<a class="anchor" aria-label="anchor" href="#arg-application-date"></a></dt> +<dd><p>Application date</p></dd> + </dl></div> <div class="section level2"> <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> @@ -94,11 +115,11 @@ published on the CRC website</p> <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> <p>HSE's Chemicals Regulation Division (CRD) Active substance PECsw calculations (for UK specific authorisation requests) -<a href="https://www.hse.gov.uk/pesticides/topics/pesticide-approvals/pesticides-registration/data-requirements-handbook/fate/active-substance-uk.htm" class="external-link">https://www.hse.gov.uk/pesticides/topics/pesticide-approvals/pesticides-registration/data-requirements-handbook/fate/active-substance-uk.htm</a> -accessed 2019-09-27</p> -<p>Drainage PECs Version 1.0 (2015) Spreadsheet published at -<a href="https://www.hse.gov.uk/pesticides/topics/pesticide-approvals/pesticides-registration/data-requirements-handbook/fate/pec-tools-2015/PEC%20sw-sed%20(drainage).xlsx" class="external-link">https://www.hse.gov.uk/pesticides/topics/pesticide-approvals/pesticides-registration/data-requirements-handbook/fate/pec-tools-2015/PEC%20sw-sed%20(drainage).xlsx</a> -accessed 2019-09-27</p> +<a href="https://www.hse.gov.uk/pesticides/data-requirements-handbook/fate/pecsw-sed-via-drainflow.htm" class="external-link">https://www.hse.gov.uk/pesticides/data-requirements-handbook/fate/pecsw-sed-via-drainflow.htm</a> +accessed 2026-02-13</p> +<p>PECsw/sed spray drift and tier 1 drainflow calculator Version 2.1.1 (2025) Spreadsheet published at +<a href="https://www.hse.gov.uk/pesticides/assets/docs/PEC%20sw-sed%20(spraydrift).xlsx)" class="external-link">https://www.hse.gov.uk/pesticides/assets/docs/PEC%20sw-sed%20(spraydrift).xlsx)</a> +accessed 2026-02-13</p> </div> <div class="section level2"> <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> @@ -108,7 +129,16 @@ accessed 2019-09-27</p> <div class="section level2"> <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">PEC_sw_drainage_UK</span><span class="op">(</span><span class="fl">150</span>, Koc <span class="op">=</span> <span class="fl">100</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] 8.076923</span> +<span class="r-out co"><span class="r-pr">#></span> 8.076923 [µg/L]</span> +<span class="r-in"><span><span class="fu">PEC_sw_drainage_UK</span><span class="op">(</span><span class="fl">60</span>, interception <span class="op">=</span> <span class="fl">0.5</span>, Koc <span class="op">=</span> <span class="fl">550</span>,</span></span> +<span class="r-in"><span> latest_application <span class="op">=</span> <span class="st">"01 July"</span>, soil_DT50 <span class="op">=</span> <span class="fl">200</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 0.8388303 [µg/L]</span> +<span class="r-in"><span><span class="fu">drainage_date_UK</span><span class="op">(</span><span class="st">"2023-07-10"</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] "2023-10-01"</span> +<span class="r-in"><span><span class="fu">drainage_date_UK</span><span class="op">(</span><span class="st">"2020-12-01"</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] "2020-12-01"</span> +<span class="r-in"><span><span class="fu">drainage_date_UK</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/as.Date.html" class="external-link">as.Date</a></span><span class="op">(</span><span class="st">"2022-01-15"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] "2022-01-15"</span> </code></pre></div> </div> </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> @@ -120,7 +150,7 @@ accessed 2019-09-27</p> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/PEC_sw_drainage_UK.md b/docs/reference/PEC_sw_drainage_UK.md new file mode 100644 index 0000000..c241a69 --- /dev/null +++ b/docs/reference/PEC_sw_drainage_UK.md @@ -0,0 +1,98 @@ +# Calculate initial predicted environmental concentrations in surface water due to drainage using the UK method + +This implements the method specified in the UK data requirements +handbook and was checked against the spreadsheet published on the CRC +website. Degradation between the end (30 April) and the start (1 +October) of the drainage period is taken into account if +`latest_application` is specified and the degradation parameters are +given either as a `soil_DT50` or a `model`. + +## Usage + +``` r +PEC_sw_drainage_UK( + rate, + interception = 0, + Koc, + latest_application = NULL, + soil_DT50 = NULL, + model = NULL, + model_parms = NULL +) + +drainage_date_UK(application_date) +``` + +## Arguments + +- rate: + + Application rate in g/ha or with a compatible unit specified with the + units package + +- interception: + + The fraction of the application rate that does not reach the soil + +- Koc: + + The sorption coefficient normalised to organic carbon in L/kg or a + unit specified with the units package + +- latest_application: + + Latest application date, formatted as e.g. "01 July" + +- soil_DT50: + + Soil degradation half-life, if SFO kinetics are to be used, in days or + a time unit specified with the units package + +- model: + + The soil degradation model to be used. Either one of "FOMC", "DFOP", + "HS", or "IORE", or an mkinmod object + +- model_parms: + + A named numeric vector containing the model parameters + +- application_date: + + Application date + +## Value + +The predicted concentration in surface water in µg/L + +## References + +HSE's Chemicals Regulation Division (CRD) Active substance PECsw +calculations (for UK specific authorisation requests) +<https://www.hse.gov.uk/pesticides/data-requirements-handbook/fate/pecsw-sed-via-drainflow.htm> +accessed 2026-02-13 + +PECsw/sed spray drift and tier 1 drainflow calculator Version 2.1.1 +(2025) Spreadsheet published at +<https://www.hse.gov.uk/pesticides/assets/docs/PEC%20sw-sed%20(spraydrift).xlsx)> +accessed 2026-02-13 + +## Author + +Johannes Ranke + +## Examples + +``` r +PEC_sw_drainage_UK(150, Koc = 100) +#> 8.076923 [µg/L] +PEC_sw_drainage_UK(60, interception = 0.5, Koc = 550, + latest_application = "01 July", soil_DT50 = 200) +#> 0.8388303 [µg/L] +drainage_date_UK("2023-07-10") +#> [1] "2023-10-01" +drainage_date_UK("2020-12-01") +#> [1] "2020-12-01" +drainage_date_UK(as.Date("2022-01-15")) +#> [1] "2022-01-15" +``` diff --git a/docs/reference/PEC_sw_drift.html b/docs/reference/PEC_sw_drift.html index 2bd66df..04fb9b0 100644 --- a/docs/reference/PEC_sw_drift.html +++ b/docs/reference/PEC_sw_drift.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate predicted environmental concentrations in surface water due to drift — PEC_sw_drift • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate predicted environmental concentrations in surface water due to drift — PEC_sw_drift"><meta name="description" content="This is a basic, vectorised form of a simple calculation of a contaminant +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate predicted environmental concentrations in surface water due to drift — PEC_sw_drift • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate predicted environmental concentrations in surface water due to drift — PEC_sw_drift"><meta name="description" content="This is a basic, vectorised form of a simple calculation of a contaminant concentration in surface water based on complete, instantaneous mixing with input via spray drift."><meta property="og:description" content="This is a basic, vectorised form of a simple calculation of a contaminant concentration in surface water based on complete, instantaneous mixing @@ -11,7 +17,7 @@ with input via spray drift."></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -51,10 +57,8 @@ with input via spray drift.</p> <span> water_depth <span class="op">=</span> <span class="fu">as_units</span><span class="op">(</span><span class="st">"30 cm"</span><span class="op">)</span>,</span> <span> drift_percentages <span class="op">=</span> <span class="cn">NULL</span>,</span> <span> drift_data <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"JKI"</span>, <span class="st">"RF"</span><span class="op">)</span>,</span> -<span> crop_group_JKI <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Ackerbau"</span>, <span class="st">"Obstbau frueh"</span>, <span class="st">"Obstbau spaet"</span>, <span class="st">"Weinbau frueh"</span>,</span> -<span> <span class="st">"Weinbau spaet"</span>, <span class="st">"Hopfenbau"</span>, <span class="st">"Flaechenkulturen > 900 l/ha"</span>, <span class="st">"Gleisanlagen"</span><span class="op">)</span>,</span> -<span> crop_group_RF <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"arable"</span>, <span class="st">"hops"</span>, <span class="st">"vines, late"</span>, <span class="st">"vines, early"</span>, <span class="st">"fruit, late"</span>,</span> -<span> <span class="st">"fruit, early"</span>, <span class="st">"aerial"</span><span class="op">)</span>,</span> +<span> crop_group_JKI <span class="op">=</span> <span class="st">"Ackerbau"</span>,</span> +<span> crop_group_RF <span class="op">=</span> <span class="st">"arable"</span>,</span> <span> distances <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">5</span>, <span class="fl">10</span>, <span class="fl">20</span><span class="op">)</span>,</span> <span> formula <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Rautmann"</span>, <span class="st">"FOCUS"</span><span class="op">)</span>,</span> <span> water_width <span class="op">=</span> <span class="fu">as_units</span><span class="op">(</span><span class="st">"100 cm"</span><span class="op">)</span>,</span> @@ -83,7 +87,8 @@ with input via spray drift.</p> <dt id="arg-drift-percentages">drift_percentages<a class="anchor" aria-label="anchor" href="#arg-drift-percentages"></a></dt> <dd><p>Percentage drift values for which to calculate PECsw. -Overrides 'drift_data' and 'distances' if not NULL.</p></dd> +Overrides 'drift_data', 'distances', 'applications', crop group and +formula arguments if not NULL.</p></dd> <dt id="arg-drift-data">drift_data<a class="anchor" aria-label="anchor" href="#arg-drift-data"></a></dt> @@ -95,11 +100,16 @@ on the 'formula' argument.</p></dd> <dt id="arg-crop-group-jki">crop_group_JKI<a class="anchor" aria-label="anchor" href="#arg-crop-group-jki"></a></dt> <dd><p>When using the 'JKI' drift data, one of the German names -as used in <a href="drift_parameters_focus.html">drift_parameters_focus</a>. Will only be used if drift_data is 'JKI'.</p></dd> +as used in <a href="drift_data_JKI.html">drift_data_JKI</a>. Will only be used if drift_data is 'JKI'. Available +crop groups are "Ackerbau", "Obstbau frueh", "Obstbau spaet", +"Weinbau frueh", "Weinbau spaet", "Hopfenbau", "Flaechenkulturen > 900 l/ha" and +"Gleisanlagen".</p></dd> <dt id="arg-crop-group-rf">crop_group_RF<a class="anchor" aria-label="anchor" href="#arg-crop-group-rf"></a></dt> -<dd><p>One of the crop groups as used in <a href="drift_parameters_focus.html">drift_parameters_focus</a></p></dd> +<dd><p>Crop group(s) as used in <a href="drift_parameters_focus.html">drift_parameters_focus</a>, i.e. +"arable", "hops", "vines, late", "vines, early", "fruit, late", "fruit, early" +or "aerial".</p></dd> <dt id="arg-distances">distances<a class="anchor" aria-label="anchor" href="#arg-distances"></a></dt> @@ -132,12 +142,17 @@ if the specified rate does not have <a href="https://r-quantities.github.io/unit </dl></div> <div class="section level2"> <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> - <p>The predicted concentration in surface water</p> + <p>A numeric vector with the predicted concentration in surface water. +In some cases, the vector is named with distances or drift percentages, for +backward compatibility with versions before the vectorisation of arguments +other than 'distances' was introduced in v0.6.5.</p> </div> <div class="section level2"> <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> <p>It is recommened to specify the arguments <code>rate</code>, <code>water_depth</code> and <code>water_width</code> using <a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">units::units</a> from the <code>units</code> package.</p> +<p>Since pfm version 0.6.5, the function is vectorised with respect to rates, +applications, water depth, crop groups and distances</p> </div> <div class="section level2"> <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> @@ -169,6 +184,16 @@ if the specified rate does not have <a href="https://r-quantities.github.io/unit <span class="r-out co"><span class="r-pr">#></span> 100 m </span> <span class="r-out co"><span class="r-pr">#></span> 0.01018774 </span> <span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># We can also specify distance units explicitly</span></span></span> +<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://r-quantities.github.io/units/" class="external-link">units</a></span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> udunits database from /usr/share/xml/udunits/udunits2.xml</span> +<span class="r-in"><span><span class="fu">PEC_sw_drift</span><span class="op">(</span><span class="fl">100</span>, distances <span class="op">=</span> <span class="fu"><a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">set_units</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">6</span>, <span class="fl">10</span>, <span class="fl">20</span>, <span class="fl">50</span>, <span class="fl">100</span><span class="op">)</span>, <span class="st">"m"</span><span class="op">)</span>, drift_data <span class="op">=</span> <span class="st">"RF"</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Units: [µg/L]</span> +<span class="r-out co"><span class="r-pr">#></span> 1 m 3 m 5 m 6 m 10 m 20 m 50 m </span> +<span class="r-out co"><span class="r-pr">#></span> 0.91976667 0.31415827 0.19064473 0.15951494 0.09680051 0.04915079 0.02006434 </span> +<span class="r-out co"><span class="r-pr">#></span> 100 m </span> +<span class="r-out co"><span class="r-pr">#></span> 0.01018774 </span> +<span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># or consider aerial application</span></span></span> <span class="r-in"><span><span class="fu">PEC_sw_drift</span><span class="op">(</span><span class="fl">100</span>, distances <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">6</span>, <span class="fl">10</span>, <span class="fl">20</span>, <span class="fl">50</span>, <span class="fl">100</span><span class="op">)</span>, drift_data <span class="op">=</span> <span class="st">"RF"</span>,</span></span> <span class="r-in"><span> crop_group_RF <span class="op">=</span> <span class="st">"aerial"</span><span class="op">)</span></span></span> @@ -208,6 +233,43 @@ if the specified rate does not have <a href="https://r-quantities.github.io/unit <span class="r-out co"><span class="r-pr">#></span> Units: [µg/L]</span> <span class="r-out co"><span class="r-pr">#></span> 1 m 5 m 10 m 20 m </span> <span class="r-out co"><span class="r-pr">#></span> 0.60169999 0.18937304 0.10402698 0.05517095 </span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># The function is vectorised with respect to rates, applications, water depth,</span></span></span> +<span class="r-in"><span><span class="co"># crop groups and distances</span></span></span> +<span class="r-in"><span><span class="fu">PEC_sw_drift</span><span class="op">(</span></span></span> +<span class="r-in"><span> rate <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">100</span>, <span class="fl">6</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> applications <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">2</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">4</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> water_depth <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">30</span>, <span class="fl">30</span>, <span class="fl">30</span>, <span class="fl">60</span>, <span class="fl">30</span>, <span class="fl">30</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> crop_group_JKI <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"Ackerbau"</span>, <span class="fl">4</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"Obstbau frueh"</span>, <span class="fl">2</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> distances <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">5</span>, <span class="fl">4</span><span class="op">)</span>, <span class="fl">10</span>, <span class="fl">5</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Units: [µg/L]</span> +<span class="r-out co"><span class="r-pr">#></span> 5 m 5 m 5 m 5 m 10 m 5 m </span> +<span class="r-out co"><span class="r-pr">#></span> 0.1900000 0.1566667 0.1900000 0.0950000 3.9366667 6.6300000 </span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Try the same with the Rautmann formula</span></span></span> +<span class="r-in"><span><span class="fu">PEC_sw_drift</span><span class="op">(</span></span></span> +<span class="r-in"><span> rate <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">100</span>, <span class="fl">6</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> applications <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">2</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">4</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> water_depth <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">30</span>, <span class="fl">30</span>, <span class="fl">30</span>, <span class="fl">60</span>, <span class="fl">30</span>, <span class="fl">30</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> drift_data <span class="op">=</span> <span class="st">"RF"</span>,</span></span> +<span class="r-in"><span> crop_group_RF <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"arable"</span>, <span class="fl">4</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"fruit, early"</span>, <span class="fl">2</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> distances <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">5</span>, <span class="fl">4</span><span class="op">)</span>, <span class="fl">10</span>, <span class="fl">5</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Units: [µg/L]</span> +<span class="r-out co"><span class="r-pr">#></span> 5 m 5 m 5 m 5 m 10 m 5 m </span> +<span class="r-out co"><span class="r-pr">#></span> 0.19064473 0.15991216 0.19064473 0.09532236 3.93566026 6.62814740 </span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># And with the FOCUS variant</span></span></span> +<span class="r-in"><span><span class="fu">PEC_sw_drift</span><span class="op">(</span></span></span> +<span class="r-in"><span> rate <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">100</span>, <span class="fl">6</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> applications <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">2</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">4</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> water_depth <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">30</span>, <span class="fl">30</span>, <span class="fl">30</span>, <span class="fl">60</span>, <span class="fl">30</span>, <span class="fl">30</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> drift_data <span class="op">=</span> <span class="st">"RF"</span>,</span></span> +<span class="r-in"><span> formula <span class="op">=</span> <span class="st">"FOCUS"</span>,</span></span> +<span class="r-in"><span> crop_group_RF <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"arable"</span>, <span class="fl">4</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"fruit, early"</span>, <span class="fl">2</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> distances <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">5</span>, <span class="fl">4</span><span class="op">)</span>, <span class="fl">10</span>, <span class="fl">5</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Units: [µg/L]</span> +<span class="r-out co"><span class="r-pr">#></span> 5 m 5 m 5 m 5 m 10 m 5 m </span> +<span class="r-out co"><span class="r-pr">#></span> 0.1741454 0.1456444 0.1741454 0.0870727 3.7957683 6.1809560 </span> </code></pre></div> </div> </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> @@ -219,7 +281,7 @@ if the specified rate does not have <a href="https://r-quantities.github.io/unit </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/PEC_sw_drift.md b/docs/reference/PEC_sw_drift.md new file mode 100644 index 0000000..375427e --- /dev/null +++ b/docs/reference/PEC_sw_drift.md @@ -0,0 +1,237 @@ +# Calculate predicted environmental concentrations in surface water due to drift + +This is a basic, vectorised form of a simple calculation of a +contaminant concentration in surface water based on complete, +instantaneous mixing with input via spray drift. + +## Usage + +``` r +PEC_sw_drift( + rate, + applications = 1, + water_depth = as_units("30 cm"), + drift_percentages = NULL, + drift_data = c("JKI", "RF"), + crop_group_JKI = "Ackerbau", + crop_group_RF = "arable", + distances = c(1, 5, 10, 20), + formula = c("Rautmann", "FOCUS"), + water_width = as_units("100 cm"), + side_angle = 90, + rate_units = "g/ha", + PEC_units = "µg/L" +) +``` + +## Arguments + +- rate: + + Application rate in units specified below, or with units defined via + the `units` package. + +- applications: + + Number of applications for selection of drift percentile + +- water_depth: + + Depth of the water body in cm + +- drift_percentages: + + Percentage drift values for which to calculate PECsw. Overrides + 'drift_data', 'distances', 'applications', crop group and formula + arguments if not NULL. + +- drift_data: + + Source of drift percentage data. If 'JKI', the + [drift_data_JKI](https://pkgdown.jrwb.de/pfm/reference/drift_data_JKI.md) + included in the package is used. If 'RF', the Rautmann drift data are + calculated either in the original form or integrated over the width of + the water body, depending on the 'formula' argument. + +- crop_group_JKI: + + When using the 'JKI' drift data, one of the German names as used in + [drift_data_JKI](https://pkgdown.jrwb.de/pfm/reference/drift_data_JKI.md). + Will only be used if drift_data is 'JKI'. Available crop groups are + "Ackerbau", "Obstbau frueh", "Obstbau spaet", "Weinbau frueh", + "Weinbau spaet", "Hopfenbau", "Flaechenkulturen \> 900 l/ha" and + "Gleisanlagen". + +- crop_group_RF: + + Crop group(s) as used in + [drift_parameters_focus](https://pkgdown.jrwb.de/pfm/reference/drift_parameters_focus.md), + i.e. "arable", "hops", "vines, late", "vines, early", "fruit, late", + "fruit, early" or "aerial". + +- distances: + + The distances in m for which to get PEC values + +- formula: + + By default, the original Rautmann formula is used. If you specify + "FOCUS", mean drift input over the width of the water body is + calculated as described in Chapter 5.4.5 of the FOCUS surface water + guidance + +- water_width: + + Width of the water body in cm + +- side_angle: + + The angle of the side of the water relative to the bottom which is + assumed to be horizontal, in degrees. The SYNOPS model assumes 45 + degrees here. + +- rate_units: + + Defaults to g/ha. For backwards compatibility, only used if the + specified rate does not have + [units::units](https://r-quantities.github.io/units/reference/units.html)\]. + +- PEC_units: + + Requested units for the calculated PEC. Only µg/L currently supported + +## Value + +A numeric vector with the predicted concentration in surface water. In +some cases, the vector is named with distances or drift percentages, for +backward compatibility with versions before the vectorisation of +arguments other than 'distances' was introduced in v0.6.5. + +## Details + +It is recommened to specify the arguments `rate`, `water_depth` and +`water_width` using +[units::units](https://r-quantities.github.io/units/reference/units.html) +from the `units` package. + +Since pfm version 0.6.5, the function is vectorised with respect to +rates, applications, water depth, crop groups and distances + +## See also + +[drift_parameters_focus](https://pkgdown.jrwb.de/pfm/reference/drift_parameters_focus.md), +[drift_percentages_rautmann](https://pkgdown.jrwb.de/pfm/reference/drift_percentages_rautmann.md) + +## Author + +Johannes Ranke + +## Examples + +``` r +PEC_sw_drift(100) +#> Units: [µg/L] +#> 1 m 5 m 10 m 20 m +#> 0.92333333 0.19000000 0.09666667 0.05000000 +# Alternatively, we can use the formula for a single application to +# "Ackerbau" from the paper +PEC_sw_drift(100, drift_data = "RF") +#> Units: [µg/L] +#> 1 m 5 m 10 m 20 m +#> 0.91976667 0.19064473 0.09680051 0.04915079 + +# This makes it possible to also use different distances +PEC_sw_drift(100, distances = c(1, 3, 5, 6, 10, 20, 50, 100), drift_data = "RF") +#> Units: [µg/L] +#> 1 m 3 m 5 m 6 m 10 m 20 m 50 m +#> 0.91976667 0.31415827 0.19064473 0.15951494 0.09680051 0.04915079 0.02006434 +#> 100 m +#> 0.01018774 + +# We can also specify distance units explicitly +library(units) +#> udunits database from /usr/share/xml/udunits/udunits2.xml +PEC_sw_drift(100, distances = set_units(c(1, 3, 5, 6, 10, 20, 50, 100), "m"), drift_data = "RF") +#> Units: [µg/L] +#> 1 m 3 m 5 m 6 m 10 m 20 m 50 m +#> 0.91976667 0.31415827 0.19064473 0.15951494 0.09680051 0.04915079 0.02006434 +#> 100 m +#> 0.01018774 + +# or consider aerial application +PEC_sw_drift(100, distances = c(1, 3, 5, 6, 10, 20, 50, 100), drift_data = "RF", + crop_group_RF = "aerial") +#> Units: [µg/L] +#> 1 m 3 m 5 m 6 m 10 m 20 m 50 m +#> 16.8233333 11.0585820 9.0986174 8.4866460 6.9825178 4.7004640 1.8820816 +#> 100 m +#> 0.9417586 + +# Using custom drift percentages is also supported +PEC_sw_drift(100, drift_percentages = c(2.77, 0.95, 0.57, 0.48, 0.29, 0.15, 0.06, 0.03)) +#> Units: [µg/L] +#> 2.77 % 0.95 % 0.57 % 0.48 % 0.29 % 0.15 % 0.06 % +#> 0.92333333 0.31666667 0.19000000 0.16000000 0.09666667 0.05000000 0.02000000 +#> 0.03 % +#> 0.01000000 + +# The influence of assuming a 45° angle of the sides of the waterbody and the width of the +# waterbody can be illustrated +PEC_sw_drift(100) +#> Units: [µg/L] +#> 1 m 5 m 10 m 20 m +#> 0.92333333 0.19000000 0.09666667 0.05000000 +PEC_sw_drift(100, drift_data = "RF") +#> Units: [µg/L] +#> 1 m 5 m 10 m 20 m +#> 0.91976667 0.19064473 0.09680051 0.04915079 +PEC_sw_drift(100, drift_data = "RF", formula = "FOCUS") +#> Units: [µg/L] +#> 1 m 5 m 10 m 20 m +#> 0.64246407 0.17414541 0.09235842 0.04798749 +PEC_sw_drift(100, drift_data = "RF", formula = "FOCUS", side_angle = 45) +#> Units: [µg/L] +#> 1 m 5 m 10 m 20 m +#> 0.91780582 0.24877916 0.13194060 0.06855356 +PEC_sw_drift(100, drift_data = "RF", formula = "FOCUS", side_angle = 45, water_width = 200) +#> Units: [µg/L] +#> 1 m 5 m 10 m 20 m +#> 0.60169999 0.18937304 0.10402698 0.05517095 + +# The function is vectorised with respect to rates, applications, water depth, +# crop groups and distances +PEC_sw_drift( + rate = rep(100, 6), + applications = c(1, 2, rep(1, 4)), + water_depth = c(30, 30, 30, 60, 30, 30), + crop_group_JKI = c(rep("Ackerbau", 4), rep("Obstbau frueh", 2)), + distances = c(rep(5, 4), 10, 5)) +#> Units: [µg/L] +#> 5 m 5 m 5 m 5 m 10 m 5 m +#> 0.1900000 0.1566667 0.1900000 0.0950000 3.9366667 6.6300000 + +# Try the same with the Rautmann formula +PEC_sw_drift( + rate = rep(100, 6), + applications = c(1, 2, rep(1, 4)), + water_depth = c(30, 30, 30, 60, 30, 30), + drift_data = "RF", + crop_group_RF = c(rep("arable", 4), rep("fruit, early", 2)), + distances = c(rep(5, 4), 10, 5)) +#> Units: [µg/L] +#> 5 m 5 m 5 m 5 m 10 m 5 m +#> 0.19064473 0.15991216 0.19064473 0.09532236 3.93566026 6.62814740 + +# And with the FOCUS variant +PEC_sw_drift( + rate = rep(100, 6), + applications = c(1, 2, rep(1, 4)), + water_depth = c(30, 30, 30, 60, 30, 30), + drift_data = "RF", + formula = "FOCUS", + crop_group_RF = c(rep("arable", 4), rep("fruit, early", 2)), + distances = c(rep(5, 4), 10, 5)) +#> Units: [µg/L] +#> 5 m 5 m 5 m 5 m 10 m 5 m +#> 0.1741454 0.1456444 0.1741454 0.0870727 3.7957683 6.1809560 +``` diff --git a/docs/reference/PEC_sw_exposit_drainage.html b/docs/reference/PEC_sw_exposit_drainage.html index a2dab7e..59e0ef5 100644 --- a/docs/reference/PEC_sw_exposit_drainage.html +++ b/docs/reference/PEC_sw_exposit_drainage.html @@ -1,17 +1,27 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate PEC surface water due to drainage as in Exposit 3 — PEC_sw_exposit_drainage • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate PEC surface water due to drainage as in Exposit 3 — PEC_sw_exposit_drainage"><meta name="description" content='This is a reimplementation of the calculation described in the Exposit 3.02 spreadsheet file, +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate PEC surface water due to drainage as in Exposit 3 — PEC_sw_exposit_drainage • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate PEC surface water due to drainage as in Exposit 3 — PEC_sw_exposit_drainage"><meta name="description" content='This is a reimplementation of the calculation described in the Exposit 3.02 spreadsheet file, in the worksheet "Konzept Drainage". Although there are four groups of compounds ("Gefährdungsgruppen"), only one distinction is made in the calculations, between compounds with low mobility (group 1) and compounds with modest to high mobility (groups 2, 3 and 4). In this implementation, the group is derived only from the Koc, if not given explicitly. For -details, see the discussion of the function arguments below.'><meta property="og:description" content='This is a reimplementation of the calculation described in the Exposit 3.02 spreadsheet file, +details, see the discussion of the function arguments below. +It is recommened to specify the arguments rate, Koc, DT50, t_drainage, +V_ditch and V_drainage using units::units from the units package.'><meta property="og:description" content='This is a reimplementation of the calculation described in the Exposit 3.02 spreadsheet file, in the worksheet "Konzept Drainage". Although there are four groups of compounds ("Gefährdungsgruppen"), only one distinction is made in the calculations, between compounds with low mobility (group 1) and compounds with modest to high mobility (groups 2, 3 and 4). In this implementation, the group is derived only from the Koc, if not given explicitly. For -details, see the discussion of the function arguments below.'></head><body> +details, see the discussion of the function arguments below. +It is recommened to specify the arguments rate, Koc, DT50, t_drainage, +V_ditch and V_drainage using units::units from the units package.'></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -19,7 +29,7 @@ details, see the discussion of the function arguments below.'></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -52,7 +62,9 @@ compounds ("Gefährdungsgruppen"), only one distinction is made in the calculations, between compounds with low mobility (group 1) and compounds with modest to high mobility (groups 2, 3 and 4). In this implementation, the group is derived only from the Koc, if not given explicitly. For -details, see the discussion of the function arguments below.</p> +details, see the discussion of the function arguments below. +It is recommened to specify the arguments <code>rate</code>, <code>Koc</code>, <code>DT50</code>, <code>t_drainage</code>, +<code>V_ditch</code> and <code>V_drainage</code> using <a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">units::units</a> from the <code>units</code> package.</p> </div> <div class="section level2"> @@ -62,10 +74,10 @@ details, see the discussion of the function arguments below.</p> <span> interception <span class="op">=</span> <span class="fl">0</span>,</span> <span> Koc <span class="op">=</span> <span class="cn">NA</span>,</span> <span> mobility <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="cn">NA</span>, <span class="st">"low"</span>, <span class="st">"high"</span><span class="op">)</span>,</span> -<span> DT50 <span class="op">=</span> <span class="cn">Inf</span>,</span> -<span> t_drainage <span class="op">=</span> <span class="fl">3</span>,</span> -<span> V_ditch <span class="op">=</span> <span class="fl">30</span>,</span> -<span> V_drainage <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>spring <span class="op">=</span> <span class="fl">10</span>, autumn <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>,</span> +<span> DT50 <span class="op">=</span> <span class="fu"><a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">set_units</a></span><span class="op">(</span><span class="cn">Inf</span>, <span class="st">"d"</span><span class="op">)</span>,</span> +<span> t_drainage <span class="op">=</span> <span class="fu"><a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">set_units</a></span><span class="op">(</span><span class="fl">3</span>, <span class="st">"days"</span><span class="op">)</span>,</span> +<span> V_ditch <span class="op">=</span> <span class="fu"><a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">set_units</a></span><span class="op">(</span><span class="fl">30</span>, <span class="st">"m3"</span><span class="op">)</span>,</span> +<span> V_drainage <span class="op">=</span> <span class="fu"><a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">set_units</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>spring <span class="op">=</span> <span class="fl">10</span>, autumn <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>, <span class="st">"m3"</span><span class="op">)</span>,</span> <span> dilution <span class="op">=</span> <span class="fl">2</span></span> <span><span class="op">)</span></span></code></pre></div> </div> @@ -148,6 +160,7 @@ scenarios. If the rate was given in g/ha, the PECsw are in microg/L.</p></dd> <span class="r-out co"><span class="r-pr">#></span> 12.5 25.0 </span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> $PEC_sw_drainage</span> +<span class="r-out co"><span class="r-pr">#></span> Units: [µg/L]</span> <span class="r-out co"><span class="r-pr">#></span> spring autumn </span> <span class="r-out co"><span class="r-pr">#></span> 1.562500 4.807692 </span> <span class="r-out co"><span class="r-pr">#></span> </span> @@ -162,7 +175,7 @@ scenarios. If the rate was given in g/ha, the PECsw are in microg/L.</p></dd> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/PEC_sw_exposit_drainage.md b/docs/reference/PEC_sw_exposit_drainage.md new file mode 100644 index 0000000..cc626d9 --- /dev/null +++ b/docs/reference/PEC_sw_exposit_drainage.md @@ -0,0 +1,119 @@ +# Calculate PEC surface water due to drainage as in Exposit 3 + +This is a reimplementation of the calculation described in the Exposit +3.02 spreadsheet file, in the worksheet "Konzept Drainage". Although +there are four groups of compounds ("Gefährdungsgruppen"), only one +distinction is made in the calculations, between compounds with low +mobility (group 1) and compounds with modest to high mobility (groups 2, +3 and 4). In this implementation, the group is derived only from the +Koc, if not given explicitly. For details, see the discussion of the +function arguments below. It is recommened to specify the arguments +`rate`, `Koc`, `DT50`, `t_drainage`, `V_ditch` and `V_drainage` using +[units::units](https://r-quantities.github.io/units/reference/units.html) +from the `units` package. + +## Usage + +``` r +PEC_sw_exposit_drainage( + rate, + interception = 0, + Koc = NA, + mobility = c(NA, "low", "high"), + DT50 = set_units(Inf, "d"), + t_drainage = set_units(3, "days"), + V_ditch = set_units(30, "m3"), + V_drainage = set_units(c(spring = 10, autumn = 100), "m3"), + dilution = 2 +) +``` + +## Source + +Excel 3.02 spreadsheet available from +<https://www.bvl.bund.de/SharedDocs/Downloads/04_Pflanzenschutzmittel/zul_umwelt_exposit.html> + +## Arguments + +- rate: + + The application rate in g/ha + +- interception: + + The fraction intercepted by the crop + +- Koc: + + The sorption coefficient to soil organic carbon used to determine the + mobility. A trigger value of 550 L/kg is used in order to decide if + Koc \>\> 500. + +- mobility: + + Overrides what is determined from the Koc. + +- DT50: + + The soil half-life in days + +- t_drainage: + + The time between application and the drainage event, where degradation + occurs, in days + +- V_ditch: + + The volume of the ditch is assumed to be 1 m \* 100 m \* 30 cm = 30 m3 + +- V_drainage: + + The drainage volume, equivalent to 1 mm precipitation on 1 ha for + spring/summer or 10 mm for autumn/winter/early spring. + +- dilution: + + The dilution factor + +## Value + +A list containing the following components + +- perc_drainage_total: + + Gesamtaustrag (total fraction of the residue drained) + +- perc_peak: + + Stoßbelastung (fraction drained at event) + +- PEC_sw_drainage: + + A matrix containing PEC values for the spring and autumn scenarios. If + the rate was given in g/ha, the PECsw are in microg/L. + +## See also + +[`perc_runoff_exposit`](https://pkgdown.jrwb.de/pfm/reference/perc_runoff_exposit.md) +for runoff loss percentages and +[`perc_runoff_reduction_exposit`](https://pkgdown.jrwb.de/pfm/reference/perc_runoff_reduction_exposit.md) +for runoff reduction percentages used + +## Examples + +``` r + PEC_sw_exposit_drainage(500, Koc = 150) +#> $perc_drainage_total +#> spring autumn +#> 0.2 1.0 +#> +#> $perc_peak +#> spring autumn +#> 12.5 25.0 +#> +#> $PEC_sw_drainage +#> Units: [µg/L] +#> spring autumn +#> 1.562500 4.807692 +#> +``` diff --git a/docs/reference/PEC_sw_exposit_runoff.html b/docs/reference/PEC_sw_exposit_runoff.html index cd57c99..b5f8f85 100644 --- a/docs/reference/PEC_sw_exposit_runoff.html +++ b/docs/reference/PEC_sw_exposit_runoff.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate PEC surface water due to runoff and erosion as in Exposit 3 — PEC_sw_exposit_runoff • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate PEC surface water due to runoff and erosion as in Exposit 3 — PEC_sw_exposit_runoff"><meta name="description" content='This is a reimplementation of the calculation described in the Exposit 3.02 spreadsheet file, +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate PEC surface water due to runoff and erosion as in Exposit 3 — PEC_sw_exposit_runoff • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate PEC surface water due to runoff and erosion as in Exposit 3 — PEC_sw_exposit_runoff"><meta name="description" content='This is a reimplementation of the calculation described in the Exposit 3.02 spreadsheet file, in the worksheet "Konzept Runoff".'><meta property="og:description" content='This is a reimplementation of the calculation described in the Exposit 3.02 spreadsheet file, in the worksheet "Konzept Runoff".'></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -9,7 +15,7 @@ in the worksheet "Konzept Runoff".'></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -46,11 +52,11 @@ in the worksheet "Konzept Runoff".</p> <span> <span class="va">rate</span>,</span> <span> interception <span class="op">=</span> <span class="fl">0</span>,</span> <span> <span class="va">Koc</span>,</span> -<span> DT50 <span class="op">=</span> <span class="fu">set_units</span><span class="op">(</span><span class="cn">Inf</span>, <span class="st">"d"</span><span class="op">)</span>,</span> -<span> t_runoff <span class="op">=</span> <span class="fu">set_units</span><span class="op">(</span><span class="fl">3</span>, <span class="st">"days"</span><span class="op">)</span>,</span> +<span> DT50 <span class="op">=</span> <span class="fu"><a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">set_units</a></span><span class="op">(</span><span class="cn">Inf</span>, <span class="st">"d"</span><span class="op">)</span>,</span> +<span> t_runoff <span class="op">=</span> <span class="fu"><a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">set_units</a></span><span class="op">(</span><span class="fl">3</span>, <span class="st">"days"</span><span class="op">)</span>,</span> <span> exposit_reduction_version <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"3.02"</span>, <span class="st">"3.01a"</span>, <span class="st">"3.01a2"</span>, <span class="st">"2.0"</span><span class="op">)</span>,</span> -<span> V_ditch <span class="op">=</span> <span class="fu">set_units</span><span class="op">(</span><span class="fl">30</span>, <span class="st">"m3"</span><span class="op">)</span>,</span> -<span> V_event <span class="op">=</span> <span class="fu">set_units</span><span class="op">(</span><span class="fl">100</span>, <span class="st">"m3"</span><span class="op">)</span>,</span> +<span> V_ditch <span class="op">=</span> <span class="fu"><a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">set_units</a></span><span class="op">(</span><span class="fl">30</span>, <span class="st">"m3"</span><span class="op">)</span>,</span> +<span> V_event <span class="op">=</span> <span class="fu"><a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">set_units</a></span><span class="op">(</span><span class="fl">100</span>, <span class="st">"m3"</span><span class="op">)</span>,</span> <span> dilution <span class="op">=</span> <span class="fl">2</span></span> <span><span class="op">)</span></span></code></pre></div> </div> @@ -65,7 +71,8 @@ in the worksheet "Konzept Runoff".</p> <dl><dt id="arg-rate">rate<a class="anchor" aria-label="anchor" href="#arg-rate"></a></dt> -<dd><p>The application rate in g/ha</p></dd> +<dd><p>Application rate in g/ha or with a compatible unit specified +with the units package</p></dd> <dt id="arg-interception">interception<a class="anchor" aria-label="anchor" href="#arg-interception"></a></dt> @@ -113,7 +120,7 @@ and the bound fraction.</p></dd> <dd><p>A matrix containing dissolved and bound input for the different distances</p></dd> <dt>PEC_sw_runoff</dt> -<dd><p>A matrix containing PEC values for dissolved and bound substance +<dd><p>A dataframe containing PEC values for dissolved and bound substance for the different distances. If the rate was given in g/ha, the PECsw are in microg/L.</p></dd> @@ -183,7 +190,7 @@ using <a href="https://r-quantities.github.io/units/reference/units.html" class= </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/PEC_sw_exposit_runoff.md b/docs/reference/PEC_sw_exposit_runoff.md new file mode 100644 index 0000000..d5bcda2 --- /dev/null +++ b/docs/reference/PEC_sw_exposit_runoff.md @@ -0,0 +1,150 @@ +# Calculate PEC surface water due to runoff and erosion as in Exposit 3 + +This is a reimplementation of the calculation described in the Exposit +3.02 spreadsheet file, in the worksheet "Konzept Runoff". + +## Usage + +``` r +PEC_sw_exposit_runoff( + rate, + interception = 0, + Koc, + DT50 = set_units(Inf, "d"), + t_runoff = set_units(3, "days"), + exposit_reduction_version = c("3.02", "3.01a", "3.01a2", "2.0"), + V_ditch = set_units(30, "m3"), + V_event = set_units(100, "m3"), + dilution = 2 +) +``` + +## Source + +Excel 3.02 spreadsheet available from +<https://www.bvl.bund.de/SharedDocs/Downloads/04_Pflanzenschutzmittel/zul_umwelt_exposit.html> + +## Arguments + +- rate: + + Application rate in g/ha or with a compatible unit specified with the + units package + +- interception: + + The fraction intercepted by the crop + +- Koc: + + The sorption coefficient to soil organic carbon + +- DT50: + + The soil half-life in days + +- t_runoff: + + The time between application and the runoff event, where degradation + occurs, in days + +- exposit_reduction_version: + + The version of the reduction factors to be used. "3.02" is the current + version used in Germany, "3.01a" is the version with additional + percentages for 3 m and 6 m buffer zones used in Switzerland. "3.01a2" + is a version introduced for consistency with previous calculations + performed for a 3 m buffer zone in Switzerland, with the same + reduction being applied to the dissolved and the bound fraction. + +- V_ditch: + + The volume of the ditch is assumed to be 1 m \* 100 m \* 30 cm = 30 m3 + +- V_event: + + The unreduced runoff volume, equivalent to 10 mm precipitation on 1 ha + +- dilution: + + The dilution factor + +## Value + +A list containing the following components + +- perc_runoff: + + The runoff percentages for dissolved and bound substance + +- runoff: + + A matrix containing dissolved and bound input for the different + distances + +- PEC_sw_runoff: + + A dataframe containing PEC values for dissolved and bound substance + for the different distances. If the rate was given in g/ha, the PECsw + are in microg/L. + +## Details + +It is recommened to specify the arguments `rate`, `Koc`, `DT50`, +`t_runoff`, `V_ditch` and `V_event` using +[units::units](https://r-quantities.github.io/units/reference/units.html) +from the `units` package. + +## See also + +[`perc_runoff_exposit`](https://pkgdown.jrwb.de/pfm/reference/perc_runoff_exposit.md) +for runoff loss percentages and +[`perc_runoff_reduction_exposit`](https://pkgdown.jrwb.de/pfm/reference/perc_runoff_reduction_exposit.md) +for runoff reduction percentages used + +## Examples + +``` r + PEC_sw_exposit_runoff(500, Koc = 150) +#> $perc_runoff +#> dissolved bound +#> 0.248 0.001 +#> +#> $runoff +#> dissolved bound total +#> No buffer 1.240 [g] 0.00500 [g] 1.24500 [g] +#> 5 m 0.744 [g] 0.00300 [g] 0.74700 [g] +#> 10 m 0.496 [g] 0.00075 [g] 0.49675 [g] +#> 20 m 0.248 [g] 0.00025 [g] 0.24825 [g] +#> +#> $PEC_sw_runoff +#> dissolved bound total +#> No buffer 4.769231 [µg/L] 0.019230769 [µg/L] 4.788462 [µg/L] +#> 5 m 4.133333 [µg/L] 0.016666667 [µg/L] 4.150000 [µg/L] +#> 10 m 3.542857 [µg/L] 0.005357143 [µg/L] 3.548214 [µg/L] +#> 20 m 2.480000 [µg/L] 0.002500000 [µg/L] 2.482500 [µg/L] +#> + PEC_sw_exposit_runoff(600, Koc = 10000, DT50 = 195, exposit = "3.01a") +#> $perc_runoff +#> dissolved bound +#> 0.037 0.159 +#> +#> $runoff +#> dissolved bound total +#> No buffer 0.21964521 [g] 0.94388078 [g] 1.16352600 [g] +#> 3 m 0.16473391 [g] 0.66071655 [g] 0.82545046 [g] +#> 5 m 0.13178713 [g] 0.56632847 [g] 0.69811560 [g] +#> 6 m 0.12080487 [g] 0.42474635 [g] 0.54555122 [g] +#> 10 m 0.08785809 [g] 0.14158212 [g] 0.22944020 [g] +#> 20 m 0.04392904 [g] 0.04719404 [g] 0.09112308 [g] +#> +#> $PEC_sw_runoff +#> dissolved bound total +#> No buffer 0.8447893 [µg/L] 3.6303107 [µg/L] 4.4751000 [µg/L] +#> 3 m 0.7844472 [µg/L] 3.1462693 [µg/L] 3.9307165 [µg/L] +#> 5 m 0.7321507 [µg/L] 3.1462693 [µg/L] 3.8784200 [µg/L] +#> 6 m 0.7106169 [µg/L] 2.4985080 [µg/L] 3.2091248 [µg/L] +#> 10 m 0.6275578 [µg/L] 1.0113008 [µg/L] 1.6388586 [µg/L] +#> 20 m 0.4392904 [µg/L] 0.4719404 [µg/L] 0.9112308 [µg/L] +#> +``` diff --git a/docs/reference/PEC_sw_focus.html b/docs/reference/PEC_sw_focus.html index d91d957..61887c1 100644 --- a/docs/reference/PEC_sw_focus.html +++ b/docs/reference/PEC_sw_focus.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate PEC surface water at FOCUS Step 1 — PEC_sw_focus • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate PEC surface water at FOCUS Step 1 — PEC_sw_focus"><meta name="description" content="This is a reimplementation of the FOCUS Step 1 and 2 calculator version 3.2, +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate PEC surface water at FOCUS Step 1 — PEC_sw_focus • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate PEC surface water at FOCUS Step 1 — PEC_sw_focus"><meta name="description" content="This is a reimplementation of the FOCUS Step 1 and 2 calculator version 3.2, authored by Michael Klein, in R. 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 @@ -19,7 +25,7 @@ the FOCUS calculator."></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -296,7 +302,7 @@ http://esdac.jrc.ec.europa.eu/projects/stepsonetwo</p> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/PEC_sw_focus.md b/docs/reference/PEC_sw_focus.md new file mode 100644 index 0000000..aa87968 --- /dev/null +++ b/docs/reference/PEC_sw_focus.md @@ -0,0 +1,241 @@ +# Calculate PEC surface water at FOCUS Step 1 + +This is a reimplementation of the FOCUS Step 1 and 2 calculator version +3.2, authored by Michael Klein, in R. 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. Only Step 1 PECs are calculated. However, input files +can be generated that are suitable as input for the FOCUS calculator. + +## Usage + +``` r +PEC_sw_focus( + parent, + rate, + n = 1, + i = NA, + comment = "", + met = NULL, + f_drift = NA, + f_rd = 0.1, + scenario = FOCUS_Step_12_scenarios$names, + region = c("n", "s"), + season = c(NA, "of", "mm", "js"), + interception = c("no interception", "minimal crop cover", "average crop cover", + "full canopy"), + met_form_water = TRUE, + txt_file = "pesticide.txt", + overwrite = FALSE, + append = FALSE +) +``` + +## Arguments + +- parent: + + A list containing substance specific parameters, e.g. conveniently + generated by + [chent_focus_sw](https://pkgdown.jrwb.de/pfm/reference/chent_focus_sw.md). + +- rate: + + The application rate in g/ha. Overriden when applications are given + explicitly + +- n: + + The number of applications + +- i: + + The application interval + +- comment: + + A comment for the input file + +- met: + + A list containing metabolite specific parameters. e.g. conveniently + generated by + [chent_focus_sw](https://pkgdown.jrwb.de/pfm/reference/chent_focus_sw.md). + If not NULL, the PEC is calculated for this compound, not the parent. + +- 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 + [FOCUS_Step_12_scenarios](https://pkgdown.jrwb.de/pfm/reference/FOCUS_Step_12_scenarios.md) + +- 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 + +- scenario: + + The name of the scenario. Must be one of the scenario names given in + [FOCUS_Step_12_scenarios](https://pkgdown.jrwb.de/pfm/reference/FOCUS_Step_12_scenarios.md) + +- region: + + 'n' for Northern Europe or 's' for Southern Europe. If NA, only Step 1 + PECsw are calculated + +- season: + + 'of' for October to February, 'mm' for March to May, and 'js' for June + to September. If NA, only step 1 PECsw are calculated + +- interception: + + One of 'no interception' (default), 'minimal crop cover', 'average + crop cover' or 'full canopy' + +- met_form_water: + + Should the metabolite formation in water be taken into account? This + can be switched off to check the influence and to compare with + previous versions of the Steps 12 calculator + +- txt_file: + + the name, and potentially the full path to the Steps.12 input text + file to which the specification of the run(s) should be written + +- overwrite: + + Should an existing file a the location specified in `txt_file` be + overwritten? Only takes effect if append is FALSE. + +- append: + + Should the input text file be appended, if it exists? + +## 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. As one +would expect, this appears to be (as we get the same results) calculated +by multiplying the application rate with the molar weight correction and +the formation fraction in water/sediment systems. + +Step 2 is not implemented. + +## 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 + +## Examples + +``` r +# Parent only +dummy_1 <- chent_focus_sw("Dummy 1", cwsat = 6000, DT50_ws = 6, Koc = 344.8) +PEC_sw_focus(dummy_1, 3000, f_drift = 0) +#> $f_drift +#> [1] 0 +#> +#> $eq_rate_drift_s +#> [1] 3000 +#> +#> $eq_rate_rd_s +#> [1] 3000 +#> +#> $eq_rate_rd_parent_s +#> [1] NA +#> +#> $input_drift_s +#> [1] 0 +#> +#> $input_rd_s +#> [1] 300 +#> +#> $f_rd_sw +#> [1] 0.6850566 +#> +#> $f_rd_sed +#> [1] 0.3149434 +#> +#> $PEC +#> type +#> Time PECsw TWAECsw PECsed TWAECsed +#> 0 6.850566e+02 NA 2.362075e+03 NA +#> 1 6.103161e+02 647.68635 2.104370e+03 2233.2225 +#> 2 5.437298e+02 612.03420 1.874780e+03 2110.2939 +#> 4 4.315586e+02 548.76030 1.488014e+03 1892.1255 +#> 7 3.051580e+02 469.88375 1.052185e+03 1620.1592 +#> 14 1.359325e+02 339.57370 4.686951e+02 1170.8501 +#> 21 6.055102e+01 257.45458 2.087799e+02 887.7034 +#> 28 2.697241e+01 203.47173 9.300089e+01 701.5705 +#> 42 5.352005e+00 140.10377 1.845371e+01 483.0778 +#> 50 2.123945e+00 118.24602 7.323361e+00 407.7123 +#> 100 6.585062e-03 59.30629 2.270529e-02 204.4881 +#> +#> $PEC_sw_max +#> [1] 685.0566 +#> +#> $PEC_sed_max +#> [1] 2362.075 +#> + +# Metabolite +new_dummy <- chent_focus_sw("New Dummy", mw = 250, Koc = 100) +M1 <- chent_focus_sw("M1", 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) +#> $f_drift +#> [1] 0.02759 +#> +#> $eq_rate_drift_s +#> [1] 0 +#> +#> $eq_rate_rd_s +#> [1] 200 +#> +#> $eq_rate_rd_parent_s +#> [1] 0 +#> +#> $input_drift_s +#> [1] 0 +#> +#> $input_rd_s +#> [1] 20 +#> +#> $f_rd_sw +#> [1] 0.9375 +#> +#> $f_rd_sed +#> [1] 0.0625 +#> +#> $PEC +#> type +#> Time PECsw TWAECsw PECsed TWAECsed +#> 0 62.50000 NA 31.25000 NA +#> 1 62.06828 62.28414 31.03414 31.14207 +#> 2 61.63954 62.06890 30.81977 31.03445 +#> 4 60.79093 61.64158 30.39547 30.82079 +#> 7 59.53987 61.00800 29.76994 30.50400 +#> 14 56.71995 59.56326 28.35997 29.78163 +#> 21 54.03358 58.16414 27.01679 29.08207 +#> 28 51.47444 56.80902 25.73722 28.40451 +#> 42 46.71404 54.22460 23.35702 27.11230 +#> 50 44.19417 52.81945 22.09709 26.40973 +#> 100 31.25000 45.08422 15.62500 22.54211 +#> +#> $PEC_sw_max +#> [1] 62.5 +#> +#> $PEC_sed_max +#> [1] 31.25 +#> +``` diff --git a/docs/reference/PEC_sw_sed.html b/docs/reference/PEC_sw_sed.html index 6d377c9..45afb87 100644 --- a/docs/reference/PEC_sw_sed.html +++ b/docs/reference/PEC_sw_sed.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate predicted environmental concentrations in sediment from surface water concentrations — PEC_sw_sed • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate predicted environmental concentrations in sediment from surface water concentrations — PEC_sw_sed"><meta name="description" content="The method 'percentage' is equivalent to what is used in the CRD spreadsheet +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate predicted environmental concentrations in sediment from surface water concentrations — PEC_sw_sed • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate predicted environmental concentrations in sediment from surface water concentrations — PEC_sw_sed"><meta name="description" content="The method 'percentage' is equivalent to what is used in the CRD spreadsheet PEC calculator"><meta property="og:description" content="The method 'percentage' is equivalent to what is used in the CRD spreadsheet PEC calculator"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -9,7 +15,7 @@ PEC calculator"></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -46,9 +52,9 @@ PEC calculator</p> <span> <span class="va">PEC_sw</span>,</span> <span> percentage <span class="op">=</span> <span class="fl">100</span>,</span> <span> method <span class="op">=</span> <span class="st">"percentage"</span>,</span> -<span> sediment_depth <span class="op">=</span> <span class="fu">set_units</span><span class="op">(</span><span class="fl">5</span>, <span class="st">"cm"</span><span class="op">)</span>,</span> -<span> water_depth <span class="op">=</span> <span class="fu">set_units</span><span class="op">(</span><span class="fl">30</span>, <span class="st">"cm"</span><span class="op">)</span>,</span> -<span> sediment_density <span class="op">=</span> <span class="fu">set_units</span><span class="op">(</span><span class="fl">1.3</span>, <span class="st">"kg/L"</span><span class="op">)</span>,</span> +<span> sediment_depth <span class="op">=</span> <span class="fu"><a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">set_units</a></span><span class="op">(</span><span class="fl">5</span>, <span class="st">"cm"</span><span class="op">)</span>,</span> +<span> water_depth <span class="op">=</span> <span class="fu"><a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">set_units</a></span><span class="op">(</span><span class="fl">30</span>, <span class="st">"cm"</span><span class="op">)</span>,</span> +<span> sediment_density <span class="op">=</span> <span class="fu"><a href="https://r-quantities.github.io/units/reference/units.html" class="external-link">set_units</a></span><span class="op">(</span><span class="fl">1.3</span>, <span class="st">"kg/L"</span><span class="op">)</span>,</span> <span> PEC_sed_units <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"µg/kg"</span>, <span class="st">"mg/kg"</span><span class="op">)</span></span> <span><span class="op">)</span></span></code></pre></div> </div> @@ -100,7 +106,6 @@ g/cm3)</p></dd> <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://pkgdown.jrwb.de/pfm">pfm</a></span><span class="op">)</span></span></span> <span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://r-quantities.github.io/units/" class="external-link">units</a></span><span class="op">)</span></span></span> -<span class="r-msg co"><span class="r-pr">#></span> udunits database from /usr/share/xml/udunits/udunits2.xml</span> <span class="r-in"><span><span class="fu">PEC_sw_sed</span><span class="op">(</span><span class="fu"><a href="PEC_sw_drift.html">PEC_sw_drift</a></span><span class="op">(</span><span class="fl">100</span>, distances <span class="op">=</span> <span class="fl">1</span><span class="op">)</span>, percentage <span class="op">=</span> <span class="fl">50</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> 2.130769 [µg/kg]</span> </code></pre></div> @@ -114,7 +119,7 @@ g/cm3)</p></dd> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/PEC_sw_sed.md b/docs/reference/PEC_sw_sed.md new file mode 100644 index 0000000..6f03a84 --- /dev/null +++ b/docs/reference/PEC_sw_sed.md @@ -0,0 +1,66 @@ +# Calculate predicted environmental concentrations in sediment from surface water concentrations + +The method 'percentage' is equivalent to what is used in the CRD +spreadsheet PEC calculator + +## Usage + +``` r +PEC_sw_sed( + PEC_sw, + percentage = 100, + method = "percentage", + sediment_depth = set_units(5, "cm"), + water_depth = set_units(30, "cm"), + sediment_density = set_units(1.3, "kg/L"), + PEC_sed_units = c("µg/kg", "mg/kg") +) +``` + +## Arguments + +- PEC_sw: + + Numeric vector or matrix of surface water concentrations in µg/L for + which the corresponding sediment concentration is to be estimated + +- percentage: + + The percentage in sediment, used for the percentage method + +- method: + + The method used for the calculation + +- sediment_depth: + + Depth of the sediment layer + +- water_depth: + + Depth of the water body in cm + +- sediment_density: + + The density of the sediment in kg/L (equivalent to g/cm3) + +- PEC_sed_units: + + The units of the estimated sediment PEC value + +## Value + +The predicted concentration in sediment + +## Author + +Johannes Ranke + +## Examples + +``` r +library(pfm) +library(units) +PEC_sw_sed(PEC_sw_drift(100, distances = 1), percentage = 50) +#> 2.130769 [µg/kg] +``` diff --git a/docs/reference/Rplot002.png b/docs/reference/Rplot002.png Binary files differindex 8269e66..5b79a08 100644 --- a/docs/reference/Rplot002.png +++ b/docs/reference/Rplot002.png diff --git a/docs/reference/Rplot003.png b/docs/reference/Rplot003.png Binary files differindex 8269e66..760bd4f 100644 --- a/docs/reference/Rplot003.png +++ b/docs/reference/Rplot003.png diff --git a/docs/reference/Rplot004.png b/docs/reference/Rplot004.png Binary files differindex 9ec61d5..760bd4f 100644 --- a/docs/reference/Rplot004.png +++ b/docs/reference/Rplot004.png diff --git a/docs/reference/Rplot005.png b/docs/reference/Rplot005.png Binary files differindex 02941cf..5b79a08 100644 --- a/docs/reference/Rplot005.png +++ b/docs/reference/Rplot005.png diff --git a/docs/reference/Rplot006.png b/docs/reference/Rplot006.png Binary files differnew file mode 100644 index 0000000..760bd4f --- /dev/null +++ b/docs/reference/Rplot006.png diff --git a/docs/reference/SFO_actual_twa.html b/docs/reference/SFO_actual_twa.html index 186b9f3..842d288 100644 --- a/docs/reference/SFO_actual_twa.html +++ b/docs/reference/SFO_actual_twa.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Actual and maximum moving window time average concentrations for SFO kinetics — SFO_actual_twa • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Actual and maximum moving window time average concentrations for SFO kinetics — SFO_actual_twa"><meta name="description" content="Actual and maximum moving window time average concentrations for SFO kinetics"><meta property="og:description" content="Actual and maximum moving window time average concentrations for SFO kinetics"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Actual and maximum moving window time average concentrations for SFO kinetics — SFO_actual_twa • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Actual and maximum moving window time average concentrations for SFO kinetics — SFO_actual_twa"><meta name="description" content="Actual and maximum moving window time average concentrations for SFO kinetics"><meta property="og:description" content="Actual and maximum moving window time average concentrations for SFO kinetics"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -7,7 +13,7 @@ <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -91,7 +97,7 @@ Kinetics from Environmental Fate Studies on Pesticides in EU Registration, Versi </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/SFO_actual_twa.md b/docs/reference/SFO_actual_twa.md new file mode 100644 index 0000000..52eaef5 --- /dev/null +++ b/docs/reference/SFO_actual_twa.md @@ -0,0 +1,49 @@ +# Actual and maximum moving window time average concentrations for SFO kinetics + +Actual and maximum moving window time average concentrations for SFO +kinetics + +## Usage + +``` r +SFO_actual_twa(DT50 = 1000, times = c(0, 1, 2, 4, 7, 14, 21, 28, 42, 50, 100)) +``` + +## Source + +FOCUS (2014) Generic Guidance for Estimating Persistence and Degradation +Kinetics from Environmental Fate Studies on Pesticides in EU +Registration, Version 1.1, 18 December 2014, p. 251 + +## Arguments + +- DT50: + + The half-life. + +- times: + + The output times, and window sizes for time weighted average + concentrations + +## Author + +Johannes Ranke + +## Examples + +``` r +SFO_actual_twa(10) +#> actual twa +#> 0 1.0000000000 NaN +#> 1 0.9330329915 0.9661297 +#> 2 0.8705505633 0.9337803 +#> 4 0.7578582833 0.8733416 +#> 7 0.6155722067 0.7923030 +#> 14 0.3789291416 0.6400113 +#> 21 0.2332582479 0.5267498 +#> 28 0.1435872944 0.4412651 +#> 42 0.0544094102 0.3248093 +#> 50 0.0312500000 0.2795222 +#> 100 0.0009765625 0.1441286 +``` diff --git a/docs/reference/SSLRC_mobility_classification.html b/docs/reference/SSLRC_mobility_classification.html index 3463b3c..fbbbd0a 100644 --- a/docs/reference/SSLRC_mobility_classification.html +++ b/docs/reference/SSLRC_mobility_classification.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Determine the SSLRC mobility classification for a chemical substance from its Koc — SSLRC_mobility_classification • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Determine the SSLRC mobility classification for a chemical substance from its Koc — SSLRC_mobility_classification"><meta name="description" content="This implements the method specified in the UK data requirements handbook and was +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Determine the SSLRC mobility classification for a chemical substance from its Koc — SSLRC_mobility_classification • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Determine the SSLRC mobility classification for a chemical substance from its Koc — SSLRC_mobility_classification"><meta name="description" content="This implements the method specified in the UK data requirements handbook and was checked against the spreadsheet published on the CRD website"><meta property="og:description" content="This implements the method specified in the UK data requirements handbook and was checked against the spreadsheet published on the CRD website"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -9,7 +15,7 @@ checked against the spreadsheet published on the CRD website"></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -100,7 +106,7 @@ accessed 2019-09-27</p> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/SSLRC_mobility_classification.md b/docs/reference/SSLRC_mobility_classification.md new file mode 100644 index 0000000..4793d6f --- /dev/null +++ b/docs/reference/SSLRC_mobility_classification.md @@ -0,0 +1,56 @@ +# Determine the SSLRC mobility classification for a chemical substance from its Koc + +This implements the method specified in the UK data requirements +handbook and was checked against the spreadsheet published on the CRD +website + +## Usage + +``` r +SSLRC_mobility_classification(Koc) +``` + +## Arguments + +- Koc: + + The sorption coefficient normalised to organic carbon in L/kg + +## Value + +A list containing the classification and the percentage of the compound +transported per 10 mm drain water + +## References + +HSE's Chemicals Regulation Division (CRD) Active substance PECsw +calculations (for UK specific authorisation requests) +<https://www.hse.gov.uk/pesticides/topics/pesticide-approvals/pesticides-registration/data-requirements-handbook/fate/active-substance-uk.htm> +accessed 2019-09-27 + +Drainage PECs Version 1.0 (2015) Spreadsheet published at +<https://www.hse.gov.uk/pesticides/topics/pesticide-approvals/pesticides-registration/data-requirements-handbook/fate/pec-tools-2015/PEC%20sw-sed%20(drainage).xlsx> +accessed 2019-09-27 + +## Author + +Johannes Ranke + +## Examples + +``` r +SSLRC_mobility_classification(100) +#> $`Mobility classification` +#> [1] "Moderately mobile" +#> +#> $`Percentage drained per mm of drain water` +#> [1] 0.7 +#> +SSLRC_mobility_classification(10000) +#> $`Mobility classification` +#> [1] "Non mobile" +#> +#> $`Percentage drained per mm of drain water` +#> [1] 0.008 +#> +``` diff --git a/docs/reference/TOXSWA_cwa.html b/docs/reference/TOXSWA_cwa.html index f620349..48e6b44 100644 --- a/docs/reference/TOXSWA_cwa.html +++ b/docs/reference/TOXSWA_cwa.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>R6 class for holding TOXSWA water concentration data and associated statistics — TOXSWA_cwa • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="R6 class for holding TOXSWA water concentration data and associated statistics — TOXSWA_cwa"><meta name="description" content="An R6 class for holding TOXSWA water concentration (cwa) data +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>R6 class for holding TOXSWA water concentration data and associated statistics — TOXSWA_cwa • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="R6 class for holding TOXSWA water concentration data and associated statistics — TOXSWA_cwa"><meta name="description" content="An R6 class for holding TOXSWA water concentration (cwa) data and some associated statistics. like maximum moving window average concentrations, and dataframes holding the events exceeding specified thresholds. Usually, an instance of this class will be generated @@ -15,7 +21,7 @@ by read.TOXSWA_cwa."></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -46,13 +52,13 @@ by read.TOXSWA_cwa."></head><body> and some associated statistics. like maximum moving window average concentrations, and dataframes holding the events exceeding specified thresholds. Usually, an instance of this class will be generated -by <code><a href="read.TOXSWA_cwa.html">read.TOXSWA_cwa</a></code>.</p> +by <a href="read.TOXSWA_cwa.html">read.TOXSWA_cwa</a>.</p> </div> <div class="section level2"> <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> - <p>An <code><a href="https://r6.r-lib.org/reference/R6Class.html" class="external-link">R6Class</a></code> generator object.</p> + <p>An <a href="https://r6.r-lib.org/reference/R6Class.html" class="external-link">R6::R6Class</a> generator object.</p> </div> <div class="section level2"> <h2 id="public-fields">Public fields<a class="anchor" aria-label="anchor" href="#public-fields"></a></h2> @@ -60,31 +66,31 @@ by <code><a href="read.TOXSWA_cwa.html">read.TOXSWA_cwa</a></code>.</p> <dd><p>Length one character vector holding the filename.</p></dd> -<dt><code>basedir</code></dt> + <dt><code>basedir</code></dt> <dd><p>Length one character vector holding the directory where the file came from.</p></dd> -<dt><code>zipfile</code></dt> + <dt><code>zipfile</code></dt> <dd><p>If not null, giving the path to the zip file from which the file was read.</p></dd> -<dt><code>segment</code></dt> + <dt><code>segment</code></dt> <dd><p>Length one integer, specifying for which segment the cwa data were read.</p></dd> -<dt><code>substance</code></dt> + <dt><code>substance</code></dt> <dd><p>The TOXSWA name of the substance.</p></dd> -<dt><code>cwas</code></dt> + <dt><code>cwas</code></dt> <dd><p>Dataframe holding the concentrations.</p></dd> -<dt><code>events</code></dt> + <dt><code>events</code></dt> <dd><p>List of dataframes holding the event statistics for each threshold.</p></dd> -<dt><code>windows</code></dt> + <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.</p></dd> @@ -97,14 +103,13 @@ for the requested moving window sizes in days.</p></dd> <div class="section"> <h3 id="public-methods">Public methods<a class="anchor" aria-label="anchor" href="#public-methods"></a></h3> - -<ul><li><p><a href="#method-TOXSWA_cwa-new"><code>TOXSWA_cwa$new()</code></a></p></li> +<p></p><ul><li><p><a href="#method-TOXSWA_cwa-initialize"><code>TOXSWA_cwa$new()</code></a></p></li> <li><p><a href="#method-TOXSWA_cwa-moving_windows"><code>TOXSWA_cwa$moving_windows()</code></a></p></li> <li><p><a href="#method-TOXSWA_cwa-get_events"><code>TOXSWA_cwa$get_events()</code></a></p></li> <li><p><a href="#method-TOXSWA_cwa-print"><code>TOXSWA_cwa$print()</code></a></p></li> <li><p><a href="#method-TOXSWA_cwa-clone"><code>TOXSWA_cwa$clone()</code></a></p></li> -</ul></div><p></p><hr><a id="method-TOXSWA_cwa-new"></a><div class="section"> -<h3 id="method-new-">Method <code>new()</code><a class="anchor" aria-label="anchor" href="#method-new-"></a></h3> +</ul></div><p></p><hr><a id="method-TOXSWA_cwa-initialize"></a><div class="section"> +<h3 id="toxswa-cwa-new-"><code>TOXSWA_cwa$new()</code><a class="anchor" aria-label="anchor" href="#toxswa-cwa-new-"></a></h3> <p>Create a TOXSWA_cwa object from a file</p><div class="section"> <h4 id="usage">Usage<a class="anchor" aria-label="anchor" href="#usage"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va"><a href="../reference/TOXSWA_cwa.html">TOXSWA_cwa</a></span><span class="op">$</span><span class="fu">new</span><span class="op">(</span></span> @@ -115,51 +120,43 @@ for the requested moving window sizes in days.</p></dd> <span> substance <span class="op">=</span> <span class="st">"parent"</span>,</span> <span> total <span class="op">=</span> <span class="cn">FALSE</span></span> <span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h4> <p></p><div class="arguments"><dl><dt><code>filename</code></dt> <dd><p>The filename</p></dd> - -<dt><code>basedir</code></dt> + <dt><code>basedir</code></dt> <dd><p>The directory to look in</p></dd> - -<dt><code>zipfile</code></dt> + <dt><code>zipfile</code></dt> <dd><p>Optional path to a zipfile holding the file</p></dd> - -<dt><code>segment</code></dt> + <dt><code>segment</code></dt> <dd><p>Either "last" or the number of the segment for which to read the data</p></dd> - -<dt><code>substance</code></dt> + <dt><code>substance</code></dt> <dd><p>The TOXSWA substance name (for TOXSWA 4 or higher)</p></dd> - -<dt><code>total</code></dt> + <dt><code>total</code></dt> <dd><p>Should total concentrations be read in? If FALSE, free concentrations are read</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-TOXSWA_cwa-moving_windows"></a><div class="section"> -<h3 id="method-moving-windows-">Method <code>moving_windows()</code><a class="anchor" aria-label="anchor" href="#method-moving-windows-"></a></h3> +</div> + +<p></p><hr><a id="method-TOXSWA_cwa-moving_windows"></a><div class="section"> +<h3 id="toxswa-cwa-moving-windows-"><code>TOXSWA_cwa$moving_windows()</code><a class="anchor" aria-label="anchor" href="#toxswa-cwa-moving-windows-"></a></h3> <p>Add to the <code>windows</code> field described above.</p><div class="section"> <h4 id="usage-1">Usage<a class="anchor" aria-label="anchor" href="#usage-1"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">TOXSWA_cwa</span><span class="op">$</span><span class="fu">moving_windows</span><span class="op">(</span><span class="va">windows</span>, total <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-1">Arguments<a class="anchor" aria-label="anchor" href="#arguments-1"></a></h4> <p></p><div class="arguments"><dl><dt><code>windows</code></dt> <dd><p>Window sizes in days</p></dd> - -<dt><code>total</code></dt> + <dt><code>total</code></dt> <dd><p>If TRUE, the total concentration including the amount adsorbed to suspended matter will be used.</p></dd> @@ -167,22 +164,21 @@ suspended matter will be used.</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-TOXSWA_cwa-get_events"></a><div class="section"> -<h3 id="method-get-events-">Method <code>get_events()</code><a class="anchor" aria-label="anchor" href="#method-get-events-"></a></h3> +</div> + +<p></p><hr><a id="method-TOXSWA_cwa-get_events"></a><div class="section"> +<h3 id="toxswa-cwa-get-events-"><code>TOXSWA_cwa$get_events()</code><a class="anchor" aria-label="anchor" href="#toxswa-cwa-get-events-"></a></h3> <p>Populate a datataframe with event information for the specified threshold value. The resulting dataframe is stored in the <code>events</code> field of the object.</p><div class="section"> <h4 id="usage-2">Usage<a class="anchor" aria-label="anchor" href="#usage-2"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">TOXSWA_cwa</span><span class="op">$</span><span class="fu">get_events</span><span class="op">(</span><span class="va">thresholds</span>, total <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-2">Arguments<a class="anchor" aria-label="anchor" href="#arguments-2"></a></h4> <p></p><div class="arguments"><dl><dt><code>thresholds</code></dt> <dd><p>Threshold values in µg/L.</p></dd> - -<dt><code>total</code></dt> + <dt><code>total</code></dt> <dd><p>If TRUE, the total concentration including the amount adsorbed to suspended matter will be used.</p></dd> @@ -190,22 +186,23 @@ suspended matter will be used.</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-TOXSWA_cwa-print"></a><div class="section"> -<h3 id="method-print-">Method <code><a href="https://rdrr.io/r/base/print.html" class="external-link">print()</a></code><a class="anchor" aria-label="anchor" href="#method-print-"></a></h3> +</div> + +<p></p><hr><a id="method-TOXSWA_cwa-print"></a><div class="section"> +<h3 id="toxswa-cwa-print-"><code>TOXSWA_cwa$print()</code><a class="anchor" aria-label="anchor" href="#toxswa-cwa-print-"></a></h3> <p>Print a <code>TOXSWA_cwa</code> object</p><div class="section"> <h4 id="usage-3">Usage<a class="anchor" aria-label="anchor" href="#usage-3"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">TOXSWA_cwa</span><span class="op">$</span><span class="fu">print</span><span class="op">(</span><span class="op">)</span></span></code></pre></div><p></p></div> </div> +</div> -</div><p></p><hr><a id="method-TOXSWA_cwa-clone"></a><div class="section"> -<h3 id="method-clone-">Method <code>clone()</code><a class="anchor" aria-label="anchor" href="#method-clone-"></a></h3> +<p></p><hr><a id="method-TOXSWA_cwa-clone"></a><div class="section"> +<h3 id="toxswa-cwa-clone-"><code>TOXSWA_cwa$clone()</code><a class="anchor" aria-label="anchor" href="#toxswa-cwa-clone-"></a></h3> <p>The objects of this class are cloneable with this method.</p><div class="section"> <h4 id="usage-4">Usage<a class="anchor" aria-label="anchor" href="#usage-4"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">TOXSWA_cwa</span><span class="op">$</span><span class="fu">clone</span><span class="op">(</span>deep <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-3">Arguments<a class="anchor" aria-label="anchor" href="#arguments-3"></a></h4> <p></p><div class="arguments"><dl><dt><code>deep</code></dt> <dd><p>Whether to make a deep clone.</p></dd> @@ -216,6 +213,7 @@ suspended matter will be used.</p></dd> </div> + </div> <div class="section level2"> @@ -264,7 +262,7 @@ suspended matter will be used.</p></dd> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/TOXSWA_cwa.md b/docs/reference/TOXSWA_cwa.md new file mode 100644 index 0000000..3a362d8 --- /dev/null +++ b/docs/reference/TOXSWA_cwa.md @@ -0,0 +1,217 @@ +# R6 class for holding TOXSWA water concentration data and associated statistics + +An R6 class for holding TOXSWA water concentration (cwa) data and some +associated statistics. like maximum moving window average +concentrations, and dataframes holding the events exceeding specified +thresholds. Usually, an instance of this class will be generated by +[read.TOXSWA_cwa](https://pkgdown.jrwb.de/pfm/reference/read.TOXSWA_cwa.md). + +## Format + +An [R6::R6Class](https://r6.r-lib.org/reference/R6Class.html) generator +object. + +## Public fields + +- `filename`: + + Length one character vector holding the filename. + +- `basedir`: + + Length one character vector holding the directory where the file came + from. + +- `zipfile`: + + If not null, giving the path to the zip file from which the file was + read. + +- `segment`: + + Length one integer, specifying for which segment the cwa data were + read. + +- `substance`: + + The TOXSWA name of the substance. + +- `cwas`: + + Dataframe holding the concentrations. + +- `events`: + + List of dataframes holding the event statistics for each threshold. + +- `windows`: + + 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. + +## Methods + +### Public methods + +- [`TOXSWA_cwa$new()`](#method-TOXSWA_cwa-initialize) + +- [`TOXSWA_cwa$moving_windows()`](#method-TOXSWA_cwa-moving_windows) + +- [`TOXSWA_cwa$get_events()`](#method-TOXSWA_cwa-get_events) + +- [`TOXSWA_cwa$print()`](#method-TOXSWA_cwa-print) + +- [`TOXSWA_cwa$clone()`](#method-TOXSWA_cwa-clone) + +------------------------------------------------------------------------ + +### `TOXSWA_cwa$new()` + +Create a TOXSWA_cwa object from a file + +#### Usage + + TOXSWA_cwa$new( + filename, + basedir, + zipfile = NULL, + segment = "last", + substance = "parent", + total = FALSE + ) + +#### Arguments + +- `filename`: + + The filename + +- `basedir`: + + The directory to look in + +- `zipfile`: + + Optional path to a zipfile holding the file + +- `segment`: + + Either "last" or the number of the segment for which to read the data + +- `substance`: + + The TOXSWA substance name (for TOXSWA 4 or higher) + +- `total`: + + Should total concentrations be read in? If FALSE, free concentrations + are read + +------------------------------------------------------------------------ + +### `TOXSWA_cwa$moving_windows()` + +Add to the `windows` field described above. + +#### Usage + + TOXSWA_cwa$moving_windows(windows, total = FALSE) + +#### Arguments + +- `windows`: + + Window sizes in days + +- `total`: + + If TRUE, the total concentration including the amount adsorbed to + suspended matter will be used. + +------------------------------------------------------------------------ + +### `TOXSWA_cwa$get_events()` + +Populate a datataframe with event information for the specified +threshold value. The resulting dataframe is stored in the `events` field +of the object. + +#### Usage + + TOXSWA_cwa$get_events(thresholds, total = FALSE) + +#### Arguments + +- `thresholds`: + + Threshold values in µg/L. + +- `total`: + + If TRUE, the total concentration including the amount adsorbed to + suspended matter will be used. + +------------------------------------------------------------------------ + +### `TOXSWA_cwa$print()` + +Print a `TOXSWA_cwa` object + +#### Usage + + TOXSWA_cwa$print() + +------------------------------------------------------------------------ + +### `TOXSWA_cwa$clone()` + +The objects of this class are cloneable with this method. + +#### Usage + + TOXSWA_cwa$clone(deep = FALSE) + +#### Arguments + +- `deep`: + + Whether to make a deep clone. + +## Examples + +``` r +H_sw_R1_stream <- read.TOXSWA_cwa("00003s_pa.cwa", + basedir = "SwashProjects/project_H_sw/TOXSWA", + zipfile = system.file("testdata/SwashProjects.zip", + package = "pfm")) +H_sw_R1_stream$get_events(c(2, 10)) +H_sw_R1_stream$moving_windows(c(7, 21)) +print(H_sw_R1_stream) +#> <TOXSWA_cwa> data from file 00003s_pa.cwa segment 20 +#> datetime t t_firstjan t_rel_to_max cwa_mug_per_L +#> 20 1978-10-01 00:00:00 0.000 273.0000 -55.333 0 +#> 40 1978-10-01 01:00:00 0.042 273.0417 -55.291 0 +#> 60 1978-10-01 02:00:00 0.083 273.0833 -55.250 0 +#> 80 1978-10-01 03:00:00 0.125 273.1250 -55.208 0 +#> 100 1978-10-01 04:00:00 0.167 273.1667 -55.166 0 +#> 120 1978-10-01 05:00:00 0.208 273.2083 -55.125 0 +#> cwa_tot_mug_per_L +#> 20 0 +#> 40 0 +#> 60 0 +#> 80 0 +#> 100 0 +#> 120 0 +#> Moving window analysis +#> window max_TWAC max_AUC_h max_AUC_d +#> 1 7 days 2.3926551 401.9660 16.74859 +#> 2 21 days 0.8369248 421.8101 17.57542 +#> Event statistics for threshold 2 +#> t_start cwa_max duration pre_interval AUC_h AUC_d +#> 1 44.375 4.167238 0.208 44.375 17.77202 0.740501 +#> 2 55.042 40.584010 0.583 10.459 398.21189 16.592162 +#> Event statistics for threshold 10 +#> t_start cwa_max duration pre_interval AUC_h AUC_d +#> 1 55.083 40.58401 0.459 55.083 379.433 15.80971 +``` diff --git a/docs/reference/TSCF-1.png b/docs/reference/TSCF-1.png Binary files differindex 82c0ea8..8d7df74 100644 --- a/docs/reference/TSCF-1.png +++ b/docs/reference/TSCF-1.png diff --git a/docs/reference/TSCF.html b/docs/reference/TSCF.html index f611a53..90fcfbb 100644 --- a/docs/reference/TSCF.html +++ b/docs/reference/TSCF.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Estimation of the transpiration stream concentration factor — TSCF • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Estimation of the transpiration stream concentration factor — TSCF"><meta name="description" content="The FOCUS groundwater guidance (FOCUS 2014, p. 41) states that a reliable measured +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Estimation of the transpiration stream concentration factor — TSCF • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Estimation of the transpiration stream concentration factor — TSCF"><meta name="description" content="The FOCUS groundwater guidance (FOCUS 2014, p. 41) states that a reliable measured log Kow for neutral pH must be available in order to apply the Briggs equation. It is not clarified when it can be regarded reliable, but the equation is stated to be produced for non-ionic compounds, suggesting that @@ -17,7 +23,7 @@ or ionic."></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -100,7 +106,7 @@ by plant roots. Environ. Sci. Technol 43, 324 - 329</p> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/TSCF.md b/docs/reference/TSCF.md new file mode 100644 index 0000000..6d33759 --- /dev/null +++ b/docs/reference/TSCF.md @@ -0,0 +1,46 @@ +# Estimation of the transpiration stream concentration factor + +The FOCUS groundwater guidance (FOCUS 2014, p. 41) states that a +reliable measured log Kow for neutral pH must be available in order to +apply the Briggs equation. It is not clarified when it can be regarded +reliable, but the equation is stated to be produced for non-ionic +compounds, suggesting that the compound should not be ionogenic (weak +acid/base) or ionic. + +## Usage + +``` r +TSCF(log_Kow, method = c("briggs82", "dettenmaier09")) +``` + +## Arguments + +- log_Kow: + + The decadic logarithm of the octanol-water partition constant + +- method: + + Short name of the estimation method. + +## Details + +The Dettenmaier equation is given to show that other views on the +subject exist. + +## References + +FOCUS (2014) Generic Guidance for Tier 1 FOCUS Ground Water Assessments. +Version 2.2, May 2014 Dettenmaier EM, Doucette WJ and Bugbee B (2009) +Chemical hydrophobicity and uptake by plant roots. Environ. Sci. Technol +43, 324 - 329 + +## Examples + +``` r +plot(TSCF, -1, 5, xlab = "log Kow", ylab = "TSCF", ylim = c(0, 1.1)) +TSCF_2 <- function(x) TSCF(x, method = "dettenmaier09") +curve(TSCF_2, -1, 5, add = TRUE, lty = 2) +legend("topright", lty = 1:2, bty = "n", + legend = c("Briggs et al. (1982)", "Dettenmaier et al. (2009)")) +``` diff --git a/docs/reference/chent_focus_sw.html b/docs/reference/chent_focus_sw.html index df9df8b..869b643 100644 --- a/docs/reference/chent_focus_sw.html +++ b/docs/reference/chent_focus_sw.html @@ -1,43 +1,40 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Create a chemical compound object for FOCUS Step 1 calculations"><title>Create a chemical compound object for FOCUS Step 1 calculations — chent_focus_sw • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Create a chemical compound object for FOCUS Step 1 calculations — chent_focus_sw"><meta property="og:description" content="Create a chemical compound object for FOCUS Step 1 calculations"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Create a chemical compound object for FOCUS Step 1 calculations — chent_focus_sw • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Create a chemical compound object for FOCUS Step 1 calculations — chent_focus_sw"><meta name="description" content="Create a chemical compound object for FOCUS Step 1 calculations"><meta property="og:description" content="Create a chemical compound object for FOCUS Step 1 calculations"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> - - <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container"> - + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.1</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> + - <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar" class="collapse navbar-collapse ms-3"> - <ul class="navbar-nav me-auto"><li class="active nav-item"> - <a class="nav-link" href="../reference/index.html">Reference</a> -</li> - </ul><form class="form-inline my-2 my-lg-0" role="search"> - <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form> - - <ul class="navbar-nav"><li class="nav-item"> - <a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="github"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> </ul></div> - + </div> </nav><div class="container template-reference-topic"> <div class="row"> <main id="main" class="col-md-9"><div class="page-header"> - <img src="" class="logo" alt=""><h1>Create a chemical compound object for FOCUS Step 1 calculations</h1> + + <h1>Create a chemical compound object for FOCUS Step 1 calculations</h1> <small class="dont-index">Source: <a href="https://github.com/jranke/pfm/blob/HEAD/R/PEC_sw_focus.R" class="external-link"><code>R/PEC_sw_focus.R</code></a></small> <div class="d-none name"><code>chent_focus_sw.Rd</code></div> </div> @@ -64,72 +61,72 @@ <div class="section level2"> <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> - <dl><dt>name</dt> + + +<dl><dt id="arg-name">name<a class="anchor" aria-label="anchor" href="#arg-name"></a></dt> <dd><p>Length one character vector containing the name</p></dd> -<dt>Koc</dt> +<dt id="arg-koc">Koc<a class="anchor" aria-label="anchor" href="#arg-koc"></a></dt> <dd><p>Partition coefficient between organic carbon and water in L/kg.</p></dd> -<dt>DT50_ws</dt> +<dt id="arg-dt-ws">DT50_ws<a class="anchor" aria-label="anchor" href="#arg-dt-ws"></a></dt> <dd><p>Half-life in water/sediment systems in days</p></dd> -<dt>DT50_soil</dt> +<dt id="arg-dt-soil">DT50_soil<a class="anchor" aria-label="anchor" href="#arg-dt-soil"></a></dt> <dd><p>Half-life in soil in days</p></dd> -<dt>DT50_water</dt> +<dt id="arg-dt-water">DT50_water<a class="anchor" aria-label="anchor" href="#arg-dt-water"></a></dt> <dd><p>Half-life in water in days (Step 2)</p></dd> -<dt>DT50_sediment</dt> +<dt id="arg-dt-sediment">DT50_sediment<a class="anchor" aria-label="anchor" href="#arg-dt-sediment"></a></dt> <dd><p>Half-life in sediment in days (Step 2)</p></dd> -<dt>cwsat</dt> +<dt id="arg-cwsat">cwsat<a class="anchor" aria-label="anchor" href="#arg-cwsat"></a></dt> <dd><p>Water solubility in mg/L</p></dd> -<dt>mw</dt> +<dt id="arg-mw">mw<a class="anchor" aria-label="anchor" href="#arg-mw"></a></dt> <dd><p>Molar weight in g/mol.</p></dd> -<dt>max_soil</dt> +<dt id="arg-max-soil">max_soil<a class="anchor" aria-label="anchor" href="#arg-max-soil"></a></dt> <dd><p>Maximum observed fraction (dimensionless) in soil</p></dd> -<dt>max_ws</dt> +<dt id="arg-max-ws">max_ws<a class="anchor" aria-label="anchor" href="#arg-max-ws"></a></dt> <dd><p>Maximum observed fraction (dimensionless) in water/sediment systems</p></dd> </dl></div> <div class="section level2"> <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> - - -<p>A list with the substance specific properties</p> + <p>A list with the substance specific properties</p> </div> - </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </nav></aside></div> <footer><div class="pkgdown-footer-left"> - <p></p><p>Developed by Johannes Ranke.</p> + <p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown-footer-right"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> - - + + </body></html> diff --git a/docs/reference/chent_focus_sw.md b/docs/reference/chent_focus_sw.md new file mode 100644 index 0000000..b4ed108 --- /dev/null +++ b/docs/reference/chent_focus_sw.md @@ -0,0 +1,66 @@ +# Create a chemical compound object for FOCUS Step 1 calculations + +Create a chemical compound object for FOCUS Step 1 calculations + +## Usage + +``` r +chent_focus_sw( + name, + Koc, + DT50_ws = NA, + DT50_soil = NA, + DT50_water = NA, + DT50_sediment = NA, + cwsat = 1000, + mw = NA, + max_soil = 1, + max_ws = 1 +) +``` + +## Arguments + +- name: + + Length one character vector containing the name + +- Koc: + + Partition coefficient between organic carbon and water in L/kg. + +- DT50_ws: + + Half-life in water/sediment systems in days + +- DT50_soil: + + Half-life in soil in days + +- DT50_water: + + Half-life in water in days (Step 2) + +- DT50_sediment: + + Half-life in sediment in days (Step 2) + +- cwsat: + + Water solubility in mg/L + +- mw: + + Molar weight in g/mol. + +- max_soil: + + Maximum observed fraction (dimensionless) in soil + +- max_ws: + + Maximum observed fraction (dimensionless) in water/sediment systems + +## Value + +A list with the substance specific properties diff --git a/docs/reference/drainage_date_UK.html b/docs/reference/drainage_date_UK.html new file mode 100644 index 0000000..0fbf62a --- /dev/null +++ b/docs/reference/drainage_date_UK.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/pfm/reference/PEC_sw_drainage_UK.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/pfm/reference/PEC_sw_drainage_UK.html"> + </head> +</html> + diff --git a/docs/reference/drift_data_JKI.html b/docs/reference/drift_data_JKI.html index 064264f..62ab92a 100644 --- a/docs/reference/drift_data_JKI.html +++ b/docs/reference/drift_data_JKI.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Deposition from spray drift expressed as percent of the applied dose as published by the JKI — drift_data_JKI • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Deposition from spray drift expressed as percent of the applied dose as published by the JKI — drift_data_JKI"><meta name="description" content="Deposition from spray drift expressed as percent of the applied dose as +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Deposition from spray drift expressed as percent of the applied dose as published by the JKI — drift_data_JKI • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Deposition from spray drift expressed as percent of the applied dose as published by the JKI — drift_data_JKI"><meta name="description" content="Deposition from spray drift expressed as percent of the applied dose as published by the German Julius-Kühn Institute (JKI)."><meta property="og:description" content="Deposition from spray drift expressed as percent of the applied dose as published by the German Julius-Kühn Institute (JKI)."></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -9,7 +15,7 @@ published by the German Julius-Kühn Institute (JKI)."></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -285,7 +291,7 @@ included.</p> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/drift_data_JKI.md b/docs/reference/drift_data_JKI.md new file mode 100644 index 0000000..c9dd92a --- /dev/null +++ b/docs/reference/drift_data_JKI.md @@ -0,0 +1,245 @@ +# Deposition from spray drift expressed as percent of the applied dose as published by the JKI + +Deposition from spray drift expressed as percent of the applied dose as +published by the German Julius-Kühn Institute (JKI). + +## Usage + +``` r +drift_data_JKI +``` + +## Format + +A list currently containing matrices with spray drift percentage data +for field crops (Ackerbau), and Pome/stone fruit, early and late +(Obstbau frueh, spaet). + +## Source + +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, not present any more 2024-01-31 + +Rautmann, D., Streloke, M and Winkler, R (2001) New basic drift values +in the authorization procedure for plant protection products Mitt. Biol. +Bundesanst. Land- Forstwirtsch. 383, 133-141 + +## Details + +The data were extracted from the spreadsheet cited below using the R +code given in the file `data_generation/drift_data_JKI.R` installed with +this package. The file itself is not included in the package, as its +licence is not clear. + +Additional spray drift values were taken from the publication by +Rautmann et al. (2001). Specifically, these are the values for early +vines, and the values for a 3 m buffer which are incomplete in the +spreadsheet. + +Note that for vegetables, ornamentals and small fruit, the values for +field crops are used for crops \< 50 cm, and the vales for late vines +are used for crops \> 50 cm. In the JKI spreadsheet, it is indicated +that these values are used for spray applications with handheld/knapsack +equipment (tragbare Spritz- und Sprühgerate). + +Values for non-professional use listed in the JKI spreadsheet were not +included. + +## Examples + +``` r +drift_data_JKI +#> [[1]] +#> crop +#> distance Ackerbau Obstbau frueh Obstbau spaet Weinbau frueh Weinbau spaet +#> 1 2.77 NA NA NA NA +#> 3 0.95 29.20 15.73 2.70 8.02 +#> 5 0.57 19.89 8.41 1.18 3.62 +#> 10 0.29 11.81 3.60 0.39 1.23 +#> 15 0.20 5.55 1.81 0.20 0.65 +#> 20 0.15 2.77 1.09 0.13 0.42 +#> 30 0.10 1.04 0.54 0.07 0.22 +#> 40 0.07 0.52 0.32 0.04 0.14 +#> 50 0.06 0.30 0.22 0.03 0.10 +#> crop +#> distance Hopfenbau Flaechenkulturen > 900 l/ha Gleisanlagen +#> 1 NA 4.440 NA +#> 3 19.33 NA 0.018721696 +#> 5 11.57 0.180 0.014363896 +#> 10 5.77 0.050 0.010026007 +#> 15 3.84 0.020 0.008124366 +#> 20 1.79 0.012 0.006998158 +#> 30 0.56 0.005 0.005670811 +#> 40 0.25 0.003 NA +#> 50 0.13 0.002 0.004350831 +#> +#> [[2]] +#> crop +#> distance Ackerbau Obstbau frueh Obstbau spaet Weinbau frueh Weinbau spaet +#> 1 2.38 NA NA NA NA +#> 3 0.79 25.53 12.13 2.53 7.23 +#> 5 0.47 16.87 6.81 1.09 3.22 +#> 10 0.24 9.61 3.11 0.35 1.07 +#> 15 0.16 5.61 1.58 0.18 0.56 +#> 20 0.12 2.59 0.90 0.11 0.36 +#> 30 0.08 0.87 0.40 0.06 0.19 +#> 40 0.06 0.40 0.23 0.03 0.12 +#> 50 0.05 0.22 0.15 0.02 0.08 +#> crop +#> distance Hopfenbau Flaechenkulturen > 900 l/ha Gleisanlagen +#> 1 NA 3.780 NA +#> 3 17.73 NA NA +#> 5 9.60 0.160 NA +#> 10 4.18 0.040 NA +#> 15 2.57 0.020 NA +#> 20 1.21 0.011 NA +#> 30 0.38 0.005 NA +#> 40 0.17 0.003 NA +#> 50 0.09 0.002 NA +#> +#> [[3]] +#> crop +#> distance Ackerbau Obstbau frueh Obstbau spaet Weinbau frueh Weinbau spaet +#> 1 2.01 NA NA NA NA +#> 3 0.68 23.96 11.01 2.49 6.90 +#> 5 0.41 15.79 6.04 1.04 3.07 +#> 10 0.20 8.96 2.67 0.32 1.02 +#> 15 0.14 4.24 1.39 0.16 0.54 +#> 20 0.10 2.01 0.80 0.10 0.34 +#> 30 0.07 0.70 0.36 0.05 0.18 +#> 40 0.05 0.33 0.21 0.03 0.11 +#> 50 0.04 0.19 0.13 0.02 0.08 +#> crop +#> distance Hopfenbau Flaechenkulturen > 900 l/ha Gleisanlagen +#> 1 NA 3.420 NA +#> 3 15.93 NA NA +#> 5 8.57 0.150 NA +#> 10 3.70 0.040 NA +#> 15 2.26 0.020 NA +#> 20 1.05 0.010 NA +#> 30 0.34 0.004 NA +#> 40 0.15 0.003 NA +#> 50 0.08 0.002 NA +#> +#> [[4]] +#> crop +#> distance Ackerbau Obstbau frueh Obstbau spaet Weinbau frueh Weinbau spaet +#> 1 1.85 NA NA NA NA +#> 3 0.62 23.61 10.12 2.44 6.71 +#> 5 0.38 15.42 5.60 1.02 2.99 +#> 10 0.19 8.66 2.50 0.31 0.99 +#> 15 0.13 4.01 1.28 0.16 0.52 +#> 20 0.10 1.89 0.75 0.10 0.33 +#> 30 0.06 0.66 0.35 0.05 0.17 +#> 40 0.05 0.31 0.20 0.03 0.11 +#> 50 0.04 0.17 0.13 0.02 0.08 +#> crop +#> distance Hopfenbau Flaechenkulturen > 900 l/ha Gleisanlagen +#> 1 NA 2.290 NA +#> 3 15.38 NA NA +#> 5 8.26 0.120 NA +#> 10 3.55 0.030 NA +#> 15 2.17 0.020 NA +#> 20 0.93 0.009 NA +#> 30 0.31 0.004 NA +#> 40 0.14 0.002 NA +#> 50 0.08 0.002 NA +#> +#> [[5]] +#> crop +#> distance Ackerbau Obstbau frueh Obstbau spaet Weinbau frueh Weinbau spaet +#> 1 1.75 NA NA NA NA +#> 3 0.59 23.12 9.74 2.37 6.59 +#> 5 0.36 15.06 5.41 1.00 2.93 +#> 10 0.18 8.42 2.43 0.31 0.98 +#> 15 0.12 3.83 1.24 0.15 0.51 +#> 20 0.09 1.81 0.72 0.09 0.33 +#> 30 0.06 0.63 0.34 0.05 0.17 +#> 40 0.05 0.30 0.20 0.03 0.11 +#> 50 0.04 0.17 0.13 0.02 0.08 +#> crop +#> distance Hopfenbau Flaechenkulturen > 900 l/ha Gleisanlagen +#> 1 NA 2.120 NA +#> 3 15.12 NA NA +#> 5 7.99 0.110 NA +#> 10 3.36 0.030 NA +#> 15 2.03 0.010 NA +#> 20 0.88 0.008 NA +#> 30 0.29 0.004 NA +#> 40 0.14 0.002 NA +#> 50 0.07 0.002 NA +#> +#> [[6]] +#> crop +#> distance Ackerbau Obstbau frueh Obstbau spaet Weinbau frueh Weinbau spaet +#> 1 1.64 NA NA NA NA +#> 3 0.56 22.76 9.21 2.29 6.41 +#> 5 0.34 14.64 5.18 0.97 2.85 +#> 10 0.17 8.04 2.38 0.30 0.95 +#> 15 0.11 3.71 1.20 0.15 0.50 +#> 20 0.09 1.75 0.68 0.09 0.32 +#> 30 0.06 0.61 0.31 0.05 0.17 +#> 40 0.04 0.29 0.17 0.03 0.11 +#> 50 0.03 0.16 0.11 0.02 0.07 +#> crop +#> distance Hopfenbau Flaechenkulturen > 900 l/ha Gleisanlagen +#> 1 NA 1.980 NA +#> 3 14.90 NA NA +#> 5 7.79 0.100 NA +#> 10 3.23 0.030 NA +#> 15 1.93 0.010 NA +#> 20 0.83 0.008 NA +#> 30 0.28 0.004 NA +#> 40 0.13 0.002 NA +#> 50 0.07 0.001 NA +#> +#> [[7]] +#> crop +#> distance Ackerbau Obstbau frueh Obstbau spaet Weinbau frueh Weinbau spaet +#> 1 1.61 NA NA NA NA +#> 3 0.55 22.69 9.10 2.24 6.33 +#> 5 0.33 14.45 5.11 0.94 2.81 +#> 10 0.17 7.83 2.33 0.29 0.94 +#> 15 0.11 3.62 1.20 0.15 0.49 +#> 20 0.08 1.71 0.67 0.09 0.31 +#> 30 0.06 0.60 0.30 0.05 0.16 +#> 40 0.04 0.28 0.17 0.03 0.10 +#> 50 0.03 0.16 0.11 0.02 0.07 +#> crop +#> distance Hopfenbau Flaechenkulturen > 900 l/ha Gleisanlagen +#> 1 NA 1.930 NA +#> 3 14.63 NA NA +#> 5 7.60 0.100 NA +#> 10 3.13 0.030 NA +#> 15 1.86 0.010 NA +#> 20 0.81 0.008 NA +#> 30 0.26 0.004 NA +#> 40 0.12 0.002 NA +#> 50 0.06 0.001 NA +#> +#> [[8]] +#> crop +#> distance Ackerbau Obstbau frueh Obstbau spaet Weinbau frueh Weinbau spaet +#> 1 1.52 NA NA NA NA +#> 3 0.52 22.24 8.66 2.16 6.26 +#> 5 0.31 14.09 4.92 0.91 2.78 +#> 10 0.16 7.58 2.29 0.28 0.93 +#> 15 0.11 3.48 1.14 0.14 0.49 +#> 20 0.08 1.65 0.65 0.09 0.31 +#> 30 0.05 0.57 0.29 0.04 0.16 +#> 40 0.04 0.27 0.16 0.03 0.10 +#> 50 0.03 0.15 0.11 0.02 0.07 +#> crop +#> distance Hopfenbau Flaechenkulturen > 900 l/ha Gleisanlagen +#> 1 NA 1.640 NA +#> 3 13.53 NA NA +#> 5 7.15 0.090 NA +#> 10 3.01 0.020 NA +#> 15 1.82 0.010 NA +#> 20 0.78 0.007 NA +#> 30 0.25 0.003 NA +#> 40 0.12 0.002 NA +#> 50 0.06 0.001 NA +#> +``` diff --git a/docs/reference/drift_parameters_focus.html b/docs/reference/drift_parameters_focus.html index 6d3f679..f7a6d55 100644 --- a/docs/reference/drift_parameters_focus.html +++ b/docs/reference/drift_parameters_focus.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Regression parameters for the Rautmann drift data — drift_parameters_focus • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Regression parameters for the Rautmann drift data — drift_parameters_focus"><meta name="description" content="The parameters were extracted from Appendix B to the FOCUS surface water guidance +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Regression parameters for the Rautmann drift data — drift_parameters_focus • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Regression parameters for the Rautmann drift data — drift_parameters_focus"><meta name="description" content="The parameters were extracted from Appendix B to the FOCUS surface water guidance using the R code given in the file data_generation/drift_parameters_focus.R installed with this package. The appendix itself is not included in the package, as its licence is not clear."><meta property="og:description" content="The parameters were extracted from Appendix B to the FOCUS surface water guidance @@ -13,7 +19,7 @@ as its licence is not clear."></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -111,7 +117,7 @@ Bundesanst. Land- Forstwirtsch. 383, 133-141</p> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/drift_parameters_focus.md b/docs/reference/drift_parameters_focus.md new file mode 100644 index 0000000..c83841e --- /dev/null +++ b/docs/reference/drift_parameters_focus.md @@ -0,0 +1,67 @@ +# Regression parameters for the Rautmann drift data + +The parameters were extracted from Appendix B to the FOCUS surface water +guidance using the R code given in the file +`data_generation/drift_parameters_focus.R` installed with this package. +The appendix itself is not included in the package, as its licence is +not clear. + +## Usage + +``` r +drift_parameters_focus +``` + +## Format + +A [tibble::tibble](https://tibble.tidyverse.org/reference/tibble.html). + +## Details + +For the hinge distance, `Inf` was substituted for the cases where no +hinge distance is given in the data, in this way parameters C and D are +never used for any distance if A and B are used for the case that the +distance is smaller than the hinge distance. + +## 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> + +FOCUS (2001) FOCUS Surface Water Scenarios in the EU Evaluation Process +under 91/414/EEC. Report of the FOCUS Working Group on Surface Water +Scenarios, EC Document Reference SANCO/4802/2001-rev.2. 245, Appendix B. +<https://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/sw/docs/FOCUS_SWS_APPENDIX_B.doc> + +Rautmann, D., Streloke, M and Winkler, R (2001) New basic drift values +in the authorization procedure for plant protection products Mitt. Biol. +Bundesanst. Land- Forstwirtsch. 383, 133-141 + +## See also + +[drift_percentages_rautmann](https://pkgdown.jrwb.de/pfm/reference/drift_percentages_rautmann.md), +[PEC_sw_drift](https://pkgdown.jrwb.de/pfm/reference/PEC_sw_drift.md) + +## Examples + +``` r +drift_parameters_focus +#> # A tibble: 49 × 8 +#> crop_group n_apps percentile A B C D hinge +#> <chr> <int> <int> <dbl> <dbl> <dbl> <dbl> <dbl> +#> 1 arable 1 90 2.76 -0.978 NA NA Inf +#> 2 arable 2 82 2.44 -1.01 NA NA Inf +#> 3 arable 3 77 2.02 -0.996 NA NA Inf +#> 4 arable 4 74 1.86 -0.986 NA NA Inf +#> 5 arable 5 72 1.79 -0.994 NA NA Inf +#> 6 arable 6 70 1.63 -0.986 NA NA Inf +#> 7 arable 7 69 1.58 -0.981 NA NA Inf +#> 8 arable 8 67 1.51 -0.983 NA NA Inf +#> 9 hops 1 90 58.2 -1.00 8655. -2.84 15.3 +#> 10 hops 2 82 66.2 -1.20 5555. -2.82 15.3 +#> # ℹ 39 more rows +unique(drift_parameters_focus$crop_group) +#> [1] "arable" "hops" "vines, late" "vines, early" "fruit, late" +#> [6] "fruit, early" "aerial" +``` diff --git a/docs/reference/drift_percentages_rautmann-1.png b/docs/reference/drift_percentages_rautmann-1.png Binary files differindex ae57141..f046ca0 100644 --- a/docs/reference/drift_percentages_rautmann-1.png +++ b/docs/reference/drift_percentages_rautmann-1.png diff --git a/docs/reference/drift_percentages_rautmann.html b/docs/reference/drift_percentages_rautmann.html index bee0e60..9659752 100644 --- a/docs/reference/drift_percentages_rautmann.html +++ b/docs/reference/drift_percentages_rautmann.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate drift percentages based on Rautmann data — drift_percentages_rautmann • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate drift percentages based on Rautmann data — drift_percentages_rautmann"><meta name="description" content="Calculate drift percentages based on Rautmann data"><meta property="og:description" content="Calculate drift percentages based on Rautmann data"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate drift percentages based on Rautmann data — drift_percentages_rautmann • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate drift percentages based on Rautmann data — drift_percentages_rautmann"><meta name="description" content="Calculate drift percentages based on Rautmann data"><meta property="og:description" content="Calculate drift percentages based on Rautmann data"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -7,7 +13,7 @@ <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -42,8 +48,7 @@ <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">drift_percentages_rautmann</span><span class="op">(</span></span> <span> <span class="va">distances</span>,</span> <span> applications <span class="op">=</span> <span class="fl">1</span>,</span> -<span> crop_group_focus <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"arable"</span>, <span class="st">"hops"</span>, <span class="st">"vines, late"</span>, <span class="st">"vines, early"</span>, <span class="st">"fruit, late"</span>,</span> -<span> <span class="st">"fruit, early"</span>, <span class="st">"aerial"</span><span class="op">)</span>,</span> +<span> crop_group_RF <span class="op">=</span> <span class="st">"arable"</span>,</span> <span> formula <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Rautmann"</span>, <span class="st">"FOCUS"</span><span class="op">)</span>,</span> <span> widths <span class="op">=</span> <span class="fl">1</span></span> <span><span class="op">)</span></span></code></pre></div> @@ -61,8 +66,10 @@ <dd><p>Number of applications for selection of drift percentile</p></dd> -<dt id="arg-crop-group-focus">crop_group_focus<a class="anchor" aria-label="anchor" href="#arg-crop-group-focus"></a></dt> -<dd><p>One of the crop groups as used in <a href="drift_parameters_focus.html">drift_parameters_focus</a></p></dd> +<dt id="arg-crop-group-rf">crop_group_RF<a class="anchor" aria-label="anchor" href="#arg-crop-group-rf"></a></dt> +<dd><p>Crop group(s) as used in <a href="drift_parameters_focus.html">drift_parameters_focus</a>, i.e. +"arable", "hops", "vines, late", "vines, early", "fruit, late", "fruit, early" +or "aerial".</p></dd> <dt id="arg-formula">formula<a class="anchor" aria-label="anchor" href="#arg-formula"></a></dt> @@ -88,7 +95,7 @@ FOrum for the Co-ordination of pesticde fate models and their USe. <div class="section level2"> <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> - <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># Compare JKI data with Rautmann formula</span></span></span> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># Compare JKI data with Rautmann and FOCUS formulas for arable crops (default)</span></span></span> <span class="r-in"><span><span class="co"># One application on field crops, for 1 m, 3 m and 5 m distance</span></span></span> <span class="r-in"><span><span class="va">drift_data_JKI</span><span class="op">[[</span><span class="fl">1</span><span class="op">]</span><span class="op">]</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/character.html" class="external-link">as.character</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">3</span>, <span class="fl">5</span><span class="op">)</span><span class="op">)</span>, <span class="st">"Ackerbau"</span><span class="op">]</span></span></span> <span class="r-out co"><span class="r-pr">#></span> 1 3 5 </span> @@ -98,30 +105,45 @@ FOrum for the Co-ordination of pesticde fate models and their USe. <span class="r-in"><span><span class="fu">drift_percentages_rautmann</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">3</span>, <span class="fl">5</span><span class="op">)</span>, formula <span class="op">=</span> <span class="st">"FOCUS"</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> [1] 1.9273922 0.8160023 0.5224362</span> <span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Since pfm 0.6.5, the function can also take a vector of crop groups</span></span></span> +<span class="r-in"><span><span class="fu">drift_percentages_rautmann</span><span class="op">(</span></span></span> +<span class="r-in"><span> distances <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">5</span>, <span class="fl">5</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> crop_group_RF <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"fruit, early"</span>, <span class="st">"fruit, early"</span>, <span class="st">"fruit, late"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 66.702000 19.884442 8.410849</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Two applications, all else equal</span></span></span> +<span class="r-in"><span><span class="va">drift_data_JKI</span><span class="op">[[</span><span class="fl">2</span><span class="op">]</span><span class="op">]</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/character.html" class="external-link">as.character</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">3</span>, <span class="fl">5</span><span class="op">)</span><span class="op">)</span>, <span class="st">"Ackerbau"</span><span class="op">]</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 1 3 5 </span> +<span class="r-out co"><span class="r-pr">#></span> 2.38 0.79 0.47 </span> +<span class="r-in"><span><span class="fu">drift_percentages_rautmann</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">3</span>, <span class="fl">5</span><span class="op">)</span>, applications <span class="op">=</span> <span class="fl">2</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 2.4376000 0.8036556 0.4797365</span> +<span class="r-in"><span><span class="fu">drift_percentages_rautmann</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">3</span>, <span class="fl">5</span><span class="op">)</span>, formula <span class="op">=</span> <span class="st">"FOCUS"</span>, app <span class="op">=</span> <span class="fl">2</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 1.6837733 0.6925952 0.4369331</span> +<span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># One application to early or late fruit crops</span></span></span> <span class="r-in"><span><span class="va">drift_data_JKI</span><span class="op">[[</span><span class="fl">1</span><span class="op">]</span><span class="op">]</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/character.html" class="external-link">as.character</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">20</span>, <span class="fl">50</span><span class="op">)</span><span class="op">)</span>, <span class="st">"Obstbau frueh"</span><span class="op">]</span></span></span> <span class="r-out co"><span class="r-pr">#></span> 3 5 20 50 </span> <span class="r-out co"><span class="r-pr">#></span> 29.20 19.89 2.77 0.30 </span> -<span class="r-in"><span><span class="fu">drift_percentages_rautmann</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">20</span>, <span class="fl">50</span><span class="op">)</span>, crop_group <span class="op">=</span> <span class="st">"fruit, early"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu">drift_percentages_rautmann</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">20</span>, <span class="fl">50</span><span class="op">)</span>, crop_group_RF <span class="op">=</span> <span class="st">"fruit, early"</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> [1] 29.1973659 19.8844422 2.7618138 0.3012008</span> -<span class="r-in"><span><span class="fu">drift_percentages_rautmann</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">20</span>, <span class="fl">50</span><span class="op">)</span>, crop_group <span class="op">=</span> <span class="st">"fruit, early"</span>,</span></span> +<span class="r-in"><span><span class="fu">drift_percentages_rautmann</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">20</span>, <span class="fl">50</span><span class="op">)</span>, crop_group_RF <span class="op">=</span> <span class="st">"fruit, early"</span>,</span></span> <span class="r-in"><span> formula <span class="op">=</span> <span class="st">"FOCUS"</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> [1] 26.1193421 18.5428680 2.6038558 0.2940792</span> <span class="r-in"><span><span class="va">drift_data_JKI</span><span class="op">[[</span><span class="fl">1</span><span class="op">]</span><span class="op">]</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/character.html" class="external-link">as.character</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">20</span>, <span class="fl">50</span><span class="op">)</span><span class="op">)</span>, <span class="st">"Obstbau spaet"</span><span class="op">]</span></span></span> <span class="r-out co"><span class="r-pr">#></span> 3 5 20 50 </span> <span class="r-out co"><span class="r-pr">#></span> 15.73 8.41 1.09 0.22 </span> -<span class="r-in"><span><span class="fu">drift_percentages_rautmann</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">20</span>, <span class="fl">50</span><span class="op">)</span>, crop_group <span class="op">=</span> <span class="st">"fruit, late"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu">drift_percentages_rautmann</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">20</span>, <span class="fl">50</span><span class="op">)</span>, crop_group_RF <span class="op">=</span> <span class="st">"fruit, late"</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> [1] 15.7246994 8.4108487 1.0813887 0.2155992</span> -<span class="r-in"><span><span class="fu">drift_percentages_rautmann</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">20</span>, <span class="fl">50</span><span class="op">)</span>, crop_group <span class="op">=</span> <span class="st">"fruit, late"</span>,</span></span> +<span class="r-in"><span><span class="fu">drift_percentages_rautmann</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">20</span>, <span class="fl">50</span><span class="op">)</span>, crop_group_RF <span class="op">=</span> <span class="st">"fruit, late"</span>,</span></span> <span class="r-in"><span> formula <span class="op">=</span> <span class="st">"FOCUS"</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> [1] 13.1414350 7.5123244 1.0359007 0.2118734</span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># We get a continuum if the waterbody covers the hinge distance</span></span></span> <span class="r-in"><span><span class="co"># (11.4 m for 1 early app to fruit)</span></span></span> <span class="r-in"><span><span class="va">x</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">seq</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fl">30</span>, by <span class="op">=</span> <span class="fl">0.1</span><span class="op">)</span></span></span> -<span class="r-in"><span><span class="va">d</span> <span class="op"><-</span> <span class="fu">drift_percentages_rautmann</span><span class="op">(</span><span class="va">x</span>, crop_group <span class="op">=</span> <span class="st">"fruit, early"</span>, formula <span class="op">=</span> <span class="st">"FOCUS"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">d</span> <span class="op"><-</span> <span class="fu">drift_percentages_rautmann</span><span class="op">(</span><span class="va">x</span>, crop_group_RF <span class="op">=</span> <span class="st">"fruit, early"</span>, formula <span class="op">=</span> <span class="st">"FOCUS"</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">d</span>, type <span class="op">=</span> <span class="st">"l"</span>,</span></span> -<span class="r-in"><span> xlab <span class="op">=</span> <span class="st">"Distance of near edge [m]"</span>, </span></span> +<span class="r-in"><span> xlab <span class="op">=</span> <span class="st">"Distance of near edge [m]"</span>,</span></span> <span class="r-in"><span> ylab <span class="op">=</span> <span class="st">"Mean drift percentage over waterbody width"</span>,</span></span> <span class="r-in"><span> main <span class="op">=</span> <span class="st">"One application to fruit, early"</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/abline.html" class="external-link">abline</a></span><span class="op">(</span>v <span class="op">=</span> <span class="fl">11.4</span>, lty <span class="op">=</span> <span class="fl">2</span><span class="op">)</span></span></span> @@ -137,7 +159,7 @@ FOrum for the Co-ordination of pesticde fate models and their USe. </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/drift_percentages_rautmann.md b/docs/reference/drift_percentages_rautmann.md new file mode 100644 index 0000000..cd323a3 --- /dev/null +++ b/docs/reference/drift_percentages_rautmann.md @@ -0,0 +1,111 @@ +# Calculate drift percentages based on Rautmann data + +Calculate drift percentages based on Rautmann data + +## Usage + +``` r +drift_percentages_rautmann( + distances, + applications = 1, + crop_group_RF = "arable", + formula = c("Rautmann", "FOCUS"), + widths = 1 +) +``` + +## Arguments + +- distances: + + The distances in m for which to get PEC values + +- applications: + + Number of applications for selection of drift percentile + +- crop_group_RF: + + Crop group(s) as used in + [drift_parameters_focus](https://pkgdown.jrwb.de/pfm/reference/drift_parameters_focus.md), + i.e. "arable", "hops", "vines, late", "vines, early", "fruit, late", + "fruit, early" or "aerial". + +- formula: + + By default, the original Rautmann formula is used. If you specify + "FOCUS", mean drift input over the width of the water body is + calculated as described in Chapter 5.4.5 of the FOCUS surface water + guidance + +- widths: + + The widths of the water bodies (only used in the FOCUS formula) + +## 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> + +## See also + +[drift_parameters_focus](https://pkgdown.jrwb.de/pfm/reference/drift_parameters_focus.md), +[PEC_sw_drift](https://pkgdown.jrwb.de/pfm/reference/PEC_sw_drift.md) + +## Examples + +``` r +# Compare JKI data with Rautmann and FOCUS formulas for arable crops (default) +# One application on field crops, for 1 m, 3 m and 5 m distance +drift_data_JKI[[1]][as.character(c(1, 3, 5)), "Ackerbau"] +#> 1 3 5 +#> 2.77 0.95 0.57 +drift_percentages_rautmann(c(1, 3, 5)) +#> [1] 2.7593000 0.9424748 0.5719342 +drift_percentages_rautmann(c(1, 3, 5), formula = "FOCUS") +#> [1] 1.9273922 0.8160023 0.5224362 + +# Since pfm 0.6.5, the function can also take a vector of crop groups +drift_percentages_rautmann( + distances = c(1, 5, 5), + crop_group_RF = c("fruit, early", "fruit, early", "fruit, late")) +#> [1] 66.702000 19.884442 8.410849 + +# Two applications, all else equal +drift_data_JKI[[2]][as.character(c(1, 3, 5)), "Ackerbau"] +#> 1 3 5 +#> 2.38 0.79 0.47 +drift_percentages_rautmann(c(1, 3, 5), applications = 2) +#> [1] 2.4376000 0.8036556 0.4797365 +drift_percentages_rautmann(c(1, 3, 5), formula = "FOCUS", app = 2) +#> [1] 1.6837733 0.6925952 0.4369331 + +# One application to early or late fruit crops +drift_data_JKI[[1]][as.character(c(3, 5, 20, 50)), "Obstbau frueh"] +#> 3 5 20 50 +#> 29.20 19.89 2.77 0.30 +drift_percentages_rautmann(c(3, 5, 20, 50), crop_group_RF = "fruit, early") +#> [1] 29.1973659 19.8844422 2.7618138 0.3012008 +drift_percentages_rautmann(c(3, 5, 20, 50), crop_group_RF = "fruit, early", + formula = "FOCUS") +#> [1] 26.1193421 18.5428680 2.6038558 0.2940792 +drift_data_JKI[[1]][as.character(c(3, 5, 20, 50)), "Obstbau spaet"] +#> 3 5 20 50 +#> 15.73 8.41 1.09 0.22 +drift_percentages_rautmann(c(3, 5, 20, 50), crop_group_RF = "fruit, late") +#> [1] 15.7246994 8.4108487 1.0813887 0.2155992 +drift_percentages_rautmann(c(3, 5, 20, 50), crop_group_RF = "fruit, late", + formula = "FOCUS") +#> [1] 13.1414350 7.5123244 1.0359007 0.2118734 + +# We get a continuum if the waterbody covers the hinge distance +# (11.4 m for 1 early app to fruit) +x <- seq(3, 30, by = 0.1) +d <- drift_percentages_rautmann(x, crop_group_RF = "fruit, early", formula = "FOCUS") +plot(x, d, type = "l", + xlab = "Distance of near edge [m]", + ylab = "Mean drift percentage over waterbody width", + main = "One application to fruit, early") +abline(v = 11.4, lty = 2) +``` diff --git a/docs/reference/endpoint.html b/docs/reference/endpoint.html index 228d77f..08c4bf9 100644 --- a/docs/reference/endpoint.html +++ b/docs/reference/endpoint.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Retrieve endpoint information from the chyaml field of a chent object — endpoint • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Retrieve endpoint information from the chyaml field of a chent object — endpoint"><meta name="description" content="R6 class objects of class chent represent chemical entities +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Retrieve endpoint information from the chyaml field of a chent object — endpoint • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Retrieve endpoint information from the chyaml field of a chent object — endpoint"><meta name="description" content="R6 class objects of class chent represent chemical entities and can hold a list of information loaded from a chemical yaml file in their chyaml field. Such information is extracted and optionally aggregated by this function."><meta property="og:description" content="R6 class objects of class chent represent chemical entities @@ -13,7 +19,7 @@ this function."></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -160,7 +166,7 @@ exponent is often called 1/n.</p> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/endpoint.md b/docs/reference/endpoint.md new file mode 100644 index 0000000..62eea9d --- /dev/null +++ b/docs/reference/endpoint.md @@ -0,0 +1,108 @@ +# Retrieve endpoint information from the chyaml field of a chent object + +R6 class objects of class chent represent chemical entities and can hold +a list of information loaded from a chemical yaml file in their chyaml +field. Such information is extracted and optionally aggregated by this +function. + +## Usage + +``` r +endpoint( + chent, + medium = "soil", + type = c("degradation", "sorption"), + lab_field = c(NA, "laboratory", "field"), + redox = c(NA, "aerobic", "anaerobic"), + value = c("DT50ref", "Kfoc", "N"), + aggregator = geomean, + raw = FALSE, + signif = 3 +) + +soil_DT50( + chent, + aggregator = geomean, + signif = 3, + lab_field = "laboratory", + value = "DT50ref", + redox = "aerobic", + raw = FALSE +) + +soil_Kfoc(chent, aggregator = geomean, signif = 3, value = "Kfoc", raw = FALSE) + +soil_N(chent, aggregator = mean, signif = 3, raw = FALSE) + +soil_sorption( + chent, + values = c("Kfoc", "N"), + aggregators = c(Kfoc = geomean, Koc = geomean, N = mean), + signif = c(Kfoc = 3, N = 3), + raw = FALSE +) +``` + +## Arguments + +- chent: + + The chent object to get the information from + +- medium: + + The medium for which information is sought + +- type: + + The information type + +- lab_field: + + If not NA, do we want laboratory or field endpoints + +- redox: + + If not NA, are we looking for aerobic or anaerobic data + +- value: + + The name of the value we want. The list given in the usage section is + not exclusive + +- aggregator: + + The aggregator function. Can be mean, + [`geomean`](https://pkgdown.jrwb.de/pfm/reference/geomean.md), or + identity, for example. + +- raw: + + Should the number(s) be returned as stored in the chent object (could + be a character value) to retain original information about precision? + +- signif: + + How many significant digits do we want + +- values: + + The values to be returned + +- aggregators: + + A named vector of aggregator functions to be used + +## Value + +The result from applying the aggregator function to the values converted +to a numeric vector, rounded to the given number of significant digits, +or, if raw = TRUE, the values as a character value, retaining any +implicit information on precision that may be present. + +## Details + +The functions `soil_*` are functions to extract soil specific endpoints. +For the Freundlich exponent, the capital letter `N` is used in order to +facilitate dealing with such data in R. In pesticide fate modelling, +this exponent is often called 1/n. diff --git a/docs/reference/geomean.html b/docs/reference/geomean.html index 347d9d7..2a0bc3a 100644 --- a/docs/reference/geomean.html +++ b/docs/reference/geomean.html @@ -1,51 +1,48 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Based on some posts in a thread on Stackoverflow +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate the geometric mean — geomean • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate the geometric mean — geomean"><meta name="description" content="Based on some posts in a thread on Stackoverflow http://stackoverflow.com/questions/2602583/geometric-mean-is-there-a-built-in This function returns NA if NA values are present and na.rm = FALSE (default). If negative values are present, it gives an error message. -If at least one element of the vector is 0, it returns 0."><title>Calculate the geometric mean — geomean • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate the geometric mean — geomean"><meta property="og:description" content="Based on some posts in a thread on Stackoverflow +If at least one element of the vector is 0, it returns 0."><meta property="og:description" content="Based on some posts in a thread on Stackoverflow http://stackoverflow.com/questions/2602583/geometric-mean-is-there-a-built-in This function returns NA if NA values are present and na.rm = FALSE (default). If negative values are present, it gives an error message. -If at least one element of the vector is 0, it returns 0."><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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> +If at least one element of the vector is 0, it returns 0."></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> - - <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container"> - + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.1</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> + - <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar" class="collapse navbar-collapse ms-3"> - <ul class="navbar-nav me-auto"><li class="active nav-item"> - <a class="nav-link" href="../reference/index.html">Reference</a> -</li> - </ul><form class="form-inline my-2 my-lg-0" role="search"> - <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form> - - <ul class="navbar-nav"><li class="nav-item"> - <a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="github"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> </ul></div> - + </div> </nav><div class="container template-reference-topic"> <div class="row"> <main id="main" class="col-md-9"><div class="page-header"> - <img src="" class="logo" alt=""><h1>Calculate the geometric mean</h1> + + <h1>Calculate the geometric mean</h1> <small class="dont-index">Source: <a href="https://github.com/jranke/pfm/blob/HEAD/R/geomean.R" class="external-link"><code>R/geomean.R</code></a></small> <div class="d-none name"><code>geomean.Rd</code></div> </div> @@ -65,19 +62,19 @@ If at least one element of the vector is 0, it returns 0.</p> <div class="section level2"> <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> - <dl><dt>x</dt> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> <dd><p>Vector of numbers</p></dd> -<dt>na.rm</dt> +<dt id="arg-na-rm">na.rm<a class="anchor" aria-label="anchor" href="#arg-na-rm"></a></dt> <dd><p>Should NA values be omitted?</p></dd> </dl></div> <div class="section level2"> <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> - - -<p>The geometric mean</p> + <p>The geometric mean</p> </div> <div class="section level2"> <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> @@ -94,23 +91,23 @@ If at least one element of the vector is 0, it returns 0.</p> <span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in geomean(c(1, -3, 9)):</span> Only defined for positive numbers</span> </code></pre></div> </div> - </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </nav></aside></div> <footer><div class="pkgdown-footer-left"> - <p></p><p>Developed by Johannes Ranke.</p> + <p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown-footer-right"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> - - + + </body></html> diff --git a/docs/reference/geomean.md b/docs/reference/geomean.md new file mode 100644 index 0000000..9567bdb --- /dev/null +++ b/docs/reference/geomean.md @@ -0,0 +1,42 @@ +# Calculate the geometric mean + +Based on some posts in a thread on Stackoverflow +<http://stackoverflow.com/questions/2602583/geometric-mean-is-there-a-built-in> +This function returns NA if NA values are present and na.rm = FALSE +(default). If negative values are present, it gives an error message. If +at least one element of the vector is 0, it returns 0. + +## Usage + +``` r +geomean(x, na.rm = FALSE) +``` + +## Arguments + +- x: + + Vector of numbers + +- na.rm: + + Should NA values be omitted? + +## Value + +The geometric mean + +## Author + +Johannes Ranke + +## Examples + +``` r +geomean(c(1, 3, 9)) +#> [1] 3 +geomean(c(1, 3, NA, 9)) +#> [1] NA +geomean(c(1, -3, 9)) # returns an error +#> Error in geomean(c(1, -3, 9)): Only defined for positive numbers +``` diff --git a/docs/reference/get_vertex.html b/docs/reference/get_vertex.html index d0eff28..fc35914 100644 --- a/docs/reference/get_vertex.html +++ b/docs/reference/get_vertex.html @@ -1,45 +1,42 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="This was inspired by an answer on stackoverflow -https://stackoverflow.com/a/717791"><title>Fit a parabola through three points — get_vertex • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Fit a parabola through three points — get_vertex"><meta property="og:description" content="This was inspired by an answer on stackoverflow -https://stackoverflow.com/a/717791"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Fit a parabola through three points — get_vertex • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Fit a parabola through three points — get_vertex"><meta name="description" content="This was inspired by an answer on stackoverflow +https://stackoverflow.com/a/717791"><meta property="og:description" content="This was inspired by an answer on stackoverflow +https://stackoverflow.com/a/717791"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> - - <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container"> - + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.1</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> + - <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar" class="collapse navbar-collapse ms-3"> - <ul class="navbar-nav me-auto"><li class="active nav-item"> - <a class="nav-link" href="../reference/index.html">Reference</a> -</li> - </ul><form class="form-inline my-2 my-lg-0" role="search"> - <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form> - - <ul class="navbar-nav"><li class="nav-item"> - <a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="github"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> </ul></div> - + </div> </nav><div class="container template-reference-topic"> <div class="row"> <main id="main" class="col-md-9"><div class="page-header"> - <img src="" class="logo" alt=""><h1>Fit a parabola through three points</h1> + + <h1>Fit a parabola through three points</h1> <small class="dont-index">Source: <a href="https://github.com/jranke/pfm/blob/HEAD/R/PEC_soil.R" class="external-link"><code>R/PEC_soil.R</code></a></small> <div class="d-none name"><code>get_vertex.Rd</code></div> </div> @@ -56,32 +53,34 @@ https://stackoverflow.com/a/717791</p> <div class="section level2"> <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> - <dl><dt>x</dt> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> <dd><p>Three x coordinates</p></dd> -<dt>y</dt> +<dt id="arg-y">y<a class="anchor" aria-label="anchor" href="#arg-y"></a></dt> <dd><p>Three y coordinates</p></dd> </dl></div> - </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </nav></aside></div> <footer><div class="pkgdown-footer-left"> - <p></p><p>Developed by Johannes Ranke.</p> + <p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown-footer-right"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> - - + + </body></html> diff --git a/docs/reference/get_vertex.md b/docs/reference/get_vertex.md new file mode 100644 index 0000000..5f2b18b --- /dev/null +++ b/docs/reference/get_vertex.md @@ -0,0 +1,20 @@ +# Fit a parabola through three points + +This was inspired by an answer on stackoverflow +https://stackoverflow.com/a/717791 + +## Usage + +``` r +get_vertex(x, y) +``` + +## Arguments + +- x: + + Three x coordinates + +- y: + + Three y coordinates diff --git a/docs/reference/index.html b/docs/reference/index.html index 97f59b5..249a2f3 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Package index • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Package index"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Package index • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Package index"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -7,7 +13,7 @@ <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -36,8 +42,7 @@ <div class="section-desc"><p>Functions that are independent of specific fate modelling areas</p></div> - - </div><div class="section level2"> + <dl></dl></div><div class="section level2"> @@ -48,61 +53,71 @@ </dt> <dd>Calculate the geometric mean</dd> - </dl><dl><dt> + + <dt> <code><a href="one_box.html">one_box()</a></code> </dt> <dd>Create a time series of decline data</dd> - </dl><dl><dt> + + <dt> <code><a href="plot.one_box.html">plot(<i><one_box></i>)</a></code> </dt> <dd>Plot time series of decline data</dd> - </dl><dl><dt> + + <dt> <code><a href="sawtooth.html">sawtooth()</a></code> </dt> <dd>Create decline time series for multiple applications</dd> - </dl><dl><dt> + + <dt> <code><a href="twa.html">twa()</a></code> </dt> <dd>Calculate a time weighted average concentration</dd> - </dl><dl><dt> + + <dt> <code><a href="max_twa.html">max_twa()</a></code> </dt> <dd>The maximum time weighted average concentration for a moving window</dd> - </dl><dl><dt> + + <dt> <code><a href="pfm_degradation.html">pfm_degradation()</a></code> </dt> <dd>Calculate a time course of relative concentrations based on an mkinmod model</dd> - </dl><dl><dt> + + <dt> <code><a href="SFO_actual_twa.html">SFO_actual_twa()</a></code> </dt> <dd>Actual and maximum moving window time average concentrations for SFO kinetics</dd> - </dl><dl><dt> + + <dt> <code><a href="FOMC_actual_twa.html">FOMC_actual_twa()</a></code> </dt> <dd>Actual and maximum moving window time average concentrations for FOMC kinetics</dd> - </dl><dl><dt> + + <dt> <code><a href="reexports.html">reexports</a></code> <code><a href="reexports.html">set_nd_nq</a></code> <code><a href="reexports.html">set_nd_nq_focus</a></code> </dt> <dd>Objects exported from other packages</dd> - </dl><dl><dt> + + <dt> <code><a href="TSCF.html">TSCF()</a></code> @@ -113,8 +128,7 @@ - - </div><div class="section level2"> + <dl></dl></div><div class="section level2"> @@ -125,31 +139,36 @@ </dt> <dd>Calculate predicted environmental concentrations in soil</dd> - </dl><dl><dt> + + <dt> <code><a href="PEC_soil_mets.html">PEC_soil_mets()</a></code> </dt> <dd>Calculate initial and accumulation PEC soil for a set of metabolites</dd> - </dl><dl><dt> + + <dt> <code><a href="soil_scenario_data_EFSA_2015.html">soil_scenario_data_EFSA_2015</a></code> </dt> <dd>Properties of the predefined scenarios from the EFSA guidance from 2015</dd> - </dl><dl><dt> + + <dt> <code><a href="soil_scenario_data_EFSA_2017.html">soil_scenario_data_EFSA_2017</a></code> </dt> <dd>Properties of the predefined scenarios from the EFSA guidance from 2017</dd> - </dl><dl><dt> + + <dt> <code><a href="PEC_FOMC_accu_rel.html">PEC_FOMC_accu_rel()</a></code> </dt> <dd>Get the relative accumulation of an FOMC model over multiples of an interval</dd> - </dl><dl><dt> + + <dt> <code><a href="EFSA_washoff_2017.html">EFSA_washoff_2017</a></code> @@ -160,8 +179,7 @@ - - </div><div class="section level2"> + <dl></dl></div><div class="section level2"> @@ -172,7 +190,8 @@ </dt> <dd>A very small subset of the FOCUS Groundwater scenario definitions</dd> - </dl><dl><dt> + + <dt> <code><a href="EFSA_GW_interception_2014.html">EFSA_GW_interception_2014</a></code> @@ -183,8 +202,7 @@ - - </div><div class="section level2"> + <dl></dl></div><div class="section level2"> @@ -195,91 +213,106 @@ </dt> <dd>Calculate predicted environmental concentrations in surface water due to drift</dd> - </dl><dl><dt> + + <dt> <code><a href="drift_data_JKI.html">drift_data_JKI</a></code> </dt> <dd>Deposition from spray drift expressed as percent of the applied dose as published by the JKI</dd> - </dl><dl><dt> + + <dt> <code><a href="drift_parameters_focus.html">drift_parameters_focus</a></code> </dt> <dd>Regression parameters for the Rautmann drift data</dd> - </dl><dl><dt> + + <dt> <code><a href="drift_percentages_rautmann.html">drift_percentages_rautmann()</a></code> </dt> <dd>Calculate drift percentages based on Rautmann data</dd> - </dl><dl><dt> - <code><a href="PEC_sw_drainage_UK.html">PEC_sw_drainage_UK()</a></code> + <dt> + + <code><a href="PEC_sw_drainage_UK.html">PEC_sw_drainage_UK()</a></code> <code><a href="PEC_sw_drainage_UK.html">drainage_date_UK()</a></code> </dt> <dd>Calculate initial predicted environmental concentrations in surface water due to drainage using the UK method</dd> - </dl><dl><dt> + + <dt> <code><a href="PEC_sw_sed.html">PEC_sw_sed()</a></code> </dt> <dd>Calculate predicted environmental concentrations in sediment from surface water concentrations</dd> - </dl><dl><dt> + + <dt> <code><a href="PEC_sw_focus.html">PEC_sw_focus()</a></code> </dt> <dd>Calculate PEC surface water at FOCUS Step 1</dd> - </dl><dl><dt> + + <dt> <code><a href="chent_focus_sw.html">chent_focus_sw()</a></code> </dt> <dd>Create a chemical compound object for FOCUS Step 1 calculations</dd> - </dl><dl><dt> + + <dt> <code><a href="FOCUS_Step_12_scenarios.html">FOCUS_Step_12_scenarios</a></code> </dt> <dd>Step 1/2 scenario data as distributed with the FOCUS Step 1/2 calculator</dd> - </dl><dl><dt> + + <dt> <code><a href="PEC_sw_exposit_drainage.html">PEC_sw_exposit_drainage()</a></code> </dt> <dd>Calculate PEC surface water due to drainage as in Exposit 3</dd> - </dl><dl><dt> + + <dt> <code><a href="PEC_sw_exposit_runoff.html">PEC_sw_exposit_runoff()</a></code> </dt> <dd>Calculate PEC surface water due to runoff and erosion as in Exposit 3</dd> - </dl><dl><dt> + + <dt> <code><a href="perc_runoff_exposit.html">perc_runoff_exposit</a></code> </dt> <dd>Runoff loss percentages as used in Exposit 3</dd> - </dl><dl><dt> + + <dt> <code><a href="perc_runoff_reduction_exposit.html">perc_runoff_reduction_exposit</a></code> </dt> <dd>Runoff reduction percentages as used in Exposit</dd> - </dl><dl><dt> + + <dt> <code><a href="TOXSWA_cwa.html">TOXSWA_cwa</a></code> </dt> <dd>R6 class for holding TOXSWA water concentration data and associated statistics</dd> - </dl><dl><dt> + + <dt> <code><a href="read.TOXSWA_cwa.html">read.TOXSWA_cwa()</a></code> </dt> <dd>Read TOXSWA surface water concentrations</dd> - </dl><dl><dt> + + <dt> <code><a href="plot.TOXSWA_cwa.html">plot(<i><TOXSWA_cwa></i>)</a></code> @@ -290,8 +323,7 @@ <div class="section-desc"><p>Evaluating environmental fate properties</p></div> - - </div><div class="section level2"> + <dl></dl></div><div class="section level2"> @@ -302,7 +334,8 @@ </dt> <dd>Determine the SSLRC mobility classification for a chemical substance from its Koc</dd> - </dl><dl><dt> + + <dt> <code><a href="GUS.html">GUS()</a></code> <code><a href="GUS.html">print(<i><GUS_result></i>)</a></code> @@ -313,8 +346,7 @@ - - </div><div class="section level2"> + <dl></dl></div><div class="section level2"> @@ -330,8 +362,7 @@ - - </div><div class="section level2"> + <dl></dl></div><div class="section level2"> @@ -352,7 +383,7 @@ </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/index.md b/docs/reference/index.md new file mode 100644 index 0000000..089bd81 --- /dev/null +++ b/docs/reference/index.md @@ -0,0 +1,128 @@ +# Package index + +## General utility functions + +Functions that are independent of specific fate modelling areas + +- [`geomean()`](https://pkgdown.jrwb.de/pfm/reference/geomean.md) : + Calculate the geometric mean +- [`one_box()`](https://pkgdown.jrwb.de/pfm/reference/one_box.md) : + Create a time series of decline data +- [`plot(`*`<one_box>`*`)`](https://pkgdown.jrwb.de/pfm/reference/plot.one_box.md) + : Plot time series of decline data +- [`sawtooth()`](https://pkgdown.jrwb.de/pfm/reference/sawtooth.md) : + Create decline time series for multiple applications +- [`twa()`](https://pkgdown.jrwb.de/pfm/reference/twa.md) : Calculate a + time weighted average concentration +- [`max_twa()`](https://pkgdown.jrwb.de/pfm/reference/max_twa.md) : The + maximum time weighted average concentration for a moving window +- [`pfm_degradation()`](https://pkgdown.jrwb.de/pfm/reference/pfm_degradation.md) + : Calculate a time course of relative concentrations based on an + mkinmod model +- [`SFO_actual_twa()`](https://pkgdown.jrwb.de/pfm/reference/SFO_actual_twa.md) + : Actual and maximum moving window time average concentrations for SFO + kinetics +- [`FOMC_actual_twa()`](https://pkgdown.jrwb.de/pfm/reference/FOMC_actual_twa.md) + : Actual and maximum moving window time average concentrations for + FOMC kinetics +- [`reexports`](https://pkgdown.jrwb.de/pfm/reference/reexports.md) + [`set_nd_nq`](https://pkgdown.jrwb.de/pfm/reference/reexports.md) + [`set_nd_nq_focus`](https://pkgdown.jrwb.de/pfm/reference/reexports.md) + : Objects exported from other packages +- [`TSCF()`](https://pkgdown.jrwb.de/pfm/reference/TSCF.md) : Estimation + of the transpiration stream concentration factor + +## Predicted environmental concentrations in soil + +- [`PEC_soil()`](https://pkgdown.jrwb.de/pfm/reference/PEC_soil.md) : + Calculate predicted environmental concentrations in soil +- [`PEC_soil_mets()`](https://pkgdown.jrwb.de/pfm/reference/PEC_soil_mets.md) + : Calculate initial and accumulation PEC soil for a set of metabolites +- [`soil_scenario_data_EFSA_2015`](https://pkgdown.jrwb.de/pfm/reference/soil_scenario_data_EFSA_2015.md) + : Properties of the predefined scenarios from the EFSA guidance from + 2015 +- [`soil_scenario_data_EFSA_2017`](https://pkgdown.jrwb.de/pfm/reference/soil_scenario_data_EFSA_2017.md) + : Properties of the predefined scenarios from the EFSA guidance from + 2017 +- [`PEC_FOMC_accu_rel()`](https://pkgdown.jrwb.de/pfm/reference/PEC_FOMC_accu_rel.md) + : Get the relative accumulation of an FOMC model over multiples of an + interval +- [`EFSA_washoff_2017`](https://pkgdown.jrwb.de/pfm/reference/EFSA_washoff_2017.md) + : Subset of EFSA crop washoff default values + +## Predicted environmental concentrations in groundwater + +- [`FOCUS_GW_scenarios_2012`](https://pkgdown.jrwb.de/pfm/reference/FOCUS_GW_scenarios_2012.md) + : A very small subset of the FOCUS Groundwater scenario definitions +- [`EFSA_GW_interception_2014`](https://pkgdown.jrwb.de/pfm/reference/EFSA_GW_interception_2014.md) + : Subset of EFSA crop interception default values for groundwater + modelling + +## Predicted environmental concentrations in surface water + +- [`PEC_sw_drift()`](https://pkgdown.jrwb.de/pfm/reference/PEC_sw_drift.md) + : Calculate predicted environmental concentrations in surface water + due to drift +- [`drift_data_JKI`](https://pkgdown.jrwb.de/pfm/reference/drift_data_JKI.md) + : Deposition from spray drift expressed as percent of the applied dose + as published by the JKI +- [`drift_parameters_focus`](https://pkgdown.jrwb.de/pfm/reference/drift_parameters_focus.md) + : Regression parameters for the Rautmann drift data +- [`drift_percentages_rautmann()`](https://pkgdown.jrwb.de/pfm/reference/drift_percentages_rautmann.md) + : Calculate drift percentages based on Rautmann data +- [`PEC_sw_drainage_UK()`](https://pkgdown.jrwb.de/pfm/reference/PEC_sw_drainage_UK.md) + [`drainage_date_UK()`](https://pkgdown.jrwb.de/pfm/reference/PEC_sw_drainage_UK.md) + : Calculate initial predicted environmental concentrations in surface + water due to drainage using the UK method +- [`PEC_sw_sed()`](https://pkgdown.jrwb.de/pfm/reference/PEC_sw_sed.md) + : Calculate predicted environmental concentrations in sediment from + surface water concentrations +- [`PEC_sw_focus()`](https://pkgdown.jrwb.de/pfm/reference/PEC_sw_focus.md) + : Calculate PEC surface water at FOCUS Step 1 +- [`chent_focus_sw()`](https://pkgdown.jrwb.de/pfm/reference/chent_focus_sw.md) + : Create a chemical compound object for FOCUS Step 1 calculations +- [`FOCUS_Step_12_scenarios`](https://pkgdown.jrwb.de/pfm/reference/FOCUS_Step_12_scenarios.md) + : Step 1/2 scenario data as distributed with the FOCUS Step 1/2 + calculator +- [`PEC_sw_exposit_drainage()`](https://pkgdown.jrwb.de/pfm/reference/PEC_sw_exposit_drainage.md) + : Calculate PEC surface water due to drainage as in Exposit 3 +- [`PEC_sw_exposit_runoff()`](https://pkgdown.jrwb.de/pfm/reference/PEC_sw_exposit_runoff.md) + : Calculate PEC surface water due to runoff and erosion as in Exposit + 3 +- [`perc_runoff_exposit`](https://pkgdown.jrwb.de/pfm/reference/perc_runoff_exposit.md) + : Runoff loss percentages as used in Exposit 3 +- [`perc_runoff_reduction_exposit`](https://pkgdown.jrwb.de/pfm/reference/perc_runoff_reduction_exposit.md) + : Runoff reduction percentages as used in Exposit +- [`TOXSWA_cwa`](https://pkgdown.jrwb.de/pfm/reference/TOXSWA_cwa.md) : + R6 class for holding TOXSWA water concentration data and associated + statistics +- [`read.TOXSWA_cwa()`](https://pkgdown.jrwb.de/pfm/reference/read.TOXSWA_cwa.md) + : Read TOXSWA surface water concentrations +- [`plot(`*`<TOXSWA_cwa>`*`)`](https://pkgdown.jrwb.de/pfm/reference/plot.TOXSWA_cwa.md) + : Plot TOXSWA surface water concentrations + +## Classifications and indicators + +Evaluating environmental fate properties + +- [`SSLRC_mobility_classification()`](https://pkgdown.jrwb.de/pfm/reference/SSLRC_mobility_classification.md) + : Determine the SSLRC mobility classification for a chemical substance + from its Koc +- [`GUS()`](https://pkgdown.jrwb.de/pfm/reference/GUS.md) + [`print(`*`<GUS_result>`*`)`](https://pkgdown.jrwb.de/pfm/reference/GUS.md) + : Groundwater ubiquity score based on Gustafson (1989) + +## Work with chent objects containing relevant information + +- [`endpoint()`](https://pkgdown.jrwb.de/pfm/reference/endpoint.md) + [`soil_DT50()`](https://pkgdown.jrwb.de/pfm/reference/endpoint.md) + [`soil_Kfoc()`](https://pkgdown.jrwb.de/pfm/reference/endpoint.md) + [`soil_N()`](https://pkgdown.jrwb.de/pfm/reference/endpoint.md) + [`soil_sorption()`](https://pkgdown.jrwb.de/pfm/reference/endpoint.md) + : Retrieve endpoint information from the chyaml field of a chent + object + +## Utilities + +- [`get_vertex()`](https://pkgdown.jrwb.de/pfm/reference/get_vertex.md) + : Fit a parabola through three points diff --git a/docs/reference/max_twa.html b/docs/reference/max_twa.html index 74eeb46..8ceca6c 100644 --- a/docs/reference/max_twa.html +++ b/docs/reference/max_twa.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>The maximum time weighted average concentration for a moving window — max_twa • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="The maximum time weighted average concentration for a moving window — max_twa"><meta name="description" content="If you generate your time series using sawtooth, +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>The maximum time weighted average concentration for a moving window — max_twa • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="The maximum time weighted average concentration for a moving window — max_twa"><meta name="description" content="If you generate your time series using sawtooth, you need to make sure that the length of the time series allows for finding the maximum. It is therefore recommended to check this using plot.one_box using the window size for the argument @@ -15,7 +21,7 @@ max_twa."></head><body> <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -59,7 +65,7 @@ for finding the maximum. It is therefore recommended to check this using <dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> -<dd><p>An object of type <code><a href="one_box.html">one_box</a></code></p></dd> +<dd><p>An object of type <a href="one_box.html">one_box</a></p></dd> <dt id="arg-window">window<a class="anchor" aria-label="anchor" href="#arg-window"></a></dt> @@ -68,7 +74,7 @@ for finding the maximum. It is therefore recommended to check this using </dl></div> <div class="section level2"> <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> - <p>The method working directly on fitted <code><a href="https://pkgdown.jrwb.de/mkin/reference/mkinfit.html" class="external-link">mkinfit</a></code> objects uses the + <p>The method working directly on fitted <a href="https://pkgdown.jrwb.de/mkin/reference/mkinfit.html" class="external-link">mkinfit</a> objects uses the equations given in the PEC soil section of the FOCUS guidance and is restricted SFO, FOMC and DFOP models and to the parent compound</p> </div> @@ -117,7 +123,7 @@ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/max_twa.md b/docs/reference/max_twa.md new file mode 100644 index 0000000..fc9fe56 --- /dev/null +++ b/docs/reference/max_twa.md @@ -0,0 +1,68 @@ +# The maximum time weighted average concentration for a moving window + +If you generate your time series using +[`sawtooth`](https://pkgdown.jrwb.de/pfm/reference/sawtooth.md), you +need to make sure that the length of the time series allows for finding +the maximum. It is therefore recommended to check this using +[`plot.one_box`](https://pkgdown.jrwb.de/pfm/reference/plot.one_box.md) +using the window size for the argument `max_twa`. + +## Usage + +``` r +max_twa(x, window = 21) +``` + +## Arguments + +- x: + + An object of type + [one_box](https://pkgdown.jrwb.de/pfm/reference/one_box.md) + +- window: + + The size of the moving window + +## Details + +The method working directly on fitted +[mkinfit](https://pkgdown.jrwb.de/mkin/reference/mkinfit.html) objects +uses the equations given in the PEC soil section of the FOCUS guidance +and is restricted SFO, FOMC and DFOP models and to the parent compound + +## References + +FOCUS (2006) “Guidance Document on Estimating Persistence and +Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC +Document Reference Sanco/10058/2005 version 2.0, 434 pp, +<http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics> + +## See also + +[`twa`](https://pkgdown.jrwb.de/pfm/reference/twa.md) + +## Examples + +``` r +pred <- sawtooth(one_box(10), + applications = data.frame(time = c(0, 7), amount = c(1, 1))) +max_twa(pred) +#> $max +#> parent +#> 0.9537545 +#> +#> $window_start +#> parent +#> 0 +#> +#> $window_end +#> parent +#> 21 +#> +pred_FOMC <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) +max_twa(pred_FOMC) +#> 21 +#> 18.22124 +``` diff --git a/docs/reference/one_box-1.png b/docs/reference/one_box-1.png Binary files differindex eb4d2ee..1e4b517 100644 --- a/docs/reference/one_box-1.png +++ b/docs/reference/one_box-1.png diff --git a/docs/reference/one_box-2.png b/docs/reference/one_box-2.png Binary files differindex 1b34c2d..6a4d0de 100644 --- a/docs/reference/one_box-2.png +++ b/docs/reference/one_box-2.png diff --git a/docs/reference/one_box-3.png b/docs/reference/one_box-3.png Binary files differindex e4e41ea..d659e3a 100644 --- a/docs/reference/one_box-3.png +++ b/docs/reference/one_box-3.png diff --git a/docs/reference/one_box.html b/docs/reference/one_box.html index bf71b48..4987f15 100644 --- a/docs/reference/one_box.html +++ b/docs/reference/one_box.html @@ -1,43 +1,40 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Create a time series of decline data"><title>Create a time series of decline data — one_box • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Create a time series of decline data — one_box"><meta property="og:description" content="Create a time series of decline data"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Create a time series of decline data — one_box • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Create a time series of decline data — one_box"><meta name="description" content="Create a time series of decline data"><meta property="og:description" content="Create a time series of decline data"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> - - <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container"> - + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.1</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> + - <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar" class="collapse navbar-collapse ms-3"> - <ul class="navbar-nav me-auto"><li class="active nav-item"> - <a class="nav-link" href="../reference/index.html">Reference</a> -</li> - </ul><form class="form-inline my-2 my-lg-0" role="search"> - <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form> - - <ul class="navbar-nav"><li class="nav-item"> - <a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="github"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> </ul></div> - + </div> </nav><div class="container template-reference-topic"> <div class="row"> <main id="main" class="col-md-9"><div class="page-header"> - <img src="" class="logo" alt=""><h1>Create a time series of decline data</h1> + + <h1>Create a time series of decline data</h1> <small class="dont-index">Source: <a href="https://github.com/jranke/pfm/blob/HEAD/R/twa.R" class="external-link"><code>R/twa.R</code></a></small> <div class="d-none name"><code>one_box.Rd</code></div> </div> @@ -50,55 +47,55 @@ <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">one_box</span><span class="op">(</span><span class="va">x</span>, <span class="va">ini</span>, <span class="va">...</span>, t_end <span class="op">=</span> <span class="fl">100</span>, res <span class="op">=</span> <span class="fl">0.01</span><span class="op">)</span></span> <span></span> -<span><span class="co"># S3 method for numeric</span></span> +<span><span class="co"># S3 method for class 'numeric'</span></span> <span><span class="fu">one_box</span><span class="op">(</span><span class="va">x</span>, ini <span class="op">=</span> <span class="fl">1</span>, <span class="va">...</span>, t_end <span class="op">=</span> <span class="fl">100</span>, res <span class="op">=</span> <span class="fl">0.01</span><span class="op">)</span></span> <span></span> -<span><span class="co"># S3 method for character</span></span> +<span><span class="co"># S3 method for class 'character'</span></span> <span><span class="fu">one_box</span><span class="op">(</span><span class="va">x</span>, ini <span class="op">=</span> <span class="fl">1</span>, <span class="va">parms</span>, <span class="va">...</span>, t_end <span class="op">=</span> <span class="fl">100</span>, res <span class="op">=</span> <span class="fl">0.01</span><span class="op">)</span></span> <span></span> -<span><span class="co"># S3 method for mkinfit</span></span> +<span><span class="co"># S3 method for class 'mkinfit'</span></span> <span><span class="fu">one_box</span><span class="op">(</span><span class="va">x</span>, ini <span class="op">=</span> <span class="st">"model"</span>, <span class="va">...</span>, t_end <span class="op">=</span> <span class="fl">100</span>, res <span class="op">=</span> <span class="fl">0.01</span><span class="op">)</span></span></code></pre></div> </div> <div class="section level2"> <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> - <dl><dt>x</dt> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> <dd><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 parameters. -If x is an <code><a href="https://pkgdown.jrwb.de/mkin/reference/mkinfit.html" class="external-link">mkinfit</a></code> object, the decline is calculated from this +If x is an <a href="https://pkgdown.jrwb.de/mkin/reference/mkinfit.html" class="external-link">mkinfit</a> object, the decline is calculated from this object.</p></dd> -<dt>ini</dt> -<dd><p>The initial amount. If x is an <code><a href="https://pkgdown.jrwb.de/mkin/reference/mkinfit.html" class="external-link">mkinfit</a></code> object, and +<dt id="arg-ini">ini<a class="anchor" aria-label="anchor" href="#arg-ini"></a></dt> +<dd><p>The initial amount. If x is an <a href="https://pkgdown.jrwb.de/mkin/reference/mkinfit.html" class="external-link">mkinfit</a> 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.</p></dd> -<dt>...</dt> +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> <dd><p>Further arguments passed to methods</p></dd> -<dt>t_end</dt> +<dt id="arg-t-end">t_end<a class="anchor" aria-label="anchor" href="#arg-t-end"></a></dt> <dd><p>End of the time series</p></dd> -<dt>res</dt> +<dt id="arg-res">res<a class="anchor" aria-label="anchor" href="#arg-res"></a></dt> <dd><p>Resolution of the time series</p></dd> -<dt>parms</dt> +<dt id="arg-parms">parms<a class="anchor" aria-label="anchor" href="#arg-parms"></a></dt> <dd><p>A named numeric vector containing the model parameters</p></dd> </dl></div> <div class="section level2"> <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> - - -<p>An object of class <code>one_box</code>, inheriting from <code><a href="https://rdrr.io/r/stats/ts.html" class="external-link">ts</a></code>.</p> + <p>An object of class <code>one_box</code>, inheriting from <a href="https://rdrr.io/r/stats/ts.html" class="external-link">ts</a>.</p> </div> <div class="section level2"> @@ -125,23 +122,23 @@ all observed variables.</p></dd> <span class="r-plt img"><img src="one_box-3.png" alt="" width="700" height="433"></span> </code></pre></div> </div> - </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </nav></aside></div> <footer><div class="pkgdown-footer-left"> - <p></p><p>Developed by Johannes Ranke.</p> + <p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown-footer-right"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> - - + + </body></html> diff --git a/docs/reference/one_box.md b/docs/reference/one_box.md new file mode 100644 index 0000000..0c93346 --- /dev/null +++ b/docs/reference/one_box.md @@ -0,0 +1,83 @@ +# Create a time series of decline data + +Create a time series of decline data + +## Usage + +``` r +one_box(x, ini, ..., t_end = 100, res = 0.01) + +# S3 method for class 'numeric' +one_box(x, ini = 1, ..., t_end = 100, res = 0.01) + +# S3 method for class 'character' +one_box(x, ini = 1, parms, ..., t_end = 100, res = 0.01) + +# S3 method for class 'mkinfit' +one_box(x, ini = "model", ..., t_end = 100, res = 0.01) +``` + +## Arguments + +- x: + + 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. `FOMC`, `parms` must contain the corresponding parameters. + If x is an + [mkinfit](https://pkgdown.jrwb.de/mkin/reference/mkinfit.html) object, + the decline is calculated from this object. + +- ini: + + The initial amount. If x is an + [mkinfit](https://pkgdown.jrwb.de/mkin/reference/mkinfit.html) 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. + +- ...: + + Further arguments passed to methods + +- t_end: + + End of the time series + +- res: + + Resolution of the time series + +- parms: + + A named numeric vector containing the model parameters + +## Value + +An object of class `one_box`, inheriting from +[ts](https://rdrr.io/r/stats/ts.html). + +## Examples + +``` r +# Only use a half-life +pred_0 <- one_box(10) +plot(pred_0) + + +# Use a fitted mkinfit model +require(mkin) +fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) +pred_1 <- one_box(fit) +plot(pred_1) + + +# Use a model with more than one observed variable +m_2 <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO")) +#> Temporary DLL for differentials generated and loaded +fit_2 <- mkinfit(m_2, FOCUS_2006_D, quiet = TRUE) +#> Warning: Observations with value of zero were removed from the data +pred_2 <- one_box(fit_2, ini = "model") +plot(pred_2) +``` diff --git a/docs/reference/perc_runoff_exposit.html b/docs/reference/perc_runoff_exposit.html index a1afbde..0591ef1 100644 --- a/docs/reference/perc_runoff_exposit.html +++ b/docs/reference/perc_runoff_exposit.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Runoff loss percentages as used in Exposit 3 — perc_runoff_exposit • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Runoff loss percentages as used in Exposit 3 — perc_runoff_exposit"><meta name="description" content="A table of the loss percentages used in Exposit 3 for the twelve different Koc classes"><meta property="og:description" content="A table of the loss percentages used in Exposit 3 for the twelve different Koc classes"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Runoff loss percentages as used in Exposit 3 — perc_runoff_exposit • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Runoff loss percentages as used in Exposit 3 — perc_runoff_exposit"><meta name="description" content="A table of the loss percentages used in Exposit 3 for the twelve different Koc classes"><meta property="og:description" content="A table of the loss percentages used in Exposit 3 for the twelve different Koc classes"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -7,7 +13,7 @@ <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -91,7 +97,7 @@ adjacent water body bound to eroding particles</p></dd> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/perc_runoff_exposit.md b/docs/reference/perc_runoff_exposit.md new file mode 100644 index 0000000..9166e2c --- /dev/null +++ b/docs/reference/perc_runoff_exposit.md @@ -0,0 +1,53 @@ +# Runoff loss percentages as used in Exposit 3 + +A table of the loss percentages used in Exposit 3 for the twelve +different Koc classes + +## Usage + +``` r +perc_runoff_exposit +``` + +## Format + +A data frame with percentage values for the dissolved fraction and the +fraction bound to eroding particles, with Koc classes used as row names + +- Koc_lower_bound: + + The lower bound of the Koc class + +- dissolved: + + The percentage of the applied substance transferred to an adjacent + water body in the dissolved phase + +- bound: + + The percentage of the applied substance transferred to an adjacent + water body bound to eroding particles + +## Source + +Excel 3.02 spreadsheet available from +<https://www.bvl.bund.de/SharedDocs/Downloads/04_Pflanzenschutzmittel/zul_umwelt_exposit.html> + +## Examples + +``` r +print(perc_runoff_exposit) +#> Koc_lower_bound dissolved bound +#> 0-20 0 [L/kg] 0.110 0.000 +#> >20-50 20 [L/kg] 0.151 0.000 +#> >50-100 50 [L/kg] 0.197 0.000 +#> >100-200 100 [L/kg] 0.248 0.001 +#> >200-500 200 [L/kg] 0.224 0.004 +#> >500-1000 500 [L/kg] 0.184 0.020 +#> >1000-2000 1000 [L/kg] 0.133 0.042 +#> >2000-5000 2000 [L/kg] 0.084 0.091 +#> >5000-10000 5000 [L/kg] 0.037 0.159 +#> >10000-20000 10000 [L/kg] 0.031 0.192 +#> >20000-50000 20000 [L/kg] 0.014 0.291 +#> >50000 50000 [L/kg] 0.001 0.451 +``` diff --git a/docs/reference/perc_runoff_reduction_exposit.html b/docs/reference/perc_runoff_reduction_exposit.html index 5bb3a57..22e66c1 100644 --- a/docs/reference/perc_runoff_reduction_exposit.html +++ b/docs/reference/perc_runoff_reduction_exposit.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Runoff reduction percentages as used in Exposit — perc_runoff_reduction_exposit • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Runoff reduction percentages as used in Exposit — perc_runoff_reduction_exposit"><meta name="description" content="A table of the runoff reduction percentages used in Exposit 3 for different vegetated buffer widths"><meta property="og:description" content="A table of the runoff reduction percentages used in Exposit 3 for different vegetated buffer widths"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Runoff reduction percentages as used in Exposit — perc_runoff_reduction_exposit • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Runoff reduction percentages as used in Exposit — perc_runoff_reduction_exposit"><meta name="description" content="A table of the runoff reduction percentages used in Exposit 3 for different vegetated buffer widths"><meta property="og:description" content="A table of the runoff reduction percentages used in Exposit 3 for different vegetated buffer widths"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -7,7 +13,7 @@ <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -103,7 +109,7 @@ The variant 3.01a2 was introduced for consistency with previous calculations per </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/perc_runoff_reduction_exposit.md b/docs/reference/perc_runoff_reduction_exposit.md new file mode 100644 index 0000000..7757223 --- /dev/null +++ b/docs/reference/perc_runoff_reduction_exposit.md @@ -0,0 +1,67 @@ +# Runoff reduction percentages as used in Exposit + +A table of the runoff reduction percentages used in Exposit 3 for +different vegetated buffer widths + +## Usage + +``` r +perc_runoff_reduction_exposit +``` + +## Format + +A named list of data frames with reduction percentage values for the +dissolved fraction and the fraction bound to eroding particles, with +vegetated buffer widths as row names. The names of the list items are +the Exposit versions from which the values were taken. + +- dissolved: + + The reduction percentage for the dissolved phase + +- bound: + + The reduction percentage for the particulate phase + +## Source + +Excel 3.02 spreadsheet available from +<https://www.bvl.bund.de/SharedDocs/Downloads/04_Pflanzenschutzmittel/zul_umwelt_exposit.html> + +Agroscope version 3.01a with additional runoff factors for 3 m and 6 m +buffer zones received from Muris Korkaric (not published). The variant +3.01a2 was introduced for consistency with previous calculations +performed by Agroscope for a 3 m buffer zone. + +## Examples + +``` r +print(perc_runoff_reduction_exposit) +#> $`3.02` +#> dissolved bound +#> No buffer 0 0 +#> 5 m 40 40 +#> 10 m 60 85 +#> 20 m 80 95 +#> +#> $`3.01a` +#> dissolved bound +#> No buffer 0 0 +#> 3 m 25 30 +#> 5 m 40 40 +#> 6 m 45 55 +#> 10 m 60 85 +#> 20 m 80 95 +#> +#> $`3.01a2` +#> dissolved bound +#> No buffer 0 0 +#> 3 m 25 25 +#> +#> $`2.0` +#> dissolved bound +#> No buffer 0.0 0.0 +#> 20 m 97.5 97.5 +#> +``` diff --git a/docs/reference/pfm_degradation.html b/docs/reference/pfm_degradation.html index 8b21cf5..b4f3279 100644 --- a/docs/reference/pfm_degradation.html +++ b/docs/reference/pfm_degradation.html @@ -1,43 +1,40 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Calculate a time course of relative concentrations based on an mkinmod model"><title>Calculate a time course of relative concentrations based on an mkinmod model — pfm_degradation • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate a time course of relative concentrations based on an mkinmod model — pfm_degradation"><meta property="og:description" content="Calculate a time course of relative concentrations based on an mkinmod model"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate a time course of relative concentrations based on an mkinmod model — pfm_degradation • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate a time course of relative concentrations based on an mkinmod model — pfm_degradation"><meta name="description" content="Calculate a time course of relative concentrations based on an mkinmod model"><meta property="og:description" content="Calculate a time course of relative concentrations based on an mkinmod model"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> - - <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container"> - + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.1</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> + - <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar" class="collapse navbar-collapse ms-3"> - <ul class="navbar-nav me-auto"><li class="active nav-item"> - <a class="nav-link" href="../reference/index.html">Reference</a> -</li> - </ul><form class="form-inline my-2 my-lg-0" role="search"> - <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form> - - <ul class="navbar-nav"><li class="nav-item"> - <a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="github"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> </ul></div> - + </div> </nav><div class="container template-reference-topic"> <div class="row"> <main id="main" class="col-md-9"><div class="page-header"> - <img src="" class="logo" alt=""><h1>Calculate a time course of relative concentrations based on an mkinmod model</h1> + + <h1>Calculate a time course of relative concentrations based on an mkinmod model</h1> <small class="dont-index">Source: <a href="https://github.com/jranke/pfm/blob/HEAD/R/pfm_degradation.R" class="external-link"><code>R/pfm_degradation.R</code></a></small> <div class="d-none name"><code>pfm_degradation.Rd</code></div> </div> @@ -60,29 +57,31 @@ <div class="section level2"> <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> - <dl><dt>model</dt> + + +<dl><dt id="arg-model">model<a class="anchor" aria-label="anchor" href="#arg-model"></a></dt> <dd><p>The degradation model to be used. Either a parent only model like 'SFO' or 'FOMC', or an mkinmod object</p></dd> -<dt>DT50</dt> +<dt id="arg-dt-">DT50<a class="anchor" aria-label="anchor" href="#arg-dt-"></a></dt> <dd><p>The half-life. This is only used when simple exponential decline is calculated (SFO model).</p></dd> -<dt>parms</dt> +<dt id="arg-parms">parms<a class="anchor" aria-label="anchor" href="#arg-parms"></a></dt> <dd><p>The parameters used for the degradation model</p></dd> -<dt>years</dt> +<dt id="arg-years">years<a class="anchor" aria-label="anchor" href="#arg-years"></a></dt> <dd><p>For how many years should the degradation be predicted?</p></dd> -<dt>step_days</dt> +<dt id="arg-step-days">step_days<a class="anchor" aria-label="anchor" href="#arg-step-days"></a></dt> <dd><p>What step size in days should the output have?</p></dd> -<dt>times</dt> +<dt id="arg-times">times<a class="anchor" aria-label="anchor" href="#arg-times"></a></dt> <dd><p>The output times</p></dd> </dl></div> @@ -103,23 +102,23 @@ is calculated (SFO model).</p></dd> <span class="r-out co"><span class="r-pr">#></span> 5 5 0.7071068</span> </code></pre></div> </div> - </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </nav></aside></div> <footer><div class="pkgdown-footer-left"> - <p></p><p>Developed by Johannes Ranke.</p> + <p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown-footer-right"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> - - + + </body></html> diff --git a/docs/reference/pfm_degradation.md b/docs/reference/pfm_degradation.md new file mode 100644 index 0000000..fb241ff --- /dev/null +++ b/docs/reference/pfm_degradation.md @@ -0,0 +1,62 @@ +# Calculate a time course of relative concentrations based on an mkinmod model + +Calculate a time course of relative concentrations based on an mkinmod +model + +## Usage + +``` r +pfm_degradation( + model = "SFO", + DT50 = 1000, + parms = c(k_parent = log(2)/DT50), + years = 1, + step_days = 1, + times = seq(0, years * 365, by = step_days) +) +``` + +## Arguments + +- model: + + The degradation model to be used. Either a parent only model like + 'SFO' or 'FOMC', or an mkinmod object + +- DT50: + + The half-life. This is only used when simple exponential decline is + calculated (SFO model). + +- parms: + + The parameters used for the degradation model + +- years: + + For how many years should the degradation be predicted? + +- step_days: + + What step size in days should the output have? + +- times: + + The output times + +## Author + +Johannes Ranke + +## Examples + +``` r +head(pfm_degradation("SFO", DT50 = 10)) +#> time parent +#> 0 0 1.0000000 +#> 1 1 0.9330330 +#> 2 2 0.8705506 +#> 3 3 0.8122524 +#> 4 4 0.7578583 +#> 5 5 0.7071068 +``` diff --git a/docs/reference/plot.TOXSWA_cwa-1.png b/docs/reference/plot.TOXSWA_cwa-1.png Binary files differindex 11a34cc..3317ecf 100644 --- a/docs/reference/plot.TOXSWA_cwa-1.png +++ b/docs/reference/plot.TOXSWA_cwa-1.png diff --git a/docs/reference/plot.TOXSWA_cwa-2.png b/docs/reference/plot.TOXSWA_cwa-2.png Binary files differindex 327a21b..8cf65c8 100644 --- a/docs/reference/plot.TOXSWA_cwa-2.png +++ b/docs/reference/plot.TOXSWA_cwa-2.png diff --git a/docs/reference/plot.TOXSWA_cwa-3.png b/docs/reference/plot.TOXSWA_cwa-3.png Binary files differindex 65524b5..c9a3b0c 100644 --- a/docs/reference/plot.TOXSWA_cwa-3.png +++ b/docs/reference/plot.TOXSWA_cwa-3.png diff --git a/docs/reference/plot.TOXSWA_cwa-4.png b/docs/reference/plot.TOXSWA_cwa-4.png Binary files differindex 1d82cfc..9e056c1 100644 --- a/docs/reference/plot.TOXSWA_cwa-4.png +++ b/docs/reference/plot.TOXSWA_cwa-4.png diff --git a/docs/reference/plot.TOXSWA_cwa-5.png b/docs/reference/plot.TOXSWA_cwa-5.png Binary files differindex d28c87c..f3d8ad7 100644 --- a/docs/reference/plot.TOXSWA_cwa-5.png +++ b/docs/reference/plot.TOXSWA_cwa-5.png diff --git a/docs/reference/plot.TOXSWA_cwa.html b/docs/reference/plot.TOXSWA_cwa.html index 1b89187..2de7ebc 100644 --- a/docs/reference/plot.TOXSWA_cwa.html +++ b/docs/reference/plot.TOXSWA_cwa.html @@ -1,45 +1,42 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Plot TOXSWA hourly concentrations of a chemical substance in a specific -segment of a TOXSWA surface water body."><title>Plot TOXSWA surface water concentrations — plot.TOXSWA_cwa • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot TOXSWA surface water concentrations — plot.TOXSWA_cwa"><meta property="og:description" content="Plot TOXSWA hourly concentrations of a chemical substance in a specific -segment of a TOXSWA surface water body."><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Plot TOXSWA surface water concentrations — plot.TOXSWA_cwa • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot TOXSWA surface water concentrations — plot.TOXSWA_cwa"><meta name="description" content="Plot TOXSWA hourly concentrations of a chemical substance in a specific +segment of a TOXSWA surface water body."><meta property="og:description" content="Plot TOXSWA hourly concentrations of a chemical substance in a specific +segment of a TOXSWA surface water body."></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> - - <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container"> - + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.1</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> + - <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar" class="collapse navbar-collapse ms-3"> - <ul class="navbar-nav me-auto"><li class="active nav-item"> - <a class="nav-link" href="../reference/index.html">Reference</a> -</li> - </ul><form class="form-inline my-2 my-lg-0" role="search"> - <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form> - - <ul class="navbar-nav"><li class="nav-item"> - <a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="github"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> </ul></div> - + </div> </nav><div class="container template-reference-topic"> <div class="row"> <main id="main" class="col-md-9"><div class="page-header"> - <img src="" class="logo" alt=""><h1>Plot TOXSWA surface water concentrations</h1> + + <h1>Plot TOXSWA surface water concentrations</h1> <small class="dont-index">Source: <a href="https://github.com/jranke/pfm/blob/HEAD/R/TOXSWA_cwa.R" class="external-link"><code>R/TOXSWA_cwa.R</code></a></small> <div class="d-none name"><code>plot.TOXSWA_cwa.Rd</code></div> </div> @@ -51,7 +48,7 @@ segment of a TOXSWA surface water body.</p> <div class="section level2"> <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> - <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for TOXSWA_cwa</span></span> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'TOXSWA_cwa'</span></span> <span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span></span> <span> <span class="va">x</span>,</span> <span> time_column <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</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="op">)</span>,</span> @@ -68,44 +65,46 @@ segment of a TOXSWA surface water body.</p> <div class="section level2"> <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> - <dl><dt>x</dt> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> <dd><p>The TOXSWA_cwa object to be plotted.</p></dd> -<dt>time_column</dt> +<dt id="arg-time-column">time_column<a class="anchor" aria-label="anchor" href="#arg-time-column"></a></dt> <dd><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></dd> -<dt>xlab, ylab</dt> +<dt id="arg-xlab-ylab">xlab, ylab<a class="anchor" aria-label="anchor" href="#arg-xlab-ylab"></a></dt> <dd><p>Labels for x and y axis.</p></dd> -<dt>add</dt> +<dt id="arg-add">add<a class="anchor" aria-label="anchor" href="#arg-add"></a></dt> <dd><p>Should we add to an existing plot?</p></dd> -<dt>threshold_factor</dt> +<dt id="arg-threshold-factor">threshold_factor<a class="anchor" aria-label="anchor" href="#arg-threshold-factor"></a></dt> <dd><p>The factor by which the data have to be lower than the maximum in order to get thinned for plotting (see next argument).</p></dd> -<dt>thin_low</dt> +<dt id="arg-thin-low">thin_low<a class="anchor" aria-label="anchor" href="#arg-thin-low"></a></dt> <dd><p>If an integer greater than 1, the data close to zero (smaller than 1/threshold_factor of the maximum) in the series will be thinned by this factor in order to decrease the amount of data that is included in the plots</p></dd> -<dt>total</dt> +<dt id="arg-total">total<a class="anchor" aria-label="anchor" href="#arg-total"></a></dt> <dd><p>Should the total concentration in water be plotted, including substance sorbed to suspended matter?</p></dd> -<dt>LC_TIME</dt> +<dt id="arg-lc-time">LC_TIME<a class="anchor" aria-label="anchor" href="#arg-lc-time"></a></dt> <dd><p>Specification of the locale used to format dates</p></dd> -<dt>...</dt> +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> <dd><p>Further arguments passed to <code>plot</code> if we are not adding to an existing plot</p></dd> </dl></div> @@ -135,23 +134,23 @@ to suspended matter?</p></dd> <span class="r-plt img"><img src="plot.TOXSWA_cwa-5.png" alt="" width="700" height="433"></span> </code></pre></div> </div> - </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </nav></aside></div> <footer><div class="pkgdown-footer-left"> - <p></p><p>Developed by Johannes Ranke.</p> + <p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown-footer-right"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> - - + + </body></html> diff --git a/docs/reference/plot.TOXSWA_cwa.md b/docs/reference/plot.TOXSWA_cwa.md new file mode 100644 index 0000000..1f5f07f --- /dev/null +++ b/docs/reference/plot.TOXSWA_cwa.md @@ -0,0 +1,93 @@ +# Plot TOXSWA surface water concentrations + +Plot TOXSWA hourly concentrations of a chemical substance in a specific +segment of a TOXSWA surface water body. + +## Usage + +``` r +# S3 method for class 'TOXSWA_cwa' +plot( + x, + time_column = c("datetime", "t", "t_firstjan", "t_rel_to_max"), + xlab = "default", + ylab = "default", + add = FALSE, + threshold_factor = 1000, + thin_low = 1, + total = FALSE, + LC_TIME = "C", + ... +) +``` + +## Arguments + +- x: + + The TOXSWA_cwa object to be plotted. + +- time_column: + + 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. + +- xlab, ylab: + + Labels for x and y axis. + +- add: + + Should we add to an existing plot? + +- threshold_factor: + + The factor by which the data have to be lower than the maximum in + order to get thinned for plotting (see next argument). + +- thin_low: + + If an integer greater than 1, the data close to zero (smaller than + 1/threshold_factor of the maximum) in the series will be thinned by + this factor in order to decrease the amount of data that is included + in the plots + +- total: + + Should the total concentration in water be plotted, including + substance sorbed to suspended matter? + +- LC_TIME: + + Specification of the locale used to format dates + +- ...: + + Further arguments passed to `plot` if we are not adding to an existing + plot + +## Author + +Johannes Ranke + +## Examples + +``` r +H_sw_D4_pond <- read.TOXSWA_cwa("00001p_pa.cwa", + basedir = "SwashProjects/project_H_sw/TOXSWA", + zipfile = system.file("testdata/SwashProjects.zip", package = "pfm")) +plot(H_sw_D4_pond) + +plot(H_sw_D4_pond, time_column = "t") + +plot(H_sw_D4_pond, time_column = "t_firstjan") + +plot(H_sw_D4_pond, time_column = "t_rel_to_max") + + +H_sw_R1_stream <- read.TOXSWA_cwa("00003s_pa.cwa", + basedir = "SwashProjects/project_H_sw/TOXSWA", + zipfile = system.file("testdata/SwashProjects.zip", package = "pfm")) +plot(H_sw_R1_stream, time_column = "t_rel_to_max") +``` diff --git a/docs/reference/plot.one_box-1.png b/docs/reference/plot.one_box-1.png Binary files differindex 066f466..c8c208f 100644 --- a/docs/reference/plot.one_box-1.png +++ b/docs/reference/plot.one_box-1.png diff --git a/docs/reference/plot.one_box-2.png b/docs/reference/plot.one_box-2.png Binary files differindex 307dc3c..c6c57a6 100644 --- a/docs/reference/plot.one_box-2.png +++ b/docs/reference/plot.one_box-2.png diff --git a/docs/reference/plot.one_box-3.png b/docs/reference/plot.one_box-3.png Binary files differindex cea8b0b..1c3d64d 100644 --- a/docs/reference/plot.one_box-3.png +++ b/docs/reference/plot.one_box-3.png diff --git a/docs/reference/plot.one_box-4.png b/docs/reference/plot.one_box-4.png Binary files differnew file mode 100644 index 0000000..64e3574 --- /dev/null +++ b/docs/reference/plot.one_box-4.png diff --git a/docs/reference/plot.one_box-5.png b/docs/reference/plot.one_box-5.png Binary files differnew file mode 100644 index 0000000..7537b54 --- /dev/null +++ b/docs/reference/plot.one_box-5.png diff --git a/docs/reference/plot.one_box.html b/docs/reference/plot.one_box.html index 4401d50..eb5eb06 100644 --- a/docs/reference/plot.one_box.html +++ b/docs/reference/plot.one_box.html @@ -1,43 +1,40 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Plot time series of decline data"><title>Plot time series of decline data — plot.one_box • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot time series of decline data — plot.one_box"><meta property="og:description" content="Plot time series of decline data"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Plot time series of decline data — plot.one_box • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot time series of decline data — plot.one_box"><meta name="description" content="Plot time series of decline data"><meta property="og:description" content="Plot time series of decline data"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> - - <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container"> - + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.1</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> + - <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar" class="collapse navbar-collapse ms-3"> - <ul class="navbar-nav me-auto"><li class="active nav-item"> - <a class="nav-link" href="../reference/index.html">Reference</a> -</li> - </ul><form class="form-inline my-2 my-lg-0" role="search"> - <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form> - - <ul class="navbar-nav"><li class="nav-item"> - <a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="github"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> </ul></div> - + </div> </nav><div class="container template-reference-topic"> <div class="row"> <main id="main" class="col-md-9"><div class="page-header"> - <img src="" class="logo" alt=""><h1>Plot time series of decline data</h1> + + <h1>Plot time series of decline data</h1> <small class="dont-index">Source: <a href="https://github.com/jranke/pfm/blob/HEAD/R/twa.R" class="external-link"><code>R/twa.R</code></a></small> <div class="d-none name"><code>plot.one_box.Rd</code></div> </div> @@ -48,7 +45,7 @@ <div class="section level2"> <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> - <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for one_box</span></span> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'one_box'</span></span> <span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span></span> <span> <span class="va">x</span>,</span> <span> xlim <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/range.html" class="external-link">range</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/time.html" class="external-link">time</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span> @@ -63,43 +60,45 @@ <div class="section level2"> <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> - <dl><dt>x</dt> -<dd><p>The object of type <code><a href="one_box.html">one_box</a></code> to be plotted</p></dd> -<dt>xlim</dt> +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>The object of type <a href="one_box.html">one_box</a> to be plotted</p></dd> + + +<dt id="arg-xlim">xlim<a class="anchor" aria-label="anchor" href="#arg-xlim"></a></dt> <dd><p>Limits for the x axis</p></dd> -<dt>ylim</dt> +<dt id="arg-ylim">ylim<a class="anchor" aria-label="anchor" href="#arg-ylim"></a></dt> <dd><p>Limits for the y axis</p></dd> -<dt>xlab</dt> +<dt id="arg-xlab">xlab<a class="anchor" aria-label="anchor" href="#arg-xlab"></a></dt> <dd><p>Label for the x axis</p></dd> -<dt>ylab</dt> +<dt id="arg-ylab">ylab<a class="anchor" aria-label="anchor" href="#arg-ylab"></a></dt> <dd><p>Label for the y axis</p></dd> -<dt>max_twa</dt> +<dt id="arg-max-twa">max_twa<a class="anchor" aria-label="anchor" href="#arg-max-twa"></a></dt> <dd><p>If a numeric value is given, the maximum time weighted average concentration(s) is/are shown in the graph.</p></dd> -<dt>max_twa_var</dt> +<dt id="arg-max-twa-var">max_twa_var<a class="anchor" aria-label="anchor" href="#arg-max-twa-var"></a></dt> <dd><p>Variable for which the maximum time weighted average should be shown if max_twa is not NULL.</p></dd> -<dt>...</dt> +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> <dd><p>Further arguments passed to methods</p></dd> </dl></div> <div class="section level2"> <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> - <div class="dont-index"><p><code><a href="sawtooth.html">sawtooth</a></code></p></div> + <div class="dont-index"><p><a href="sawtooth.html">sawtooth</a></p></div> </div> <div class="section level2"> @@ -109,6 +108,7 @@ be shown if max_twa is not NULL.</p></dd> <span class="r-plt img"><img src="plot.one_box-1.png" alt="" width="700" height="433"></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="fu"><a href="sawtooth.html">sawtooth</a></span><span class="op">(</span><span class="va">dfop_pred</span>, <span class="fl">3</span>, <span class="fl">7</span><span class="op">)</span>, max_twa <span class="op">=</span> <span class="fl">21</span><span class="op">)</span></span></span> <span class="r-plt img"><img src="plot.one_box-2.png" alt="" width="700" height="433"></span> +<span class="r-plt img"><img src="plot.one_box-3.png" alt="" width="700" height="433"></span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># Use a fitted mkinfit model</span></span></span> <span class="r-in"><span><span class="va">m_2</span> <span class="op"><-</span> <span class="fu"><a href="https://pkgdown.jrwb.de/mkin/reference/mkinmod.html" class="external-link">mkinmod</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fu"><a href="https://pkgdown.jrwb.de/mkin/reference/mkinmod.html" class="external-link">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"m1"</span><span class="op">)</span>, m1 <span class="op">=</span> <span class="fu"><a href="https://pkgdown.jrwb.de/mkin/reference/mkinmod.html" class="external-link">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> @@ -117,27 +117,29 @@ be shown if max_twa is not NULL.</p></dd> <span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span> <span class="r-in"><span><span class="va">pred_2</span> <span class="op"><-</span> <span class="fu"><a href="one_box.html">one_box</a></span><span class="op">(</span><span class="va">fit_2</span>, ini <span class="op">=</span> <span class="fl">1</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="va">pred_2_saw</span> <span class="op"><-</span> <span class="fu"><a href="sawtooth.html">sawtooth</a></span><span class="op">(</span><span class="va">pred_2</span>, <span class="fl">2</span>, <span class="fl">7</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">pred_2_saw</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">pred_2_saw</span>, max_twa <span class="op">=</span> <span class="fl">21</span>, max_twa_var <span class="op">=</span> <span class="st">"m1"</span><span class="op">)</span></span></span> -<span class="r-plt img"><img src="plot.one_box-3.png" alt="" width="700" height="433"></span> +<span class="r-plt img"><img src="plot.one_box-4.png" alt="" width="700" height="433"></span> +<span class="r-plt img"><img src="plot.one_box-5.png" alt="" width="700" height="433"></span> </code></pre></div> </div> - </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </nav></aside></div> <footer><div class="pkgdown-footer-left"> - <p></p><p>Developed by Johannes Ranke.</p> + <p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown-footer-right"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> - - + + </body></html> diff --git a/docs/reference/plot.one_box.md b/docs/reference/plot.one_box.md new file mode 100644 index 0000000..cc20b94 --- /dev/null +++ b/docs/reference/plot.one_box.md @@ -0,0 +1,83 @@ +# Plot time series of decline data + +Plot time series of decline data + +## Usage + +``` r +# S3 method for class 'one_box' +plot( + x, + xlim = range(time(x)), + ylim = c(0, max(x)), + xlab = "Time", + ylab = "Residue", + max_twa = NULL, + max_twa_var = dimnames(x)[[2]][1], + ... +) +``` + +## Arguments + +- x: + + The object of type + [one_box](https://pkgdown.jrwb.de/pfm/reference/one_box.md) to be + plotted + +- xlim: + + Limits for the x axis + +- ylim: + + Limits for the y axis + +- xlab: + + Label for the x axis + +- ylab: + + Label for the y axis + +- max_twa: + + If a numeric value is given, the maximum time weighted average + concentration(s) is/are shown in the graph. + +- max_twa_var: + + Variable for which the maximum time weighted average should be shown + if max_twa is not NULL. + +- ...: + + Further arguments passed to methods + +## See also + +[sawtooth](https://pkgdown.jrwb.de/pfm/reference/sawtooth.md) + +## Examples + +``` r +dfop_pred <- one_box("DFOP", parms = c(k1 = 0.2, k2 = 0.02, g = 0.7)) +plot(dfop_pred) + +plot(sawtooth(dfop_pred, 3, 7), max_twa = 21) + + + +# Use a fitted mkinfit model +m_2 <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO")) +#> Temporary DLL for differentials generated and loaded +fit_2 <- mkinfit(m_2, FOCUS_2006_D, quiet = TRUE) +#> Warning: Observations with value of zero were removed from the data +pred_2 <- one_box(fit_2, ini = 1) +pred_2_saw <- sawtooth(pred_2, 2, 7) +plot(pred_2_saw) +plot(pred_2_saw, max_twa = 21, max_twa_var = "m1") + +``` diff --git a/docs/reference/read.TOXSWA_cwa.html b/docs/reference/read.TOXSWA_cwa.html index a3c3a2d..bf078e0 100644 --- a/docs/reference/read.TOXSWA_cwa.html +++ b/docs/reference/read.TOXSWA_cwa.html @@ -1,53 +1,50 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Read TOXSWA hourly concentrations of a chemical substance in a specific +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Read TOXSWA surface water concentrations — read.TOXSWA_cwa • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Read TOXSWA surface water concentrations — read.TOXSWA_cwa"><meta name="description" content="Read TOXSWA hourly concentrations of a chemical substance in a specific segment of a TOXSWA surface water body. Per default, the data for the last segment are imported. As TOXSWA 4 reports the values at the end of the hour (ConLiqWatLayCur) in its summary file, we use this value as well instead of the hourly averages (ConLiqWatLay). In TOXSWA 5.5.3 this variable was -renamed to ConLiqWatLay in the out file."><title>Read TOXSWA surface water concentrations — read.TOXSWA_cwa • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Read TOXSWA surface water concentrations — read.TOXSWA_cwa"><meta property="og:description" content="Read TOXSWA hourly concentrations of a chemical substance in a specific +renamed to ConLiqWatLay in the out file."><meta property="og:description" content="Read TOXSWA hourly concentrations of a chemical substance in a specific segment of a TOXSWA surface water body. Per default, the data for the last segment are imported. As TOXSWA 4 reports the values at the end of the hour (ConLiqWatLayCur) in its summary file, we use this value as well instead of the hourly averages (ConLiqWatLay). In TOXSWA 5.5.3 this variable was -renamed to ConLiqWatLay in the out file."><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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> +renamed to ConLiqWatLay in the out file."></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> - - <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container"> - + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.1</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> + - <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar" class="collapse navbar-collapse ms-3"> - <ul class="navbar-nav me-auto"><li class="active nav-item"> - <a class="nav-link" href="../reference/index.html">Reference</a> -</li> - </ul><form class="form-inline my-2 my-lg-0" role="search"> - <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form> - - <ul class="navbar-nav"><li class="nav-item"> - <a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="github"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> </ul></div> - + </div> </nav><div class="container template-reference-topic"> <div class="row"> <main id="main" class="col-md-9"><div class="page-header"> - <img src="" class="logo" alt=""><h1>Read TOXSWA surface water concentrations</h1> + + <h1>Read TOXSWA surface water concentrations</h1> <small class="dont-index">Source: <a href="https://github.com/jranke/pfm/blob/HEAD/R/TOXSWA_cwa.R" class="external-link"><code>R/TOXSWA_cwa.R</code></a></small> <div class="d-none name"><code>read.TOXSWA_cwa.Rd</code></div> </div> @@ -77,51 +74,51 @@ renamed to ConLiqWatLay in the out file.</p> <div class="section level2"> <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> - <dl><dt>filename</dt> + + +<dl><dt id="arg-filename">filename<a class="anchor" aria-label="anchor" href="#arg-filename"></a></dt> <dd><p>The filename of the cwa file (TOXSWA 2.x.y or similar) or the out file when using FOCUS TOXSWA 4 (i.e. TOXSWA 4.4.2) or higher.</p></dd> -<dt>basedir</dt> +<dt id="arg-basedir">basedir<a class="anchor" aria-label="anchor" href="#arg-basedir"></a></dt> <dd><p>The path to the directory where the cwa file resides.</p></dd> -<dt>zipfile</dt> +<dt id="arg-zipfile">zipfile<a class="anchor" aria-label="anchor" href="#arg-zipfile"></a></dt> <dd><p>Optional path to a zip file containing the cwa file.</p></dd> -<dt>segment</dt> +<dt id="arg-segment">segment<a class="anchor" aria-label="anchor" href="#arg-segment"></a></dt> <dd><p>The segment for which the data should be read. Either "last", or the segment number.</p></dd> -<dt>substance</dt> +<dt id="arg-substance">substance<a class="anchor" aria-label="anchor" href="#arg-substance"></a></dt> <dd><p>For .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.</p></dd> -<dt>total</dt> +<dt id="arg-total">total<a class="anchor" aria-label="anchor" href="#arg-total"></a></dt> <dd><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.</p></dd> -<dt>windows</dt> +<dt id="arg-windows">windows<a class="anchor" aria-label="anchor" href="#arg-windows"></a></dt> <dd><p>Numeric vector of width of moving windows in days, for calculating maximum time weighted average concentrations and areas under the curve.</p></dd> -<dt>thresholds</dt> +<dt id="arg-thresholds">thresholds<a class="anchor" aria-label="anchor" href="#arg-thresholds"></a></dt> <dd><p>Numeric vector of threshold concentrations in µg/L for generating event statistics.</p></dd> </dl></div> <div class="section level2"> <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> - - -<p>An instance of an R6 object of class + <p>An instance of an R6 object of class <code><a href="TOXSWA_cwa.html">TOXSWA_cwa</a></code>.</p> </div> <div class="section level2"> @@ -137,23 +134,23 @@ generating event statistics.</p></dd> <span class="r-in"><span> package <span class="op">=</span> <span class="st">"pfm"</span><span class="op">)</span><span class="op">)</span></span></span> </code></pre></div> </div> - </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </nav></aside></div> <footer><div class="pkgdown-footer-left"> - <p></p><p>Developed by Johannes Ranke.</p> + <p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown-footer-right"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> - - + + </body></html> diff --git a/docs/reference/read.TOXSWA_cwa.md b/docs/reference/read.TOXSWA_cwa.md new file mode 100644 index 0000000..5cd59f2 --- /dev/null +++ b/docs/reference/read.TOXSWA_cwa.md @@ -0,0 +1,85 @@ +# Read TOXSWA surface water concentrations + +Read TOXSWA hourly concentrations of a chemical substance in a specific +segment of a TOXSWA surface water body. Per default, the data for the +last segment are imported. As TOXSWA 4 reports the values at the end of +the hour (ConLiqWatLayCur) in its summary file, we use this value as +well instead of the hourly averages (ConLiqWatLay). In TOXSWA 5.5.3 this +variable was renamed to ConLiqWatLay in the out file. + +## Usage + +``` r +read.TOXSWA_cwa( + filename, + basedir = ".", + zipfile = NULL, + segment = "last", + substance = "parent", + total = FALSE, + windows = NULL, + thresholds = NULL +) +``` + +## Arguments + +- filename: + + The filename of the cwa file (TOXSWA 2.x.y or similar) or the out file + when using FOCUS TOXSWA 4 (i.e. TOXSWA 4.4.2) or higher. + +- basedir: + + The path to the directory where the cwa file resides. + +- zipfile: + + Optional path to a zip file containing the cwa file. + +- segment: + + The segment for which the data should be read. Either "last", or the + segment number. + +- substance: + + For .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. + +- total: + + 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. + +- windows: + + Numeric vector of width of moving windows in days, for calculating + maximum time weighted average concentrations and areas under the + curve. + +- thresholds: + + Numeric vector of threshold concentrations in µg/L for generating + event statistics. + +## Value + +An instance of an R6 object of class +[`TOXSWA_cwa`](https://pkgdown.jrwb.de/pfm/reference/TOXSWA_cwa.md). + +## Author + +Johannes Ranke + +## Examples + +``` r +H_sw_D4_pond <- read.TOXSWA_cwa("00001p_pa.cwa", + basedir = "SwashProjects/project_H_sw/TOXSWA", + zipfile = system.file("testdata/SwashProjects.zip", + package = "pfm")) +``` diff --git a/docs/reference/reexports.html b/docs/reference/reexports.html index 8507c78..02cba58 100644 --- a/docs/reference/reexports.html +++ b/docs/reference/reexports.html @@ -1,57 +1,54 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="These objects are imported from other packages. Follow the links +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Objects exported from other packages — reexports • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Objects exported from other packages — reexports"><meta name="description" content="These objects are imported from other packages. Follow the links below to see their documentation. mkin -set_nd_nq, set_nd_nq_focus +set_nd_nq(), set_nd_nq_focus() -"><title>Objects exported from other packages — reexports • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Objects exported from other packages — reexports"><meta property="og:description" content="These objects are imported from other packages. Follow the links +"><meta property="og:description" content="These objects are imported from other packages. Follow the links below to see their documentation. mkin -set_nd_nq, set_nd_nq_focus +set_nd_nq(), set_nd_nq_focus() -"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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> +"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> - - <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container"> - + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.1</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> + - <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar" class="collapse navbar-collapse ms-3"> - <ul class="navbar-nav me-auto"><li class="active nav-item"> - <a class="nav-link" href="../reference/index.html">Reference</a> -</li> - </ul><form class="form-inline my-2 my-lg-0" role="search"> - <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form> - - <ul class="navbar-nav"><li class="nav-item"> - <a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="github"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> </ul></div> - + </div> </nav><div class="container template-reference-topic"> <div class="row"> <main id="main" class="col-md-9"><div class="page-header"> - <img src="" class="logo" alt=""><h1>Objects exported from other packages</h1> + + <h1>Objects exported from other packages</h1> <small class="dont-index">Source: <a href="https://github.com/jranke/pfm/blob/HEAD/R/reexports.R" class="external-link"><code>R/reexports.R</code></a></small> <div class="d-none name"><code>reexports.Rd</code></div> </div> @@ -60,7 +57,7 @@ set_nd_nq, set_nd_nq_focus <p>These objects are imported from other packages. Follow the links below to see their documentation.</p> <dl><dt>mkin</dt> -<dd><p><code><a href="https://pkgdown.jrwb.de/mkin/reference/set_nd_nq.html" class="external-link">set_nd_nq</a></code>, <code><a href="https://pkgdown.jrwb.de/mkin/reference/set_nd_nq.html" class="external-link">set_nd_nq_focus</a></code></p></dd> +<dd><p><code><a href="https://pkgdown.jrwb.de/mkin/reference/set_nd_nq.html" class="external-link">set_nd_nq()</a></code>, <code><a href="https://pkgdown.jrwb.de/mkin/reference/set_nd_nq.html" class="external-link">set_nd_nq_focus()</a></code></p></dd> </dl></div> @@ -71,18 +68,18 @@ below to see their documentation.</p> <footer><div class="pkgdown-footer-left"> - <p></p><p>Developed by Johannes Ranke.</p> + <p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown-footer-right"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> - - + + </body></html> diff --git a/docs/reference/reexports.md b/docs/reference/reexports.md new file mode 100644 index 0000000..a7a71c8 --- /dev/null +++ b/docs/reference/reexports.md @@ -0,0 +1,9 @@ +# Objects exported from other packages + +These objects are imported from other packages. Follow the links below +to see their documentation. + +- mkin: + + [`set_nd_nq()`](https://pkgdown.jrwb.de/mkin/reference/set_nd_nq.html), + [`set_nd_nq_focus()`](https://pkgdown.jrwb.de/mkin/reference/set_nd_nq.html) diff --git a/docs/reference/sawtooth-1.png b/docs/reference/sawtooth-1.png Binary files differindex 062202c..b87b54a 100644 --- a/docs/reference/sawtooth-1.png +++ b/docs/reference/sawtooth-1.png diff --git a/docs/reference/sawtooth-2.png b/docs/reference/sawtooth-2.png Binary files differindex cea8b0b..64e3574 100644 --- a/docs/reference/sawtooth-2.png +++ b/docs/reference/sawtooth-2.png diff --git a/docs/reference/sawtooth-3.png b/docs/reference/sawtooth-3.png Binary files differnew file mode 100644 index 0000000..7537b54 --- /dev/null +++ b/docs/reference/sawtooth-3.png diff --git a/docs/reference/sawtooth.html b/docs/reference/sawtooth.html index f373ffb..6043eb8 100644 --- a/docs/reference/sawtooth.html +++ b/docs/reference/sawtooth.html @@ -1,45 +1,42 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="If the application pattern is specified in applications, -n and i are disregarded."><title>Create decline time series for multiple applications — sawtooth • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Create decline time series for multiple applications — sawtooth"><meta property="og:description" content="If the application pattern is specified in applications, -n and i are disregarded."><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Create decline time series for multiple applications — sawtooth • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Create decline time series for multiple applications — sawtooth"><meta name="description" content="If the application pattern is specified in applications, +n and i are disregarded."><meta property="og:description" content="If the application pattern is specified in applications, +n and i are disregarded."></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> - - <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container"> - + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.1</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> + - <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar" class="collapse navbar-collapse ms-3"> - <ul class="navbar-nav me-auto"><li class="active nav-item"> - <a class="nav-link" href="../reference/index.html">Reference</a> -</li> - </ul><form class="form-inline my-2 my-lg-0" role="search"> - <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form> - - <ul class="navbar-nav"><li class="nav-item"> - <a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="github"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> </ul></div> - + </div> </nav><div class="container template-reference-topic"> <div class="row"> <main id="main" class="col-md-9"><div class="page-header"> - <img src="" class="logo" alt=""><h1>Create decline time series for multiple applications</h1> + + <h1>Create decline time series for multiple applications</h1> <small class="dont-index">Source: <a href="https://github.com/jranke/pfm/blob/HEAD/R/twa.R" class="external-link"><code>R/twa.R</code></a></small> <div class="d-none name"><code>sawtooth.Rd</code></div> </div> @@ -61,20 +58,22 @@ n and i are disregarded."><!-- mathjax --><script src="https://cdnjs.cloudflare. <div class="section level2"> <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> - <dl><dt>x</dt> -<dd><p>A <code><a href="one_box.html">one_box</a></code> object</p></dd> -<dt>n</dt> +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>A <a href="one_box.html">one_box</a> object</p></dd> + + +<dt id="arg-n">n<a class="anchor" aria-label="anchor" href="#arg-n"></a></dt> <dd><p>The number of applications. If <code>applications</code> is specified, <code>n</code> is ignored</p></dd> -<dt>i</dt> +<dt id="arg-i">i<a class="anchor" aria-label="anchor" href="#arg-i"></a></dt> <dd><p>The interval between applications. If <code>applications</code> is specified, <code>i</code> is ignored</p></dd> -<dt>applications</dt> +<dt id="arg-applications">applications<a class="anchor" aria-label="anchor" href="#arg-applications"></a></dt> <dd><p>A data frame holding the application times in the first column and the corresponding amounts applied in the second column.</p></dd> @@ -95,6 +94,7 @@ the corresponding amounts applied in the second column.</p></dd> <span class="r-in"><span><span class="va">pred_2_saw</span> <span class="op"><-</span> <span class="fu">sawtooth</span><span class="op">(</span><span class="va">pred_2</span>, <span class="fl">2</span>, <span class="fl">7</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">pred_2_saw</span>, max_twa <span class="op">=</span> <span class="fl">21</span>, max_twa_var <span class="op">=</span> <span class="st">"m1"</span><span class="op">)</span></span></span> <span class="r-plt img"><img src="sawtooth-2.png" alt="" width="700" height="433"></span> +<span class="r-plt img"><img src="sawtooth-3.png" alt="" width="700" height="433"></span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="fu"><a href="max_twa.html">max_twa</a></span><span class="op">(</span><span class="va">pred_2_saw</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> $max</span> @@ -111,23 +111,23 @@ the corresponding amounts applied in the second column.</p></dd> <span class="r-out co"><span class="r-pr">#></span> </span> </code></pre></div> </div> - </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </nav></aside></div> <footer><div class="pkgdown-footer-left"> - <p></p><p>Developed by Johannes Ranke.</p> + <p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown-footer-right"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> - - + + </body></html> diff --git a/docs/reference/sawtooth.md b/docs/reference/sawtooth.md new file mode 100644 index 0000000..4d1c9e1 --- /dev/null +++ b/docs/reference/sawtooth.md @@ -0,0 +1,69 @@ +# Create decline time series for multiple applications + +If the application pattern is specified in `applications`, `n` and `i` +are disregarded. + +## Usage + +``` r +sawtooth( + x, + n = 1, + i = 365, + applications = data.frame(time = seq(0, (n - 1) * i, length.out = n), amount = 1) +) +``` + +## Arguments + +- x: + + A [one_box](https://pkgdown.jrwb.de/pfm/reference/one_box.md) object + +- n: + + The number of applications. If `applications` is specified, `n` is + ignored + +- i: + + The interval between applications. If `applications` is specified, `i` + is ignored + +- applications: + + A data frame holding the application times in the first column and the + corresponding amounts applied in the second column. + +## Examples + +``` r +applications = data.frame(time = seq(0, 14, by = 7), amount = c(1, 2, 3)) +pred <- one_box(10) +plot(sawtooth(pred, applications = applications)) + + +m_2 <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO")) +#> Temporary DLL for differentials generated and loaded +fit_2 <- mkinfit(m_2, FOCUS_2006_D, quiet = TRUE) +#> Warning: Observations with value of zero were removed from the data +pred_2 <- one_box(fit_2, ini = 1) +pred_2_saw <- sawtooth(pred_2, 2, 7) +plot(pred_2_saw, max_twa = 21, max_twa_var = "m1") + + + +max_twa(pred_2_saw) +#> $max +#> parent m1 +#> 0.7834481 0.8617049 +#> +#> $window_start +#> parent m1 +#> 0.00 26.85 +#> +#> $window_end +#> parent m1 +#> 21.00 47.85 +#> +``` diff --git a/docs/reference/soil_scenario_data_EFSA_2015.html b/docs/reference/soil_scenario_data_EFSA_2015.html index b65586c..d6a21e6 100644 --- a/docs/reference/soil_scenario_data_EFSA_2015.html +++ b/docs/reference/soil_scenario_data_EFSA_2015.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Properties of the predefined scenarios from the EFSA guidance from 2015 — soil_scenario_data_EFSA_2015 • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Properties of the predefined scenarios from the EFSA guidance from 2015 — soil_scenario_data_EFSA_2015"><meta name="description" content="Properties of the predefined scenarios used at Tier 1, Tier 2A and Tier 3A for the +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Properties of the predefined scenarios from the EFSA guidance from 2015 — soil_scenario_data_EFSA_2015 • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Properties of the predefined scenarios from the EFSA guidance from 2015 — soil_scenario_data_EFSA_2015"><meta name="description" content="Properties of the predefined scenarios used at Tier 1, Tier 2A and Tier 3A for the concentration in soil as given in the EFSA guidance (2015, p. 13/14). Also, the scenario and model adjustment factors from p. 15 and p. 17 are included."><meta property="og:description" content="Properties of the predefined scenarios used at Tier 1, Tier 2A and Tier 3A for the concentration in soil as given in the EFSA guidance (2015, p. 13/14). Also, the @@ -11,7 +17,7 @@ scenario and model adjustment factors from p. 15 and p. 17 are included."></head <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -91,7 +97,7 @@ active substances in soil. <em>EFSA Journal</em> <b>13</b>(4) 4093 </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/soil_scenario_data_EFSA_2015.md b/docs/reference/soil_scenario_data_EFSA_2015.md new file mode 100644 index 0000000..cf86bec --- /dev/null +++ b/docs/reference/soil_scenario_data_EFSA_2015.md @@ -0,0 +1,47 @@ +# Properties of the predefined scenarios from the EFSA guidance from 2015 + +Properties of the predefined scenarios used at Tier 1, Tier 2A and Tier +3A for the concentration in soil as given in the EFSA guidance (2015, p. +13/14). Also, the scenario and model adjustment factors from p. 15 and +p. 17 are included. + +## Usage + +``` r +soil_scenario_data_EFSA_2015 +``` + +## Format + +A data frame with one row for each scenario. Row names are the scenario +codes, e.g. CTN for the Northern scenario for the total concentration in +soil. Columns are mostly self-explanatory. `rho` is the dry bulk density +of the top soil. + +## Source + +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. *EFSA Journal* **13**(4) 4093 +[doi:10.2903/j.efsa.2015.4093](https://doi.org/10.2903/j.efsa.2015.4093) + +## Examples + +``` r +soil_scenario_data_EFSA_2015 +#> Zone Country T_arit T_arr Texture f_om theta_fc rho f_sce +#> CTN North Estonia 4.7 7.0 Coarse 0.118 0.244 0.95 3.0 +#> CTC Central Germany 8.0 10.1 Coarse 0.086 0.244 1.05 2.0 +#> CTS South France 11.0 12.3 Medium fine 0.048 0.385 1.22 2.0 +#> CLN North Denmark 8.2 9.8 Medium 0.023 0.347 1.39 2.0 +#> CLC Central Czech Republik 9.1 11.2 Medium 0.018 0.347 1.43 1.5 +#> CLS South Spain 12.8 14.7 Medium 0.011 0.347 1.51 1.5 +#> f_mod +#> CTN 2 +#> CTC 2 +#> CTS 2 +#> CLN 4 +#> CLC 4 +#> CLS 4 +``` diff --git a/docs/reference/soil_scenario_data_EFSA_2017.html b/docs/reference/soil_scenario_data_EFSA_2017.html index 1a6157a..0640d8f 100644 --- a/docs/reference/soil_scenario_data_EFSA_2017.html +++ b/docs/reference/soil_scenario_data_EFSA_2017.html @@ -1,5 +1,11 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Properties of the predefined scenarios from the EFSA guidance from 2017 — soil_scenario_data_EFSA_2017 • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Properties of the predefined scenarios from the EFSA guidance from 2017 — soil_scenario_data_EFSA_2017"><meta name="description" content="Properties of the predefined scenarios used at Tier 1, Tier 2A and Tier 3A for the +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Properties of the predefined scenarios from the EFSA guidance from 2017 — soil_scenario_data_EFSA_2017 • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Properties of the predefined scenarios from the EFSA guidance from 2017 — soil_scenario_data_EFSA_2017"><meta name="description" content="Properties of the predefined scenarios used at Tier 1, Tier 2A and Tier 3A for the concentration in soil as given in the EFSA guidance (2017, p. 14/15). Also, the scenario and model adjustment factors from p. 16 and p. 18 are included."><meta property="og:description" content="Properties of the predefined scenarios used at Tier 1, Tier 2A and Tier 3A for the concentration in soil as given in the EFSA guidance (2017, p. 14/15). Also, the @@ -11,7 +17,7 @@ scenario and model adjustment factors from p. 16 and p. 18 are included."></head <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.3</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -91,26 +97,26 @@ active substances in soil. <em>EFSA Journal</em> <b>15</b>(10) 4982 <span class="r-out co"><span class="r-pr">#></span> `old$Country`: <span style="color: #555555;">"Estonia"</span> <span style="color: #00BB00;">"Poland"</span> <span style="color: #555555;">"France"</span> <span style="color: #555555;">"Denmark"</span> <span style="color: #00BB00;">"Austria"</span> <span style="color: #555555;">"Spain"</span></span> <span class="r-out co"><span class="r-pr">#></span> `new$Country`: <span style="color: #555555;">"Estonia"</span> <span style="color: #00BB00;">"Germany"</span> <span style="color: #555555;">"France"</span> <span style="color: #555555;">"Denmark"</span> <span style="color: #00BB00;">"Czech Republik"</span> <span style="color: #555555;">"Spain"</span></span> <span class="r-out co"><span class="r-pr">#></span> </span> -<span class="r-out co"><span class="r-pr">#></span> `old$T_arit`: <span style="color: #00BB00;">5.7</span> <span style="color: #00BB00;">7.4</span> <span style="color: #00BB00;">10.2</span> <span style="color: #00BB00;">8.0</span> <span style="color: #00BB00;">9.3</span> <span style="color: #00BB00;">15.4</span></span> -<span class="r-out co"><span class="r-pr">#></span> `new$T_arit`: <span style="color: #00BB00;">4.7</span> <span style="color: #00BB00;">8.0</span> <span style="color: #00BB00;">11.0</span> <span style="color: #00BB00;">8.2</span> <span style="color: #00BB00;">9.1</span> <span style="color: #00BB00;">12.8</span></span> +<span class="r-out co"><span class="r-pr">#></span> `old$T_arit`: <span style="color: #00BB00;">5.70</span> <span style="color: #00BB00;">7.40</span> <span style="color: #00BB00;">10.20</span> <span style="color: #00BB00;">8.00</span> <span style="color: #00BB00;">9.30</span> <span style="color: #00BB00;">15.40</span></span> +<span class="r-out co"><span class="r-pr">#></span> `new$T_arit`: <span style="color: #00BB00;">4.70</span> <span style="color: #00BB00;">8.00</span> <span style="color: #00BB00;">11.00</span> <span style="color: #00BB00;">8.20</span> <span style="color: #00BB00;">9.10</span> <span style="color: #00BB00;">12.80</span></span> <span class="r-out co"><span class="r-pr">#></span> </span> -<span class="r-out co"><span class="r-pr">#></span> `old$T_arr`: <span style="color: #00BB00;">7.6</span> <span style="color: #00BB00;">9.3</span> <span style="color: #00BB00;">11.7</span> <span style="color: #00BB00;">9.2</span> <span style="color: #00BB00;">11.3</span> <span style="color: #00BB00;">16.7</span></span> -<span class="r-out co"><span class="r-pr">#></span> `new$T_arr`: <span style="color: #00BB00;">7.0</span> <span style="color: #00BB00;">10.1</span> <span style="color: #00BB00;">12.3</span> <span style="color: #00BB00;">9.8</span> <span style="color: #00BB00;">11.2</span> <span style="color: #00BB00;">14.7</span></span> +<span class="r-out co"><span class="r-pr">#></span> `old$T_arr`: <span style="color: #00BB00;">7.60</span> <span style="color: #00BB00;">9.30</span> <span style="color: #00BB00;">11.70</span> <span style="color: #00BB00;">9.20</span> <span style="color: #00BB00;">11.30</span> <span style="color: #00BB00;">16.70</span></span> +<span class="r-out co"><span class="r-pr">#></span> `new$T_arr`: <span style="color: #00BB00;">7.00</span> <span style="color: #00BB00;">10.10</span> <span style="color: #00BB00;">12.30</span> <span style="color: #00BB00;">9.80</span> <span style="color: #00BB00;">11.20</span> <span style="color: #00BB00;">14.70</span></span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> `old$Texture`: <span style="color: #555555;">"Coarse"</span> <span style="color: #555555;">"Coarse"</span> <span style="color: #00BB00;">"Medium"</span> <span style="color: #555555;">"Medium"</span> <span style="color: #555555;">"Medium"</span> <span style="color: #555555;">"Medium"</span></span> <span class="r-out co"><span class="r-pr">#></span> `new$Texture`: <span style="color: #555555;">"Coarse"</span> <span style="color: #555555;">"Coarse"</span> <span style="color: #00BB00;">"Medium fine"</span> <span style="color: #555555;">"Medium"</span> <span style="color: #555555;">"Medium"</span> <span style="color: #555555;">"Medium"</span></span> <span class="r-out co"><span class="r-pr">#></span> </span> -<span class="r-out co"><span class="r-pr">#></span> `old$f_om`: <span style="color: #00BB00;">0.220</span> <span style="color: #00BB00;">0.122</span> <span style="color: #00BB00;">0.070</span> <span style="color: #00BB00;">0.025</span> <span style="color: #555555;">0.018</span> <span style="color: #00BB00;">0.010</span></span> -<span class="r-out co"><span class="r-pr">#></span> `new$f_om`: <span style="color: #00BB00;">0.118</span> <span style="color: #00BB00;">0.086</span> <span style="color: #00BB00;">0.048</span> <span style="color: #00BB00;">0.023</span> <span style="color: #555555;">0.018</span> <span style="color: #00BB00;">0.011</span></span> +<span class="r-out co"><span class="r-pr">#></span> `old$f_om`: <span style="color: #00BB00;">0.2200</span> <span style="color: #00BB00;">0.1220</span> <span style="color: #00BB00;">0.0700</span> <span style="color: #00BB00;">0.0250</span> <span style="color: #555555;">0.0180</span> <span style="color: #00BB00;">0.0100</span></span> +<span class="r-out co"><span class="r-pr">#></span> `new$f_om`: <span style="color: #00BB00;">0.1180</span> <span style="color: #00BB00;">0.0860</span> <span style="color: #00BB00;">0.0480</span> <span style="color: #00BB00;">0.0230</span> <span style="color: #555555;">0.0180</span> <span style="color: #00BB00;">0.0110</span></span> <span class="r-out co"><span class="r-pr">#></span> </span> -<span class="r-out co"><span class="r-pr">#></span> `old$theta_fc`: <span style="color: #555555;">0.244</span> <span style="color: #555555;">0.244</span> <span style="color: #00BB00;">0.349</span> <span style="color: #00BB00;">0.349</span> <span style="color: #00BB00;">0.349</span> <span style="color: #00BB00;">0.349</span></span> -<span class="r-out co"><span class="r-pr">#></span> `new$theta_fc`: <span style="color: #555555;">0.244</span> <span style="color: #555555;">0.244</span> <span style="color: #00BB00;">0.385</span> <span style="color: #00BB00;">0.347</span> <span style="color: #00BB00;">0.347</span> <span style="color: #00BB00;">0.347</span></span> +<span class="r-out co"><span class="r-pr">#></span> `old$theta_fc`: <span style="color: #555555;">0.2440</span> <span style="color: #555555;">0.2440</span> <span style="color: #00BB00;">0.3490</span> <span style="color: #00BB00;">0.3490</span> <span style="color: #00BB00;">0.3490</span> <span style="color: #00BB00;">0.3490</span></span> +<span class="r-out co"><span class="r-pr">#></span> `new$theta_fc`: <span style="color: #555555;">0.2440</span> <span style="color: #555555;">0.2440</span> <span style="color: #00BB00;">0.3850</span> <span style="color: #00BB00;">0.3470</span> <span style="color: #00BB00;">0.3470</span> <span style="color: #00BB00;">0.3470</span></span> <span class="r-out co"><span class="r-pr">#></span> </span> -<span class="r-out co"><span class="r-pr">#></span> `old$rho`: <span style="color: #00BB00;">0.707</span> <span style="color: #00BB00;">0.934</span> <span style="color: #00BB00;">1.117</span> <span style="color: #00BB00;">1.371</span> <span style="color: #00BB00;">1.432</span> <span style="color: #00BB00;">1.521</span></span> -<span class="r-out co"><span class="r-pr">#></span> `new$rho`: <span style="color: #00BB00;">0.950</span> <span style="color: #00BB00;">1.050</span> <span style="color: #00BB00;">1.220</span> <span style="color: #00BB00;">1.390</span> <span style="color: #00BB00;">1.430</span> <span style="color: #00BB00;">1.510</span></span> +<span class="r-out co"><span class="r-pr">#></span> `old$rho`: <span style="color: #00BB00;">0.7070</span> <span style="color: #00BB00;">0.9340</span> <span style="color: #00BB00;">1.1170</span> <span style="color: #00BB00;">1.3710</span> <span style="color: #00BB00;">1.4320</span> <span style="color: #00BB00;">1.5210</span></span> +<span class="r-out co"><span class="r-pr">#></span> `new$rho`: <span style="color: #00BB00;">0.9500</span> <span style="color: #00BB00;">1.0500</span> <span style="color: #00BB00;">1.2200</span> <span style="color: #00BB00;">1.3900</span> <span style="color: #00BB00;">1.4300</span> <span style="color: #00BB00;">1.5100</span></span> <span class="r-out co"><span class="r-pr">#></span> </span> -<span class="r-out co"><span class="r-pr">#></span> `old$f_sce`: <span style="color: #00BB00;">1.4</span> <span style="color: #00BB00;">1.4</span> <span style="color: #00BB00;">1.4</span> <span style="color: #00BB00;">1.6</span> <span style="color: #00BB00;">1.6</span> <span style="color: #00BB00;">1.6</span></span> -<span class="r-out co"><span class="r-pr">#></span> `new$f_sce`: <span style="color: #00BB00;">3.0</span> <span style="color: #00BB00;">2.0</span> <span style="color: #00BB00;">2.0</span> <span style="color: #00BB00;">2.0</span> <span style="color: #00BB00;">1.5</span> <span style="color: #00BB00;">1.5</span></span> +<span class="r-out co"><span class="r-pr">#></span> `old$f_sce`: <span style="color: #00BB00;">1.40</span> <span style="color: #00BB00;">1.40</span> <span style="color: #00BB00;">1.40</span> <span style="color: #00BB00;">1.60</span> <span style="color: #00BB00;">1.60</span> <span style="color: #00BB00;">1.60</span></span> +<span class="r-out co"><span class="r-pr">#></span> `new$f_sce`: <span style="color: #00BB00;">3.00</span> <span style="color: #00BB00;">2.00</span> <span style="color: #00BB00;">2.00</span> <span style="color: #00BB00;">2.00</span> <span style="color: #00BB00;">1.50</span> <span style="color: #00BB00;">1.50</span></span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> And 3 more differences ...</span> </code></pre></div> @@ -124,7 +130,7 @@ active substances in soil. <em>EFSA Journal</em> <b>15</b>(10) 4982 </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/soil_scenario_data_EFSA_2017.md b/docs/reference/soil_scenario_data_EFSA_2017.md new file mode 100644 index 0000000..5e3c769 --- /dev/null +++ b/docs/reference/soil_scenario_data_EFSA_2017.md @@ -0,0 +1,80 @@ +# Properties of the predefined scenarios from the EFSA guidance from 2017 + +Properties of the predefined scenarios used at Tier 1, Tier 2A and Tier +3A for the concentration in soil as given in the EFSA guidance (2017, p. +14/15). Also, the scenario and model adjustment factors from p. 16 and +p. 18 are included. + +## Usage + +``` r +soil_scenario_data_EFSA_2017 +``` + +## Format + +A data frame with one row for each scenario. Row names are the scenario +codes, e.g. CTN for the Northern scenario for the total concentration in +soil. Columns are mostly self-explanatory. `rho` is the dry bulk density +of the top soil. + +## Source + +EFSA (European Food Safety Authority) (2017) EFSA guidance document for +predicting environmental concentrations of active substances of plant +protection products and transformation products of these active +substances in soil. *EFSA Journal* **15**(10) 4982 +[doi:10.2903/j.efsa.2017.4982](https://doi.org/10.2903/j.efsa.2017.4982) + +## Examples + +``` r +soil_scenario_data_EFSA_2017 +#> Zone Country T_arit T_arr Texture f_om theta_fc rho f_sce f_mod +#> CTN North Estonia 5.7 7.6 Coarse 0.220 0.244 0.707 1.4 3 +#> CTC Central Poland 7.4 9.3 Coarse 0.122 0.244 0.934 1.4 3 +#> CTS South France 10.2 11.7 Medium 0.070 0.349 1.117 1.4 3 +#> CLN North Denmark 8.0 9.2 Medium 0.025 0.349 1.371 1.6 4 +#> CLC Central Austria 9.3 11.3 Medium 0.018 0.349 1.432 1.6 4 +#> CLS South Spain 15.4 16.7 Medium 0.010 0.349 1.521 1.6 4 +#> FOCUS_zone prec +#> CTN Hamburg 639 +#> CTC Hamburg 617 +#> CTS Hamburg 667 +#> CLN Hamburg 602 +#> CLC Châteaudun 589 +#> CLS Sevilla 526 + +waldo::compare(soil_scenario_data_EFSA_2017, soil_scenario_data_EFSA_2015) +#> `old` is length 12 +#> `new` is length 10 +#> +#> `names(old)[8:12]`: "rho" "f_sce" "f_mod" "FOCUS_zone" "prec" +#> `names(new)[8:10]`: "rho" "f_sce" "f_mod" +#> +#> `old$Country`: "Estonia" "Poland" "France" "Denmark" "Austria" "Spain" +#> `new$Country`: "Estonia" "Germany" "France" "Denmark" "Czech Republik" "Spain" +#> +#> `old$T_arit`: 5.70 7.40 10.20 8.00 9.30 15.40 +#> `new$T_arit`: 4.70 8.00 11.00 8.20 9.10 12.80 +#> +#> `old$T_arr`: 7.60 9.30 11.70 9.20 11.30 16.70 +#> `new$T_arr`: 7.00 10.10 12.30 9.80 11.20 14.70 +#> +#> `old$Texture`: "Coarse" "Coarse" "Medium" "Medium" "Medium" "Medium" +#> `new$Texture`: "Coarse" "Coarse" "Medium fine" "Medium" "Medium" "Medium" +#> +#> `old$f_om`: 0.2200 0.1220 0.0700 0.0250 0.0180 0.0100 +#> `new$f_om`: 0.1180 0.0860 0.0480 0.0230 0.0180 0.0110 +#> +#> `old$theta_fc`: 0.2440 0.2440 0.3490 0.3490 0.3490 0.3490 +#> `new$theta_fc`: 0.2440 0.2440 0.3850 0.3470 0.3470 0.3470 +#> +#> `old$rho`: 0.7070 0.9340 1.1170 1.3710 1.4320 1.5210 +#> `new$rho`: 0.9500 1.0500 1.2200 1.3900 1.4300 1.5100 +#> +#> `old$f_sce`: 1.40 1.40 1.40 1.60 1.60 1.60 +#> `new$f_sce`: 3.00 2.00 2.00 2.00 1.50 1.50 +#> +#> And 3 more differences ... +``` diff --git a/docs/reference/twa.html b/docs/reference/twa.html index 45670c7..74bad9c 100644 --- a/docs/reference/twa.html +++ b/docs/reference/twa.html @@ -1,47 +1,44 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="The moving average is built only using the values in the past, so +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate a time weighted average concentration — twa • pfm</title><!-- mathjax math --><script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI=" crossorigin="anonymous"></script><script> + window.MathJax = { + chtml: { + fontURL: "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/output/chtml/fonts/woff-v2" + } + }; +</script><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate a time weighted average concentration — twa"><meta name="description" content="The moving average is built only using the values in the past, so the earliest possible time for the maximum in the time series returned -is after one window has passed."><title>Calculate a time weighted average concentration — twa • pfm</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate a time weighted average concentration — twa"><meta property="og:description" content="The moving average is built only using the values in the past, so +is after one window has passed."><meta property="og:description" content="The moving average is built only using the values in the past, so the earliest possible time for the maximum in the time series returned -is after one window has passed."><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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> +is after one window has passed."></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> - - <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container"> - + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + <a class="navbar-brand me-2" href="../index.html">pfm</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.1</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.5</small> + - <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar" class="collapse navbar-collapse ms-3"> - <ul class="navbar-nav me-auto"><li class="active nav-item"> - <a class="nav-link" href="../reference/index.html">Reference</a> -</li> - </ul><form class="form-inline my-2 my-lg-0" role="search"> - <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form> - - <ul class="navbar-nav"><li class="nav-item"> - <a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="github"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/pfm/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> </ul></div> - + </div> </nav><div class="container template-reference-topic"> <div class="row"> <main id="main" class="col-md-9"><div class="page-header"> - <img src="" class="logo" alt=""><h1>Calculate a time weighted average concentration</h1> + + <h1>Calculate a time weighted average concentration</h1> <small class="dont-index">Source: <a href="https://github.com/jranke/pfm/blob/HEAD/R/twa.R" class="external-link"><code>R/twa.R</code></a></small> <div class="d-none name"><code>twa.Rd</code></div> </div> @@ -56,17 +53,19 @@ is after one window has passed.</p> <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">twa</span><span class="op">(</span><span class="va">x</span>, window <span class="op">=</span> <span class="fl">21</span><span class="op">)</span></span> <span></span> -<span><span class="co"># S3 method for one_box</span></span> +<span><span class="co"># S3 method for class 'one_box'</span></span> <span><span class="fu">twa</span><span class="op">(</span><span class="va">x</span>, window <span class="op">=</span> <span class="fl">21</span><span class="op">)</span></span></code></pre></div> </div> <div class="section level2"> <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> - <dl><dt>x</dt> -<dd><p>An object of type <code><a href="one_box.html">one_box</a></code></p></dd> -<dt>window</dt> +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>An object of type <a href="one_box.html">one_box</a></p></dd> + + +<dt id="arg-window">window<a class="anchor" aria-label="anchor" href="#arg-window"></a></dt> <dd><p>The size of the moving window</p></dd> </dl></div> @@ -94,23 +93,23 @@ is after one window has passed.</p> <span class="r-out co"><span class="r-pr">#></span> </span> </code></pre></div> </div> - </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> </nav></aside></div> <footer><div class="pkgdown-footer-left"> - <p></p><p>Developed by Johannes Ranke.</p> + <p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown-footer-right"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> - - + + </body></html> diff --git a/docs/reference/twa.md b/docs/reference/twa.md new file mode 100644 index 0000000..5c3a4ea --- /dev/null +++ b/docs/reference/twa.md @@ -0,0 +1,49 @@ +# Calculate a time weighted average concentration + +The moving average is built only using the values in the past, so the +earliest possible time for the maximum in the time series returned is +after one window has passed. + +## Usage + +``` r +twa(x, window = 21) + +# S3 method for class 'one_box' +twa(x, window = 21) +``` + +## Arguments + +- x: + + An object of type + [one_box](https://pkgdown.jrwb.de/pfm/reference/one_box.md) + +- window: + + The size of the moving window + +## See also + +[`max_twa`](https://pkgdown.jrwb.de/pfm/reference/max_twa.md) + +## Examples + +``` r +pred <- sawtooth(one_box(10), + applications = data.frame(time = c(0, 7), amount = c(1, 1))) +max_twa(pred) +#> $max +#> parent +#> 0.9537545 +#> +#> $window_start +#> parent +#> 0 +#> +#> $window_end +#> parent +#> 21 +#> +``` |
