Learn R Programming

scrutiny (version 1.0.0)

audit_cols_minimal: Compute minimal audit() summaries

Description

Call audit_cols_minimal() within an audit() method for the output of a consistency test mapper such as grim_map(). It returns a tibble with the three columns every such method must have:

  1. all_cases: the number of rows, including undecidable ones.

  2. incon_cases: the number of rows where consistency is FALSE. A case the test could not decide is NA there and not counted.

  3. emp_incon: the empirical rate of inconsistency, incon_cases / all_cases.

Add further columns as needed. See Examples for how to name the method.

Usage

audit_cols_minimal(data)

Value

A tibble with the three columns above.

Arguments

data

Data frame returned by a mapper function.

See Also

vignette("consistency-tests-in-depth").

Examples

Run this code
# For a mapper `schlim_map()` that applies a test called SCHLIM and
# returns a data frame with the class `"scrutiny_schlim_map"`:
audit.scrutiny_schlim_map <- function(data, ...) {
  audit_cols_minimal(data)
}

Run the code above in your browser using DataLab