Commit 7dde9a73 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.2.9.6 BUG: match.fun now works on FUN_CRIT in CreateInputsCrit if it is a list

Showing with 7 additions and 3 deletions
+7 -3
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.2.9.5
Version: 1.2.9.6
Date: 2019-03-13
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -13,7 +13,7 @@ output:
### 1.2.9.5 Release Notes (2019-03-13)
### 1.2.9.6 Release Notes (2019-03-13)
......
......@@ -15,7 +15,6 @@ CreateInputsCrit <- function(FUN_CRIT,
ObjectClass <- NULL
FUN_CRIT <- match.fun(FUN_CRIT)
## ---------- check arguments
......@@ -91,6 +90,10 @@ CreateInputsCrit <- function(FUN_CRIT,
}
}
## check 'FUN_CRIT'
listArgs$FUN_CRIT <- lapply(listArgs$FUN_CRIT, FUN = match.fun)
## check 'varObs'
if (missing(varObs)) {
listArgs$varObs <- as.list(rep("Q", times = length(listArgs$obs)))
......@@ -99,6 +102,7 @@ CreateInputsCrit <- function(FUN_CRIT,
# }
}
## check 'varObs' + 'RunOptions'
if ("Q" %in% varObs & !inherits(RunOptions, "GR")) {
stop("'varObs' cannot contain Q if a GR rainfall-runoff model is not used")
......
Supports Markdown
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