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/DESCRIPTION | 2 +- pkg/R/endpoint.R | 6 +++++- pkg/man/endpoint.Rd | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'pkg') 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{ -- cgit v1.2.1