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

v1.1.2.36 CLEAN: change the message and the place of the check on obs in CreateInputsCrit

parent 1dd5f4b2
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.1.2.35
Version: 1.1.2.36
Date: 2019-01-29
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -13,7 +13,7 @@ output:
### 1.1.2.35 Release Notes (2019-01-29)
### 1.1.2.36 Release Notes (2019-01-29)
......
......@@ -134,6 +134,12 @@ CreateInputsCrit <- function(FUN_CRIT,
return(NULL)
}
## check 'obs'
if (!is.vector(iListArgs2$obs) | length(iListArgs2$obs) != LLL | !is.numeric(iListArgs2$obs)) {
stop(sprintf("'obs' must be a (list of) vector(s) of numeric values of length %i \n", LLL), call. = FALSE)
return(NULL)
}
## check 'BoolCrit'
if (is.null(iListArgs2$BoolCrit)) {
iListArgs2$BoolCrit <- rep(TRUE, length(iListArgs2$obs))
......@@ -147,12 +153,6 @@ CreateInputsCrit <- function(FUN_CRIT,
return(NULL)
}
## check 'obs'
if (!is.vector(iListArgs2$obs) | length(iListArgs2$obs) != LLL | !is.numeric(iListArgs2$obs)) {
stop("'obs' must be a (list of) vector(s) of numeric values \n", call. = FALSE)
return(NULL)
}
## check 'varObs'
if (!is.vector(iListArgs2$varObs) | length(iListArgs2$varObs) != 1 | !is.character(iListArgs2$varObs) | !all(iListArgs2$varObs %in% inVarObs)) {
stop(msgVarObs, call. = FALSE)
......
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