Commit 334c94a8 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

CHERRY-PICK: v1.1.2.36 CLEAN: change the message and the place of the check on...

CHERRY-PICK: v1.1.2.36 CLEAN: change the message and the place of the check on obs in CreateInputsCrit #ec035622
parent 00e5dde3
......@@ -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