diff --git a/R/CreateInputsCrit_DeLavenne.R b/R/CreateInputsCrit_DeLavenne.R index b0d97ca0be4eba463d16aa144f3b036421c59aa8..590270576f89118416b8bd694462803dfb3d8c5f 100644 --- a/R/CreateInputsCrit_DeLavenne.R +++ b/R/CreateInputsCrit_DeLavenne.R @@ -7,7 +7,7 @@ CreateInputsCrit_DeLavenne <- function(FUN_CRIT = ErrorCrit_KGE, AprCrit = 1, k = 0.15, BoolCrit = NULL, - transfo = "", + transfo = "sqrt", epsilon = NULL) { # Check parameters diff --git a/man/CreateInputsCrit_DeLavenne.Rd b/man/CreateInputsCrit_DeLavenne.Rd index 617efc017fbaae99f12f510e52c91ac3c026169f..a16fd96f6e2856c048b312935af8bfc4df60a2fb 100644 --- a/man/CreateInputsCrit_DeLavenne.Rd +++ b/man/CreateInputsCrit_DeLavenne.Rd @@ -23,7 +23,7 @@ CreateInputsCrit_DeLavenne(FUN_CRIT = ErrorCrit_KGE, AprCrit = 1, k = 0.15, BoolCrit = NULL, - transfo = "", + transfo = "sqrt", epsilon = NULL) } @@ -47,7 +47,7 @@ CreateInputsCrit_DeLavenne(FUN_CRIT = ErrorCrit_KGE, \item{BoolCrit}{(optional) [boolean] boolean (the same length as \code{Obs}) giving the time steps to consider in the computation (all time steps are considered by default. See details)} -\item{transfo}{(optional) [character] name of the transformation applied to the variables (e.g. \code{""}, \code{"sqrt"}, \code{"log"}, \code{"inv"}, \code{"sort"}, \code{"boxcox"} or a numeric value for power transformation for \code{FUN_CRIT}. See details of \code{\link{CreateInputsCrit}}} +\item{transfo}{(optional) [character] name of the transformation applied to the variables (e.g. \code{""}, \code{"sqrt"}, \code{"log"}, \code{"inv"}, \code{"sort"}, \code{"boxcox"} or a numeric value for power transformation for \code{FUN_CRIT}. Default value is \code{"sqrt"}. See details of \code{\link{CreateInputsCrit}}} \item{epsilon}{(optional) [numeric] small value to add to all observations and simulations for \code{FUN_CRIT} when \code{"log"} or \code{"inv"} transformations are used [same unit as \code{Obs}]. See details of \code{\link{CreateInputsCrit}}} } diff --git a/tests/testthat/test-CreateInputsCrit_DeLavenne.R b/tests/testthat/test-CreateInputsCrit_DeLavenne.R index 2d3c3de1461e177aace62aed2389284800bbd00f..bd7752d4595fa445cd5d7747556e4abf82da3fb5 100644 --- a/tests/testthat/test-CreateInputsCrit_DeLavenne.R +++ b/tests/testthat/test-CreateInputsCrit_DeLavenne.R @@ -32,7 +32,8 @@ test_that("should return KGE*(1-k)+k with parameters matching a priori parameter IC_KGE <- CreateInputsCrit(ErrorCrit_KGE, InputsModel = InputsModel, RunOptions = RunOptions, - Obs = BasinObs$Qmm[Ind_Run]) + Obs = BasinObs$Qmm[Ind_Run], + transfo = "sqrt") expect_equal(ErrorCrit_KGE(IC_KGE, OutputsModel)$CritValue * (1 - k) + k, ErrorCrit(IC_DL, OutputsModel)$CritValue) })