validate_if | R Documentation |
The function checks whether all the logical values returned by the expression are TRUE. The function is meant for handling all the cases that cannot be reached by using validate_cols and validate_rows functions.
validate_if(
data,
expr,
description = NA,
obligatory = FALSE,
skip_chain_opts = FALSE,
success_fun = assertr::success_append,
error_fun = assertr::error_append,
defect_fun = assertr::defect_append
)
data |
A data.frame or tibble to test |
expr |
A Logical expression to test for, e.g. |
description |
A character string with description of assertion. The description is then displayed in the validation report |
obligatory |
If TRUE and assertion failed the data is marked as defective. For defective data, all the following rules are handled by defect_fun function |
skip_chain_opts |
While wrapping data with validate function, |
success_fun |
Function that is called when the validation pass |
error_fun |
Function that is called when the validation fails |
defect_fun |
Function that is called when the data is marked as defective |
validate_cols validate_rows
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.