Compare two vintage versions of an auxiliary data file
compare_vintage_versions.Rd
Compares the most recent version of an auxiliary data file with an earlier "vintage" version, identifying differences in values, rows, and columns. This is useful for tracking changes within a release, especially during development or validation.
Usage
compare_vintage_versions(
measure,
root_dir = Sys.getenv("PIP_ROOT_DIR"),
maindir = getOption("pipaux.working_dir"),
verbose = FALSE,
version = -1,
apply_label = TRUE,
...
)
Arguments
- measure
Character. The name of the auxiliary measure to compare (e.g., "gdp", "pop").
- root_dir
Character. Root directory where the release data is stored. Defaults to the
PIP_ROOT_DIR
environment variable.- maindir
Character. Path to the main auxiliary data directory. Defaults to the
pipaux.working_dir
option.- verbose
Logical. If
TRUE
, messages about the comparison process are printed.- version
Integer. A negative number indicating how many versions before the latest one to compare with. For example,
-1
compares the current version with the one just before it,-2
goes two versions back, and so on.- ...
Additional arguments passed to the data loading functions.
Value
(Invisibly) A list with three elements:
- diff_values
A data table showing differences in values across matched rows and columns.
- diff_rows
A data table showing rows added or removed between versions.
- diff_cols
A list with added or removed columns.