
Function to assert if exposure resulted in detecting some rule breakers.
assert_any_breaker(.tbl, .type = "error", .silent = FALSE, ...)
Result of exposure, i.e. data frame with exposure attribute.
The type of assertion. Can be only one of "error", "warning" or "message".
If TRUE
no printing of rule breaker information is done.
Arguments for printing rule breaker information.
In case breaker presence this function does the following:
In case .silent
is FALSE
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.
any_breaker for checking of breaker presence in exposure result.
act_after_exposure for making general actions based in exposure result.
if (FALSE) {
mtcars %>%
expose(data_packs(. %>% dplyr::summarise(nrow_low = nrow(.) > 50))) %>%
assert_any_breaker()
}
Run the code above in your browser using DataLab