Skip to contents

Matches and aligns keys between two datasets for downstream operations.

Usage

keys_match(x, y, keys_names = NULL, match_scenario = TRUE)

Arguments

x

First dataset containing keys to match

y

Second dataset containing keys to match

keys_names

Names of columns to use as matching keys. If NULL, uses common columns

match_scenario

(logical). If TRUE, exclude scenario_id from matching keys. If FALSE, include scenario_id. Default: TRUE.

Value

A list containing:

x

First dataset with group IDs

y

Second dataset with group IDs

xy

Matched datasets with aligned group and scenario IDs