R/assert-is-type-dplyr.R

Defines functions assert_is_tbl assert_is_tbl_cube assert_is_tbl_df assert_is_tbl_dt

Documented in assert_is_tbl assert_is_tbl_cube assert_is_tbl_df assert_is_tbl_dt

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

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

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

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