Skip to contents

A reconciliation object is the shared data structure that every matching function in prepR4pcm returns, and that every downstream function consumes. You will never build one by hand; call reconcile_tree(), reconcile_data(), reconcile_trees(), reconcile_to_trees(), or reconcile_multi() instead. This page documents the structure so you can poke at the internals when debugging or writing custom helpers.

Usage

new_reconciliation(
  mapping,
  meta,
  counts = NULL,
  overrides = NULL,
  unused_overrides = NULL
)

Arguments

mapping

A tibble with the mapping table (see above).

meta

A named list of provenance metadata.

counts

A named list of summary counts. Computed from mapping if NULL.

overrides

A tibble of manual overrides (empty by default).

unused_overrides

A tibble of overrides that could not be applied, with columns name_x, name_y, reason. If NULL, pulled from attr(mapping, "unused_overrides") when present, else initialised empty.

Value

An object of class reconciliation.

Structure

A reconciliation is an S3 list with five components:

mapping

A tibble with one row per unique name seen in either source. Columns are documented in reconcile_mapping(): name_x, name_y, name_resolved, match_type (one of "exact", "normalized", "synonym", "fuzzy", "manual", "flagged", "unresolved", or — when surfaced via reconcile_mapping(include_unused_overrides = TRUE)"override_unused"), match_score, match_source, in_x, in_y, notes.

meta

A named list of provenance metadata — call signature, timestamp, source labels, taxonomic authority, fuzzy settings, resolve mode, rank, prepR4pcm version.

counts

A named list of match-type counts, used by the print method and by reconcile_summary().

overrides

A tibble logging manual corrections applied via reconcile_override() or reconcile_override_batch().

unused_overrides

A tibble of overrides that the cascade could NOT apply, with columns name_x, name_y, and reason (one of name_x_not_in_data, name_y_not_in_target, or already_matched). Empty when no overrides were supplied or when every override applied successfully. Surfaced in reconcile_summary(), reconcile_report() (HTML), reconcile_export() (as <prefix>_unused_overrides.csv), and reconcile_mapping(include_unused_overrides = TRUE).

Methods

Standard S3 methods are defined for print(), summary() (which dispatches to reconcile_summary()), and format().

Accessing the object