R/assert-is-type-stats.R

Defines functions assert_is_leaf assert_is_mts assert_is_stepfun assert_is_ts assert_is_tskernel

Documented in assert_is_leaf assert_is_mts assert_is_stepfun assert_is_ts assert_is_tskernel

#' @rdname is_leaf
#' @export
assert_is_leaf <- function(x, 
  severity = getOption("assertive.severity", "stop"))
{                                                         
  assert_engine(
    is_leaf, 
    x, 
    .xname = get_name_in_parent(x),
    severity = severity
  )
}

#' @rdname is_ts
#' @export
assert_is_mts <- function(x, 
  severity = getOption("assertive.severity", "stop"))
{                                                         
  assert_engine(
    is_mts, 
    x, 
    .xname = get_name_in_parent(x),
    severity = severity
  )
}

#' @rdname is_function
#' @export
assert_is_stepfun <- function(x, 
  severity = getOption("assertive.severity", "stop"))
{                                                         
  assert_engine(
    is_stepfun, 
    x, 
    .xname = get_name_in_parent(x),
    severity = severity
  )
}

#' @rdname is_ts
#' @export
assert_is_ts <- function(x, 
  severity = getOption("assertive.severity", "stop"))
{                                                         
  assert_engine(
    is_ts, 
    x, 
    .xname = get_name_in_parent(x),
    severity = severity
  )
}

#' @rdname is_ts
#' @export
assert_is_tskernel <- function(x, 
  severity = getOption("assertive.severity", "stop"))
{                                                         
  assert_engine(
    is_tskernel, 
    x, 
    .xname = get_name_in_parent(x),
    severity = severity
  )
}

Try the assertive.types package in your browser

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

assertive.types documentation built on May 1, 2019, 10:31 p.m.