chk_outliers(.data, .n_mads, .variables)

Arguments

.data

Data to audit.

.n_mads

Number of mean absolute deviations (see assertr::within_n_mads).

.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

library(magrittr)
ds <- data.frame(a = c(rnorm(100), 10))

flaws <- ds %>%
chk_outliers(2, "a")
aud_report(flaws)
#>   Column Fails               Values  RowNum
#> 1      a     2 3.15382394929365, 10 73, 101