From e7f8a0e82b24d28b74681dafc97f1cf8a4662b51 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sun, 27 Dec 2015 12:30:20 +0100 Subject: Fix rounding of endpoint retrieval functions --- pkg/R/endpoint.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg/R/endpoint.R') 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) } ) -- cgit v1.2.1