R/assert-is-formula.R

Defines functions assert_is_formula assert_is_one_sided_formula assert_is_two_sided_formula

Documented in assert_is_formula assert_is_one_sided_formula assert_is_two_sided_formula

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

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

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