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

Try the rigr package in your browser

Any scripts or data that you put into this service are public.

rigr documentation built on Sept. 7, 2022, 1:05 a.m.