Skip to contents

This function compares the contents of auxiliary data files between the current and a specified previous release. It identifies differences for specified key variables

Usage

get_aux_changes(
  measure = "cpi",
  maindir = getOption("pipaux.working_dir"),
  old_release = NULL,
  key_cols = getOption("pipaux.key_vars"),
  verbose = TRUE
)

Arguments

measure

character: Name of the measure to process

maindir

character: Main directory of the project. Default is getOption("pipaux.working_dir")

old_release

Character. The identifier of the previous release to compare against (e.g., "20240101_PROD"). If NULL, automatically take last available release of same identity as the current working release

key_cols

Character vector. Variables used as keys to compare values between releases. Defaults to the pipaux.key_vars option.

verbose

Logical. If TRUE, displays messages in the console.

Value

A data frame with detected differences in values, grouped by the specified key variables.

Details

The release identifiers must follow the format "YYYYMMDD_identity" (e.g., "20250101_TEST").

Examples

if (FALSE) { # \dontrun{
get_aux_changes(measure = "cpi", old_release = "20240101_PROD")
} # }