aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2015-06-11 10:03:32 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2015-06-11 10:03:32 +0200
commit372ab2f2f59f0baaee759ce966a705f9f754cf6d (patch)
tree32d37b11b507cd93cce78d2db50b40e273dc2a4b
parent586b248f5d249f4ebaad2175c9f78fcae8646636 (diff)
Intermediate stage for pfm_chent
-rw-r--r--pkg/DESCRIPTION2
-rw-r--r--pkg/NAMESPACE4
-rw-r--r--pkg/R/PEC_soil.R12
-rw-r--r--pkg/R/pfm_chent.R1
4 files changed, 15 insertions, 4 deletions
diff --git a/pkg/DESCRIPTION b/pkg/DESCRIPTION
index a6880f2..ba69d26 100644
--- a/pkg/DESCRIPTION
+++ b/pkg/DESCRIPTION
@@ -2,7 +2,7 @@ Package: pfm
Type: Package
Title: Utilities for pesticide fate modelling
Version: 0.1-3
-Date: 2015-05-07
+Date: 2015-06-09
Authors@R: person("Johannes Ranke", email = "jranke@uni-bremen.de",
role = c("aut", "cre", "cph"))
Description: Utilities for simple PEC calculations and for dealing with data
diff --git a/pkg/NAMESPACE b/pkg/NAMESPACE
index 86b85da..7168ebc 100644
--- a/pkg/NAMESPACE
+++ b/pkg/NAMESPACE
@@ -2,7 +2,11 @@
S3method(plot,TOXSWA_cwa)
export(PEC_soil)
+export(PEC_soil_product)
export(TOXSWA_cwa)
export(geomean)
+export(pfm_ai)
+export(pfm_chent)
+export(pfm_product)
export(read.TOXSWA_cwa)
importFrom(R6,R6Class)
diff --git a/pkg/R/PEC_soil.R b/pkg/R/PEC_soil.R
index 26e0883..73c7e42 100644
--- a/pkg/R/PEC_soil.R
+++ b/pkg/R/PEC_soil.R
@@ -45,6 +45,12 @@ PEC_soil <- function(rate, rate_units = "g/ha", interception = 0,
}
+#' Calculate predicted environmental concentrations in soil for a product
+#'
+#' Calculates long term accumulation PEC values
+#'
+#' @export
+#' @author Johannes Ranke
PEC_soil_product <- function(product, rate, rate_units = "L/ha", interception = 0,
mixing_depth = 5, tillage_depth = 20,
interval = 365,
@@ -71,7 +77,8 @@ PEC_soil_product <- function(product, rate, rate_units = "L/ha", interception =
results[ai_name, "initial"] <- ini
ini_tillage <- ini * mixing_depth / tillage_depth
- DT50 <- subset(ai$degradation_endpoints, destination == "PECsoil")$DT50
+ DT50 <- subset(ai$soil_degradation_endpoints, destination == "PECsoil")$DT50
+ if (length(DT50) > 1) stop("More than one PECsoil DT50 for", ai$acronym)
if (length(DT50) > 0) {
if (!is.na(DT50)) {
k <- log(2) / DT50
@@ -95,7 +102,8 @@ PEC_soil_product <- function(product, rate, rate_units = "L/ha", interception =
results[TP_name, "initial"] <- ini
ini_tillage <- ini * mixing_depth / tillage_depth
- DT50 <- subset(TP$degradation_endpoints, destination == "PECsoil")$DT50
+ DT50 <- subset(TP$soil_degradation_endpoints, destination == "PECsoil")$DT50
+ if (length(DT50) > 1) stop("More than one PECsoil DT50 for", TP$acronym)
if (length(DT50) > 0) {
if (!is.na(DT50)) {
k <- log(2) / DT50
diff --git a/pkg/R/pfm_chent.R b/pkg/R/pfm_chent.R
index 13a883b..3c950ec 100644
--- a/pkg/R/pfm_chent.R
+++ b/pkg/R/pfm_chent.R
@@ -190,7 +190,6 @@ pfm_chent <- R6Class("pfm_chent",
#'
#' @docType class
#' @importFrom R6 R6Class
-#' @importFrom pfm pfm_chent
#' @export
#' @format An \code{\link{R6Class}} generator object.
#' @field iso ISO common name

Contact - Imprint