Skip to contents

Get the relevant data from the SLFs use, the year, recid and variable names from the 'new' data to make it as efficient as possible.

Usage

get_existing_data_for_tests(
  new_data,
  file_version = "episode",
  anon_chi = FALSE
)

Arguments

new_data

a tibble of the new data which the SLF data will be compared to.

file_version

whether to test against the "episode" file (the default) or the "individual" file.

anon_chi

Default set as FALSE. For use in episode tests where we want anon_chi instead of chi.

Value

a tibble from the SLF with the relevant recids and variables.

See also

produce_source_extract_tests

Other test functions: produce_test_comparison(), write_tests_xlsx()