aboutsummaryrefslogtreecommitdiff
path: root/pkg/R/endpoint.R
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/R/endpoint.R
parentf9373e361dde232b08fe7431e85bf367a1cfc269 (diff)
Fix rounding of endpoint retrieval functions
Diffstat (limited to 'pkg/R/endpoint.R')
-rw-r--r--pkg/R/endpoint.R6
1 files changed, 5 insertions, 1 deletions
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)
}
)

Contact - Imprint