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 |
... |
Arguments for printing rule breaker information. |
Details
In case breaker presence this function does the following:
In case
.silent
isFALSE
print rows from exposure report corresponding to rule breakers.Make assertion of the chosen
.type
about breaker presence in exposure.Return
.tbl
(for using inside a pipe).
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)