assert_base: General data audit function to create other specific audit...

Description Usage Arguments Value See Also Examples

Description

Thin wrapper around the assertr::assert() and assertr::insist() functions.

Usage

1
2
3
chk_assert_func(.data, .function, .variables)

chk_insist_func(.data, .function, .variables)

Arguments

.data

Data to check for errors.

.function

assertr function to apply to the assertr::assert() command.

.variables

The columns to run the audit checks on.

Value

Adds assertr_errors to data.frame.

See Also

See documentation on either assertr::assert() or assertr::insist()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(magrittr)
library(assertr)

flaws <- iris %>%
chk_assert_func(within_bounds(5, 7), "Sepal.Length")
aud_report(flaws)

flaws <- iris %>%
chk_insist_func(within_n_mads(1), "Sepal.Length")
aud_report(flaws)

lwjohnst86/PROMISE.audit documentation built on May 6, 2019, 9:54 a.m.