Commit c1d50a59 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v0.2.9.25 BUG: the use of match.arg on transfo arg replaced in SimGR and CalGR #15

parent ec2f9104
Package: airGRteaching
Type: Package
Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included)
Version: 0.2.9.24
Date: 2020-03-30
Version: 0.2.9.25
Date: 2020-04-13
Authors@R: c(
person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"),
person("Laurent", "Coron", role = c("aut"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -4,7 +4,7 @@
### 0.2.9.24 Release Notes (2020-03-30)
### 0.2.9.25 Release Notes (2020-04-13)
#### New features
......
......@@ -5,7 +5,11 @@ CalGR <- function(PrepGR, CalCrit = c("NSE", "KGE", "KGE2", "RMSE"),
CalCrit <- sprintf("ErrorCrit_%s", CalCrit)
FUN_CRIT <- get(CalCrit)
transfo <- match.arg(transfo)
if (! any(transfo %in% c("", "sqrt", "log", "inv", "sort"))) {
stop("Non convenient transformation \"transfo\"")
} else {
transfo <- transfo[1L]
}
if (! any(class(PrepGR) %in% "PrepGR")) {
......
......@@ -5,7 +5,11 @@ SimGR <- function(PrepGR, CalGR = NULL, Param, EffCrit = c("NSE", "KGE", "KGE2",
EffCrit <- sprintf("ErrorCrit_%s", EffCrit)
FUN_CRIT <- get(EffCrit)
transfo <- match.arg(transfo)
if (! any(transfo %in% c("", "sqrt", "log", "inv", "sort"))) {
stop("Non convenient transformation \"transfo\"")
} else {
transfo <- transfo[1L]
}
if (! any(class(PrepGR) %in% "PrepGR")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment