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
Showing with 6 additions and 6 deletions
+6 -6
...@@ -134,6 +134,12 @@ CreateInputsCrit <- function(FUN_CRIT, ...@@ -134,6 +134,12 @@ CreateInputsCrit <- function(FUN_CRIT,
return(NULL) 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' ## check 'BoolCrit'
if (is.null(iListArgs2$BoolCrit)) { if (is.null(iListArgs2$BoolCrit)) {
iListArgs2$BoolCrit <- rep(TRUE, length(iListArgs2$obs)) iListArgs2$BoolCrit <- rep(TRUE, length(iListArgs2$obs))
...@@ -147,12 +153,6 @@ CreateInputsCrit <- function(FUN_CRIT, ...@@ -147,12 +153,6 @@ CreateInputsCrit <- function(FUN_CRIT,
return(NULL) 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' ## check 'varObs'
if (!is.vector(iListArgs2$varObs) | length(iListArgs2$varObs) != 1 | !is.character(iListArgs2$varObs) | !all(iListArgs2$varObs %in% inVarObs)) { if (!is.vector(iListArgs2$varObs) | length(iListArgs2$varObs) != 1 | !is.character(iListArgs2$varObs) | !all(iListArgs2$varObs %in% inVarObs)) {
stop(msgVarObs, call. = FALSE) stop(msgVarObs, call. = FALSE)
......
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