Skip to content

Commit

Permalink
Merge branch 'develop' into existing_split
Browse files Browse the repository at this point in the history
  • Loading branch information
egillax committed Nov 18, 2024
2 parents 0a65fc5 + 3f1a292 commit 71e9d52
Show file tree
Hide file tree
Showing 2 changed files with 189 additions and 186 deletions.
8 changes: 4 additions & 4 deletions R/ParamChecks.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ checkBoolean <- function(parameter) {

checkHigherEqual <- function(parameter, value) {
name <- deparse(substitute(parameter))
if (!is.numeric(parameter) || parameter < value) {
if (!is.numeric(parameter) || any(parameter < value)) {
ParallelLogger::logError(paste0(name, " needs to be >= ", value))
stop(paste0(name, " needs to be >= ", value))
}
Expand All @@ -38,7 +38,7 @@ checkHigherEqual <- function(parameter, value) {

checkLowerEqual <- function(parameter, value) {
name <- deparse(substitute(parameter))
if (!is.numeric(parameter) || parameter > value) {
if (!is.numeric(parameter) || any(parameter > value)) {
ParallelLogger::logError(paste0(name, " needs to be <= ", value))
stop(paste0(name, " needs to be <= ", value))
}
Expand All @@ -47,7 +47,7 @@ checkLowerEqual <- function(parameter, value) {

checkHigher <- function(parameter, value) {
name <- deparse(substitute(parameter))
if (!is.numeric(parameter) || parameter <= value) {
if (!is.numeric(parameter) || any(parameter <= value)) {
ParallelLogger::logError(paste0(name, " needs to be > ", value))
stop(paste0(name, " needs to be > ", value))
}
Expand All @@ -56,7 +56,7 @@ checkHigher <- function(parameter, value) {

checkLower <- function(parameter, value) {
name <- deparse(substitute(parameter))
if (!is.numeric(parameter) || parameter >= value) {
if (!is.numeric(parameter) || any(parameter >= value)) {
ParallelLogger::logError(paste0(name, " needs to be < ", value))
stop(paste0(name, " needs to be < ", value))
}
Expand Down
Loading

0 comments on commit 71e9d52

Please sign in to comment.