Closed nikosbosse closed 4 months ago
We are often checking whether the output of a check_ function is a logical. Instead, it would be cleaner to check if the value is TRUE directly.
check_
TRUE
From the code review:
This seems a bit fragile since we wouldn't want FALSE (even though it's not supposed to pop up) to return TRUE. test_columns_present <- function(data, columns) { check <- check_columns_present(data, columns) return(isTRUE(check)) }
This seems a bit fragile since we wouldn't want FALSE (even though it's not supposed to pop up) to return TRUE.
FALSE
test_columns_present <- function(data, columns) { check <- check_columns_present(data, columns) return(isTRUE(check)) }
_Originally posted by @Bisaloo in https://github.com/epiforecasts/scoringutils/pull/791#discussion_r1567237844_
We are often checking whether the output of a
check_
function is a logical. Instead, it would be cleaner to check if the value isTRUE
directly.From the code review:
_Originally posted by @Bisaloo in https://github.com/epiforecasts/scoringutils/pull/791#discussion_r1567237844_