assert_any_breaker | R Documentation |
Function to assert if exposure resulted in detecting some rule breakers.
assert_any_breaker(.tbl, .type = "error", .silent = FALSE, ...)
.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. |
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.
## Not run:
mtcars %>%
expose(data_packs(. %>% dplyr::summarise(nrow_low = nrow(.) > 50))) %>%
assert_any_breaker()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.