Validation on columns
validate_cols(
data,
predicate,
...,
obligatory = FALSE,
description = NA,
skip_chain_opts = FALSE,
success_fun = assertr::success_append,
error_fun = assertr::error_append,
defect_fun = assertr::defect_append
)A data.frame or tibble to test
Predicate function or predicate generator such as in_set
or within_n_sds
Columns selection that predicate should be called on.
All tidyselect language methods are supported.
If not provided, all everything will be used.
If TRUE and assertion failed the data is marked as defective. For defective data, all the following rules are handled by defect_fun function
A character string with description of assertion. The description is then displayed in the validation report
While wrapping data with validate function, success_fun and
error_fun parameters are rewritten with success_append and error_append
respectively. In order to use parameters assigned to the function directly set skip_chain_opts
to TRUE
Function that is called when the validation pass
Function that is called when the validation fails
Function that is called when the data is marked as defective
validate_if validate_rows