aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2015-12-27 12:30:20 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2015-12-27 12:30:20 +0100
commite7f8a0e82b24d28b74681dafc97f1cf8a4662b51 (patch)
tree28bc9a13dcc64caf8cd7ab0eed209b3356f0bd23 /pkg
parentf9373e361dde232b08fe7431e85bf367a1cfc269 (diff)
Fix rounding of endpoint retrieval functions
Diffstat (limited to 'pkg')
-rw-r--r--pkg/DESCRIPTION2
-rw-r--r--pkg/R/endpoint.R6
-rw-r--r--pkg/man/endpoint.Rd2
3 files changed, 7 insertions, 3 deletions
diff --git a/pkg/DESCRIPTION b/pkg/DESCRIPTION
index e0e285f..7e6d064 100644
--- a/pkg/DESCRIPTION
+++ b/pkg/DESCRIPTION
@@ -2,7 +2,7 @@ Package: pfm
Type: Package
Title: Utilities for Pesticide Fate Modelling
Version: 0.3-1
-Date: 2015-12-22
+Date: 2015-12-27
Authors@R: person("Johannes Ranke", email = "jranke@uni-bremen.de",
role = c("aut", "cre", "cph"))
Description: Utilities for simple calculations of predicted environmental
diff --git a/pkg/R/endpoint.R b/pkg/R/endpoint.R
index fbe9f43..68e47f7 100644
--- a/pkg/R/endpoint.R
+++ b/pkg/R/endpoint.R
@@ -61,6 +61,7 @@ soil_DT50 <- function(chent, aggregator = geomean, signif = 3,
redox = "aerobic", raw = FALSE) {
ep <- endpoint(chent, medium = "soil", type = "degradation",
lab_field = "laboratory", redox = redox,
+ signif = signif,
value = value, aggregator = aggregator, raw = raw)
return(ep)
}
@@ -71,6 +72,7 @@ soil_DT50 <- function(chent, aggregator = geomean, signif = 3,
soil_Kfoc <- function(chent, aggregator = geomean, signif = 3,
value = "Kfoc", raw = FALSE) {
ep <- endpoint(chent, medium = "soil", type = "sorption",
+ signif = signif,
value = value, aggregator = aggregator, raw = raw)
return(ep)
}
@@ -80,6 +82,7 @@ soil_Kfoc <- function(chent, aggregator = geomean, signif = 3,
#' @export
soil_N <- function(chent, aggregator = mean, signif = 3, raw = FALSE) {
ep <- endpoint(chent, medium = "soil", type = "sorption",
+ signif = signif,
value = "N", aggregator = aggregator, raw = raw)
return(ep)
}
@@ -91,11 +94,12 @@ soil_N <- function(chent, aggregator = mean, signif = 3, raw = FALSE) {
#' @export
soil_sorption <- function(chent, values = c("Kfoc", "N"),
aggregators = c(Kfoc = geomean, Koc = geomean, N = mean),
- signif = rep(3, length(values)),
+ signif = c(Kfoc = 3, N = 3),
raw = FALSE) {
res <- sapply(values,
function(x) {
endpoint(chent, medium = "soil", type = "sorption",
+ signif = signif[[x]],
value = x, aggregator = aggregators[[x]], raw = raw)
}
)
diff --git a/pkg/man/endpoint.Rd b/pkg/man/endpoint.Rd
index 15b3cb2..fd16650 100644
--- a/pkg/man/endpoint.Rd
+++ b/pkg/man/endpoint.Rd
@@ -23,7 +23,7 @@ soil_Kfoc(chent, aggregator = geomean, signif = 3, value = "Kfoc",
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 = rep(3, length(values)),
+ geomean, Koc = geomean, N = mean), signif = c(Kfoc = 3, N = 3),
raw = FALSE)
}
\arguments{

Contact - Imprint