R/logicheck.R

Defines functions logicheck

Documented in logicheck

logicheck <- 
  function(argu) 
{
    argnam <- deparse(substitute(argu))
    if (length(argu) != 1L) {
      stop(sprintf("Input '%s' must contain only a single value.", argnam), 
           call. = FALSE)
    }
    if (!(is.logical(argu))) {
      stop(sprintf("Input '%s' must be of class 'logical'.", argnam), 
           call. = FALSE)
    }
}

Try the cpfa package in your browser

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

cpfa documentation built on Aug. 8, 2025, 6:24 p.m.