verify_fixes: Verifies the prospective fixes

View source: R/fix-verification.R

verify_fixesR Documentation

Verifies the prospective fixes

Description

Computes metrics to determine if the requested fixes are valid and won't cause record-level corruption. These fixes don't perform referential integrity checks. That must be done externally.

Usage

verify_fixes(
  fixes,
  id_col,
  unique_id_col = "unique_id",
  databases = NULL,
  reference = NULL,
  foreign_keys = NULL,
  fix_history = NULL,
  include_problem_cases = TRUE,
  review_fields = c("problem", "verifier", "note"),
  edit_fields = c(what = "what", change_to = "change_to", change_from = "change_from"),
  verbose = TRUE
)

Arguments

fixes

A data.frame in the fix format

id_col

The name of the column that contains the primary key

unique_id_col

The name of the column that contains the surrogate key

databases

A list of data.frames used to validate the fixes

reference

A master data.frame that contains the "ground truth" of the information found in the databases

foreign_keys

Not used.

fix_history

A previous iteration of fixes when, if provided, will be used to determine if fixes found in fixes are amendments of previous fixes.

include_problem_cases

If TRUE, records marked as a "problem", which is an internal communication column for further review, will be included in the fix verification metrics.

review_fields

The names of fields to be used for verification

edit_fields

The names of the fix columns

verbose

Enables logging messages

Value

A data.frame of fixes with the "verified_fixes" attribute, along with the fix verification metrics.


nyuglobalties/anara documentation built on July 17, 2024, 4:05 p.m.