assert_any_breaker {ruler}R Documentation

Assert presence of rule breaker

Description

Function to assert if exposure resulted in detecting some rule breakers.

Usage

assert_any_breaker(.tbl, .type = "error", .silent = FALSE, ...)

Arguments

.tbl

Result of exposure, i.e. data frame with exposure attribute.

.type

The type of assertion. Can be only one of "error", "warning" or "message".

.silent

If TRUE no printing of rule breaker information is done.

...

Arguments for printing rule breaker information.

Details

In case breaker presence this function does the following:

If there are no breakers only .tbl is returned.

See Also

any_breaker for checking of breaker presence in exposure result.

act_after_exposure for making general actions based in exposure result.

Examples

## Not run: 
mtcars %>%
  expose(data_packs(. %>% dplyr::summarise(nrow_low = nrow(.) > 50))) %>%
  assert_any_breaker()

## End(Not run)

[Package ruler version 0.3.0 Index]