Skip to content

Commit

Permalink
remove is.range, is.probRange from helpers.R
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitriskontosBAY committed Oct 5, 2023
1 parent a29f733 commit 338f2d8
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -149,31 +149,6 @@ safeInteger <- function(x) {
as.integer(x)
}

##' Predicate checking for a numeric range
##'
##' @param x the object being checked
##' @return Returns \code{TRUE} if \code{x} is a numeric range
##'
##' @keywords internal
is.range <- function(x) {
return(identical(length(x), 2L) &&
x[1] < x[2])
}

##' Predicate checking for a probability range
##'
##' @param x the object being checked
##' @param bounds whether to include the bounds 0 and 1 (default)
##' @return Returns \code{TRUE} if \code{x} is a probability range
##'
##' @keywords internal
is.probRange <- function(x,
bounds = TRUE) {
return(is.range(x) &&
all(sapply(x, test_probability, bounds = bounds)))
}


##' Shorthand for logit function
##'
##' @param x the function argument
Expand Down

0 comments on commit 338f2d8

Please sign in to comment.