diff options
Diffstat (limited to 'R')
-rw-r--r-- | R/FOMC_actual_twa.R | 17 | ||||
-rw-r--r-- | R/GUS.R | 17 | ||||
-rw-r--r-- | R/PEC_soil.R | 17 | ||||
-rw-r--r-- | R/PEC_sw_drainage_UK.R | 17 | ||||
-rw-r--r-- | R/PEC_sw_drift.R | 17 | ||||
-rw-r--r-- | R/PEC_sw_sed.R | 17 | ||||
-rw-r--r-- | R/SFO_actual_twa.R | 17 | ||||
-rw-r--r-- | R/SSLRC_mobility_classification.R | 17 | ||||
-rw-r--r-- | R/TOXSWA_cwa.R | 16 | ||||
-rw-r--r-- | R/geomean.R | 17 | ||||
-rw-r--r-- | R/twa.R | 28 |
11 files changed, 5 insertions, 192 deletions
diff --git a/R/FOMC_actual_twa.R b/R/FOMC_actual_twa.R index dc869b5..0ccf315 100644 --- a/R/FOMC_actual_twa.R +++ b/R/FOMC_actual_twa.R @@ -1,20 +1,3 @@ -# Copyright (C) 2018 Johannes Ranke -# Contact: jranke@uni-bremen.de -# This file is part of the R package pfm - -# This program is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. - -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. - -# You should have received a copy of the GNU General Public License along with -# this program. If not, see <http://www.gnu.org/licenses/> - #' Actual and maximum moving window time average concentrations for FOMC kinetics #' #' @param alpha Parameter of the FOMC model @@ -1,20 +1,3 @@ -# Copyright (C) 2015 Johannes Ranke -# Contact: jranke@uni-bremen.de -# This file is part of the R package pfm - -# This program is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. - -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. - -# You should have received a copy of the GNU General Public License along with -# this program. If not, see <http://www.gnu.org/licenses/> - #' Groundwater ubiquity score based on Gustafson (1989) #' #' The groundwater ubiquity score GUS is calculated according to diff --git a/R/PEC_soil.R b/R/PEC_soil.R index 541184f..b29ff13 100644 --- a/R/PEC_soil.R +++ b/R/PEC_soil.R @@ -1,20 +1,3 @@ -# Copyright (C) 2015,2016,2018,2019 Johannes Ranke -# Contact: jranke@uni-bremen.de -# This file is part of the R package pfm - -# This program is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. - -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. - -# You should have received a copy of the GNU General Public License along with -# this program. If not, see <http://www.gnu.org/licenses/> - # Register global variables if(getRversion() >= '2.15.1') utils::globalVariables(c("destination", "study_type", "TP_identifier", "soil_scenario_data_EFSA_2015", diff --git a/R/PEC_sw_drainage_UK.R b/R/PEC_sw_drainage_UK.R index 3be4c97..d773f40 100644 --- a/R/PEC_sw_drainage_UK.R +++ b/R/PEC_sw_drainage_UK.R @@ -1,20 +1,3 @@ -# Copyright (C) 2015 Johannes Ranke -# Contact: jranke@uni-bremen.de -# This file is part of the R package pfm - -# This program is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. - -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. - -# You should have received a copy of the GNU General Public License along with -# this program. If not, see <http://www.gnu.org/licenses/> - #' 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 diff --git a/R/PEC_sw_drift.R b/R/PEC_sw_drift.R index 261706c..6fcaecf 100644 --- a/R/PEC_sw_drift.R +++ b/R/PEC_sw_drift.R @@ -1,20 +1,3 @@ -# Copyright (C) 2015 Johannes Ranke -# Contact: jranke@uni-bremen.de -# This file is part of the R package pfm - -# This program is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. - -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. - -# You should have received a copy of the GNU General Public License along with -# this program. If not, see <http://www.gnu.org/licenses/> - #' Calculate predicted environmental concentrations in surface water due to drift #' #' This is a basic, vectorised form of a simple calculation of a contaminant diff --git a/R/PEC_sw_sed.R b/R/PEC_sw_sed.R index a4a3d6a..2865ab7 100644 --- a/R/PEC_sw_sed.R +++ b/R/PEC_sw_sed.R @@ -1,20 +1,3 @@ -# Copyright (C) 2015 Johannes Ranke -# Contact: jranke@uni-bremen.de -# This file is part of the R package pfm - -# This program is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. - -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. - -# You should have received a copy of the GNU General Public License along with -# this program. If not, see <http://www.gnu.org/licenses/> - #' Calculate predicted environmental concentrations in sediment from surface #' water concentrations #' diff --git a/R/SFO_actual_twa.R b/R/SFO_actual_twa.R index 0d2015b..63a53f3 100644 --- a/R/SFO_actual_twa.R +++ b/R/SFO_actual_twa.R @@ -1,20 +1,3 @@ -# Copyright (C) 2015,2018 Johannes Ranke -# Contact: jranke@uni-bremen.de -# This file is part of the R package pfm - -# This program is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. - -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. - -# You should have received a copy of the GNU General Public License along with -# this program. If not, see <http://www.gnu.org/licenses/> - #' Actual and maximum moving window time average concentrations for SFO kinetics #' #' @param DT50 The half-life. diff --git a/R/SSLRC_mobility_classification.R b/R/SSLRC_mobility_classification.R index 602f166..b78de98 100644 --- a/R/SSLRC_mobility_classification.R +++ b/R/SSLRC_mobility_classification.R @@ -1,20 +1,3 @@ -# Copyright (C) 2015,2018,2019 Johannes Ranke -# Contact: jranke@uni-bremen.de -# This file is part of the R package pfm - -# This program is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. - -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. - -# You should have received a copy of the GNU General Public License along with -# this program. If not, see <http://www.gnu.org/licenses/> - #' 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 diff --git a/R/TOXSWA_cwa.R b/R/TOXSWA_cwa.R index 5b1e8f2..42cdd35 100644 --- a/R/TOXSWA_cwa.R +++ b/R/TOXSWA_cwa.R @@ -1,19 +1,3 @@ -# Copyright (C) 2014,2015,2016,2017,2018 Johannes Ranke -# Contact: jranke@uni-bremen.de -# This file is part of the R package pfm - -# This program is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. - -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. - -# You should have received a copy of the GNU General Public License along with -# this program. If not, see <http://www.gnu.org/licenses/> if(getRversion() >= '2.15.1') utils::globalVariables(c("cwa")) #' Read TOXSWA surface water concentrations diff --git a/R/geomean.R b/R/geomean.R index 04328c8..34c5caf 100644 --- a/R/geomean.R +++ b/R/geomean.R @@ -1,20 +1,3 @@ -# Copyright (C) 2015,2020 Johannes Ranke -# Contact: jranke@uni-bremen.de -# This file is part of the R package pfm - -# This program is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. - -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. - -# You should have received a copy of the GNU General Public License along with -# this program. If not, see <http://www.gnu.org/licenses/> - #' Calculate the geometric mean #' #' Based on some posts in a thread on Stackoverflow @@ -1,28 +1,10 @@ -# Copyright (C) 2016,2017 Johannes Ranke - -# Contact: jranke@uni-bremen.de -# This file is part of the R package pfm - -# This program is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. - -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. - -# You should have received a copy of the GNU General Public License along with -# this program. If not, see <http://www.gnu.org/licenses/> - #' Create a time series of decline data #' #' @param 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. \code{FOMC}, \code{parms} must contain the corresponding parameters. #' If x is an \code{\link{mkinfit}} object, the decline is calculated from this -#' object. +#' object. #' @param ini The initial amount. If x is an \code{\link{mkinfit}} 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 @@ -93,7 +75,7 @@ one_box.character <- function(x, ini = 1, parms, ..., t_out <- seq(0, t_end, by = res) pred <- mkinpredict(m, odeparms = parms, odeini = c(parent = ini), - outtimes = t_out, solution_type = "analytical")[-1] + outtimes = t_out, solution_type = "analytical")[, -1, drop = FALSE] result <- ts(pred, 0, t_end, frequency = 1/res) class(result) <- c("one_box", "ts") return(result) @@ -118,7 +100,7 @@ one_box.mkinfit <- function(x, ini = "model", ..., t_end = 100, res = 0.01) { else solution_type = "deSolve" tmp <- mkinpredict(fit$mkinmod, odeparms = fit$bparms.ode, odeini = odeini, - outtimes = t_out, solution_type = solution_type)[-1] + outtimes = t_out, solution_type = solution_type)[, -1, drop = FALSE] result <- ts(tmp, 0, t_end, frequency = 1/res) class(result) <- c("one_box", "ts") return(result) @@ -172,7 +154,7 @@ plot.one_box <- function(x, #' Create decline time series for multiple applications #' -#' If the application pattern is specified in \code{applications}, +#' If the application pattern is specified in \code{applications}, #' \code{n} and \code{i} are disregarded. #' @param x A \code{\link{one_box}} object #' @param n The number of applications. If \code{applications} is specified, \code{n} is ignored @@ -260,7 +242,7 @@ twa.one_box <- function(x, window = 21) #' for finding the maximum. It is therefore recommended to check this using #' \code{\link{plot.one_box}} using the window size for the argument #' \code{max_twa}. -#' +#' #' The method working directly on fitted \code{\link{mkinfit}} 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 |