From 8423df9693c5cd2f2d36ee3131c7b6fcefa4d0ca Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 29 Jan 2018 10:11:27 +0100 Subject: Documentation fixes and updates --- ChangeLog | 8 ++++++++ DESCRIPTION | 2 +- NAMESPACE | 5 +++-- R/PEC_sw_exposit_runoff.R | 5 ++--- R/TOXSWA_cwa.R | 4 +++- build.log | 4 ---- docs/reference/PELMO_runs.html | 2 +- docs/reference/TOXSWA_cwa.html | 4 ++-- docs/reference/perc_runoff_reduction_exposit.html | 2 +- docs/reference/pesticide.txt | 4 ++++ docs/reference/read.TOXSWA_cwa.html | 2 +- man/TOXSWA_cwa.Rd | 4 ++-- man/perc_runoff_reduction_exposit.Rd | 3 +-- man/read.TOXSWA_cwa.Rd | 2 +- 14 files changed, 30 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42c1692..017af3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +commit b9ce44748f2795ae1f35fe5a510e88635f247a7f +Author: Johannes Ranke +Date: 2018-01-29 09:22:42 +0100 + + Correction of return value documentation for PEC_sw_exposit_runoff + + Rebuild pkgdown documentation + commit 87d63e649da5e12409c50cb06d3d2a01e9880759 Author: Johannes Ranke Date: 2017-12-15 17:25:21 +0100 diff --git a/DESCRIPTION b/DESCRIPTION index 9ff66a6..35c29dc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -26,4 +26,4 @@ License: GPL LazyLoad: yes LazyData: yes Encoding: UTF-8 -RoxygenNote: 6.0.1.9000 +RoxygenNote: 6.0.1 diff --git a/NAMESPACE b/NAMESPACE index 141a68c..ddf73dd 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -16,7 +16,6 @@ export(FOCUS_PELMO_crop_sze_names) export(FOCUS_PELMO_crops) export(FOCUS_PELMO_location_codes) export(GUS) -export(Koc_breaks) export(PEC_soil) export(PEC_sw_drainage_UK) export(PEC_sw_drift) @@ -28,7 +27,6 @@ export(PELMO_runs) export(SFO_actual_twa) export(SSLRC_mobility_classification) export(TOXSWA_cwa) -export(buffers) export(chent_focus_sw) export(endpoint) export(evaluate_PELMO) @@ -36,6 +34,8 @@ export(focus_80th) export(geomean) export(max_twa) export(one_box) +export(perc_runoff_exposit) +export(perc_runoff_reduction_exposit) export(pfm_degradation) export(read.TOXSWA_cwa) export(run_PELMO) @@ -48,6 +48,7 @@ export(twa) import(graphics) import(mkin) importFrom(R6,R6Class) +importFrom(grDevices,dev.cur) importFrom(methods,is) importFrom(mkin,mkinpredict) importFrom(parallel,mclapply) diff --git a/R/PEC_sw_exposit_runoff.R b/R/PEC_sw_exposit_runoff.R index 064b710..87fd88b 100644 --- a/R/PEC_sw_exposit_runoff.R +++ b/R/PEC_sw_exposit_runoff.R @@ -13,7 +13,7 @@ #' } #' @source Excel 3.01 spreadsheet available from #' \url{https://www.bvl.bund.de/DE/04_Pflanzenschutzmittel/03_Antragsteller/04_Zulassungsverfahren/07_Naturhaushalt/psm_naturhaush_node.html#doc1400590bodyText3} -#' @export +#' @export perc_runoff_exposit #' @examples #' print(perc_runoff_exposit) Koc_breaks <- c(0, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, Inf) @@ -43,12 +43,11 @@ rownames(perc_runoff_exposit) <- Koc_classes #' @export #' @examples #' print(perc_runoff_reduction_exposit) -buffers <- c("No buffer", paste(c(5, 10, 20), "m")) perc_runoff_reduction_exposit <- list( "3.01" = data.frame( dissolved = c(0, 40, 60, 80), bound = c(0, 40, 85, 95), - row.names = buffers), + row.names = c("No buffer", paste(c(5, 10, 20), "m"))), "2.0" = data.frame( dissolved = c(0, 97.5), bound = c(0, 97.5), diff --git a/R/TOXSWA_cwa.R b/R/TOXSWA_cwa.R index eacd58f..4caafb6 100644 --- a/R/TOXSWA_cwa.R +++ b/R/TOXSWA_cwa.R @@ -1,4 +1,4 @@ -# Copyright (C) 2014,2015,2016,2017 Johannes Ranke +# Copyright (C) 2014,2015,2016,2017,2018 Johannes Ranke # Contact: jranke@uni-bremen.de # This file is part of the R package pfm @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License along with # this program. If not, see +if(getRversion() >= '2.15.1') utils::globalVariables(c("cwa")) #' Read TOXSWA surface water concentrations #' @@ -40,6 +41,7 @@ #' @param thresholds Numeric vector of threshold concentrations in µg/L for #' generating event statistics. #' @importFrom readr read_fwf fwf_empty +#' @importFrom grDevices dev.cur #' @return An instance of an R6 object of class #' \code{\link{TOXSWA_cwa}}. #' @export diff --git a/build.log b/build.log index d99144c..95a265b 100644 --- a/build.log +++ b/build.log @@ -1,10 +1,6 @@ * checking for file ‘./DESCRIPTION’ ... OK * preparing ‘pfm’: * checking DESCRIPTION meta-information ... OK -Warnung: /tmp/RtmpcrkMKU/Rbuild6cab5b5f6c51/pfm/man/TOXSWA_cwa.Rd:29: unknown macro '\u00B5g' -Warnung: /tmp/RtmpcrkMKU/Rbuild6cab5b5f6c51/pfm/man/TOXSWA_cwa.Rd:29: unknown macro '\u00B5g' -Warnung: /tmp/RtmpcrkMKU/Rbuild6cab5b5f6c51/pfm/man/TOXSWA_cwa.Rd:38: unknown macro '\u00B5g' -Warnung: /tmp/RtmpcrkMKU/Rbuild6cab5b5f6c51/pfm/man/read.TOXSWA_cwa.Rd:33: unknown macro '\u00B5g' * checking for LF line-endings in source and make files and shell scripts * checking for empty or unneeded directories * looking to see if a ‘data/datalist’ file should be added diff --git a/docs/reference/PELMO_runs.html b/docs/reference/PELMO_runs.html index f06c0fe..3d70c32 100644 --- a/docs/reference/PELMO_runs.html +++ b/docs/reference/PELMO_runs.html @@ -190,7 +190,7 @@ the period.plm file generated by the FOCUS PELMO GUI.

#> #>
# We get exactly the same PECgw values (on Linux, calling PELMO using Wine). print(time_1)
#> User System verstrichen -#> 219.036 1.004 56.622
+#> 218.536 1.056 55.555
# Demonstrate some results with metabolites. runs_2 <- list(list(psm = 'Pesticide_D_1_May_every_other_year_mets', win = c("Cha", "Ham", "Kre"))) diff --git a/docs/reference/TOXSWA_cwa.html b/docs/reference/TOXSWA_cwa.html index f67df04..f29951b 100644 --- a/docs/reference/TOXSWA_cwa.html +++ b/docs/reference/TOXSWA_cwa.html @@ -92,7 +92,7 @@ Usually, an instance of this class will be generated by
get_events(threshold, total = FALSE)

Populate a datataframe with event information for the specified threshold value - in /L. If total = TRUE, the total concentration including the amount + in µg/L. If total = TRUE, the total concentration including the amount adsorbed to suspended matter will be used. The resulting dataframe is stored in the events field of the object.

moving_windows(windows, total = FALSE)

Add to the windows field described above. diff --git a/docs/reference/perc_runoff_reduction_exposit.html b/docs/reference/perc_runoff_reduction_exposit.html index 59dd40d..fba910b 100644 --- a/docs/reference/perc_runoff_reduction_exposit.html +++ b/docs/reference/perc_runoff_reduction_exposit.html @@ -75,7 +75,7 @@

A table of the runoff reduction percentages used in Exposit 3 for different vegetated buffer widths

-
buffers
+
perc_runoff_reduction_exposit

Format

diff --git a/docs/reference/pesticide.txt b/docs/reference/pesticide.txt index 786f7f0..e8743b0 100644 --- a/docs/reference/pesticide.txt +++ b/docs/reference/pesticide.txt @@ -13,3 +13,7 @@ Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Du M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js 250.00 100.00 100.00 50.00 100.00 100.00 0.00E+00 50.00 1000.00 1.00 0.00E+00 1.00 -99.00 -99.00 -99.00 -99.00 0.00E+00 1.00 Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA -99.00 -99.00 6000.00 344.80 0.00E+00 6.00 0.00E+00 0.00E+00 3000.00 1.00 0.00E+00 0.00E+00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 0.00E+00 -99.00 -99.00 -99.00 0.00E+00 1.00 M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js 250.00 100.00 100.00 50.00 100.00 100.00 0.00E+00 50.00 1000.00 1.00 0.00E+00 1.00 -99.00 -99.00 -99.00 -99.00 0.00E+00 1.00 +Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA -99.00 -99.00 6000.00 344.80 0.00E+00 6.00 0.00E+00 0.00E+00 3000.00 1.00 0.00E+00 0.00E+00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 0.00E+00 -99.00 -99.00 -99.00 0.00E+00 1.00 +M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js 250.00 100.00 100.00 50.00 100.00 100.00 0.00E+00 50.00 1000.00 1.00 0.00E+00 1.00 -99.00 -99.00 -99.00 -99.00 0.00E+00 1.00 +Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA -99.00 -99.00 6000.00 344.80 0.00E+00 6.00 0.00E+00 0.00E+00 3000.00 1.00 0.00E+00 0.00E+00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 0.00E+00 -99.00 -99.00 -99.00 0.00E+00 1.00 +M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js 250.00 100.00 100.00 50.00 100.00 100.00 0.00E+00 50.00 1000.00 1.00 0.00E+00 1.00 -99.00 -99.00 -99.00 -99.00 0.00E+00 1.00 diff --git a/docs/reference/read.TOXSWA_cwa.html b/docs/reference/read.TOXSWA_cwa.html index 25e7dd7..25452c5 100644 --- a/docs/reference/read.TOXSWA_cwa.html +++ b/docs/reference/read.TOXSWA_cwa.html @@ -123,7 +123,7 @@ maximum time weighted average concentrations and areas under the curve.

thresholds -

Numeric vector of threshold concentrations in /L for +

Numeric vector of threshold concentrations in µg/L for generating event statistics.

diff --git a/man/TOXSWA_cwa.Rd b/man/TOXSWA_cwa.Rd index e417094..3152c6e 100644 --- a/man/TOXSWA_cwa.Rd +++ b/man/TOXSWA_cwa.Rd @@ -26,7 +26,7 @@ Usually, an instance of this class will be generated by \code{\link{read.TOXSWA_ \item{\code{events}}{List of dataframes holding the event statistics for each threshold.} \item{\code{windows}}{Matrix of maximum time weighted average concentrations (TWAC_max) -and areas under the curve in \u00B5g/day * h (AUC_max_h) or \u00B5g/day * d (AUC_max_d) +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.} }} @@ -35,7 +35,7 @@ for the requested moving window sizes in days.} \describe{ \item{\code{get_events(threshold, total = FALSE)}}{ Populate a datataframe with event information for the specified threshold value - in \u00B5g/L. If \code{total = TRUE}, the total concentration including the amount + in µg/L. If \code{total = TRUE}, the total concentration including the amount adsorbed to suspended matter will be used. The resulting dataframe is stored in the \code{events} field of the object. } diff --git a/man/perc_runoff_reduction_exposit.Rd b/man/perc_runoff_reduction_exposit.Rd index 51b067d..bc93b29 100644 --- a/man/perc_runoff_reduction_exposit.Rd +++ b/man/perc_runoff_reduction_exposit.Rd @@ -3,7 +3,6 @@ \docType{data} \name{perc_runoff_reduction_exposit} \alias{perc_runoff_reduction_exposit} -\alias{buffers} \title{Runoff reduction percentages as used in Exposit} \format{A named list of data frames with reduction percentage values for the dissolved fraction and the fraction bound to eroding particles, with @@ -18,7 +17,7 @@ Excel 3.01 spreadsheet available from \url{https://www.bvl.bund.de/DE/04_Pflanzenschutzmittel/03_Antragsteller/04_Zulassungsverfahren/07_Naturhaushalt/psm_naturhaush_node.html#doc1400590bodyText3} } \usage{ -buffers +perc_runoff_reduction_exposit } \description{ A table of the runoff reduction percentages used in Exposit 3 for different vegetated buffer widths diff --git a/man/read.TOXSWA_cwa.Rd b/man/read.TOXSWA_cwa.Rd index 28479f2..2541c9b 100644 --- a/man/read.TOXSWA_cwa.Rd +++ b/man/read.TOXSWA_cwa.Rd @@ -30,7 +30,7 @@ files. For .cwa files, the total concentration is always read as well.} \item{windows}{Numeric vector of width of moving windows in days, for calculating maximum time weighted average concentrations and areas under the curve.} -\item{thresholds}{Numeric vector of threshold concentrations in \u00B5g/L for +\item{thresholds}{Numeric vector of threshold concentrations in µg/L for generating event statistics.} } \value{ -- cgit v1.2.1