R/misc_utils.R

Defines functions is.scalar

#' Error handling - scalar
#' @noRd

is.scalar <- function(x){
  result <- (is.numeric(x) && length(x) == 1 && is.finite(x))
  return(result)
}

#' non-vectorized ifelse function
#' @noRd
ifelse1 <-
  function (test, x, y) if (test) x else y
statdivlab/rigr documentation built on June 23, 2024, 12:01 p.m.