View source: R/audit-cols-minimal.R
audit_cols_minimal | R Documentation |
audit()
summariesCall audit_cols_minimal()
within your audit()
methods for
the output of consistency test mapper functions such as grim_map()
. It
will create a tibble with the three minimal, required columns:
incons_cases
counts the inconsistent cases, i.e., the number of rows
in the mapper's output where "consistency"
is FALSE
.
all_cases
is the total number of rows in the mapper's output.
incons_rate
is the ratio of incons_cases
to all_cases
.
You can still add other columns to this tibble. Either way, make sure to name your method correctly. See examples.
audit_cols_minimal(data, name_test)
data |
Data frame returned by a mapper function, such as |
name_test |
String (length 1). Short, plain-text name of the consistency
test, such as |
A tibble (data frame) with the columns listed above.
For context, see vignette("consistency-tests-in-depth")
. In case
you don't call audit_cols_minimal()
, you should call
check_audit_special()
.
# For a mapper function called `schlim_map()`
# that applies a test called SCHLIM and returns
# a data frame with the `"scr_schlim_map"` class:
audit.scr_schlim_map <- function(data) {
audit_cols_minimal(data, name_test = "SCHLIM")
}
# If you like, add other summary columns
# with `dplyr::mutate()` or similar.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.