Skip to contents

Convenience wrapper that calls prep_check_columns(), prep_check_keys(), and prep_coerce_dates() in sequence. Returns the date-coerced data along with a check report.

Usage

prep_validate_table(
  data,
  required_cols = character(),
  key_col = NULL,
  expected_types = character(),
  date_cols = NULL,
  table_label = "table",
  stop_on_missing = TRUE
)

Arguments

data

Data frame.

required_cols

Character vector of required column names.

key_col

Character. Primary/foreign key column to quality-check.

expected_types

Named character vector of expected column classes.

date_cols

Character vector of date column names to coerce. NULL triggers auto-detection.

table_label

Character. Label used in all messages.

stop_on_missing

Logical. Passed to prep_check_columns().

Value

A list with data (date-coerced) and report (check summary).