chk_in_range: Audits column values within a certain numeric range.

Description Usage Arguments Value Examples

View source: R/number_value_checks.R

Description

Uses the assertr::within_bounds() function.

Usage

1
chk_in_range(.data, .low, .high, .variables)

Arguments

.data

Data to audit.

.low

Low value in the range.

.high

High value in the range.

.variables

Column variables to check.

Value

Adds attribute that contains the audit errors, if any, to the data. Use aud_report() to view the audit fails.

Examples

1
2
3
4
5
6
library(magrittr)
ds <- data.frame(a = rnorm(10), b = rnorm(10))

flaws <- ds %>%
chk_in_range(-1, 1, "a")
aud_report(flaws)

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