R/assert-is-function.R

Defines functions assert_is_closure_function assert_is_builtin_function assert_is_special_function assert_is_internal_function assert_is_s3_generic assert_is_s3_method assert_is_s3_primitive_generic assert_is_s3_group_generic assert_is_s4_group_generic assert_is_s3_internal_generic

Documented in assert_is_builtin_function assert_is_closure_function assert_is_internal_function assert_is_s3_generic assert_is_s3_group_generic assert_is_s3_internal_generic assert_is_s3_method assert_is_s3_primitive_generic assert_is_s4_group_generic assert_is_special_function

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

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

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

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

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

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

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

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

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

#' @rdname is_s3_generic
#' @export
assert_is_s3_internal_generic <- function(x, 
  severity = getOption("assertive.severity", "stop"))
{                                                         
  assert_engine(
    is_s3_internal_generic, 
    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.