diff --git a/DESCRIPTION b/DESCRIPTION index ad1c119c9a6d2aea3091af61854c17270618ffa0..bd5d312901d699b46f2cdabdfb3708010bd42c80 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ 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")), diff --git a/NEWS.rmd b/NEWS.rmd index 5f49f786abce66e070c4e82bfe340ad7fddf6055..048c11fac9580c94d5e90fc83a47dda4a1e3ccad 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -13,7 +13,7 @@ output: -### 1.2.9.5 Release Notes (2019-03-13) +### 1.2.9.6 Release Notes (2019-03-13) diff --git a/R/CreateInputsCrit.R b/R/CreateInputsCrit.R index ea37616f96ee63c3f4d731679f91995a929dc9bc..d41f1dbcc30b5aa9b9d34aabf0dfafb47e452f35 100644 --- a/R/CreateInputsCrit.R +++ b/R/CreateInputsCrit.R @@ -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")