Learn R Programming

fcall (version 0.1.6)

compare_metadata: Compare FCA Call Report metadata files between two folders

Description

compare_metadata() compares the content of the metadata files (files that start with "D_") between two specified folders containing FCA Call Report data (from two different quarters).

Usage

compare_metadata(dir1, dir2)

Value

A list containing information about differences in file names, file order, and content differences between the metadata files in dir1 and dir2

Arguments

dir1

(String) The path to a folder containing FCA Call Report .TXT files for a single quarter

dir2

(String) The path to a folder containing FCA Call Report .TXT files for a (different) single quarter

Details

compare_metadata() lists metadata files in each folder, identifies shared metadata files, and then compares (a) the number of files, (b) file names, (c) file order, and (d) file content (using the waldo::compare() function).

Examples

Run this code
# \donttest{

  # Download data from September 2025
  path_1 <- tempfile("fcadata1")
  dir.create(path_1)

  download_data(
    year = 2025,
    month = 9,
    dest = path_1
  )

  # Download data from September 2011
  path_2 <- tempfile("fcadata2")
  dir.create(path_2)

  download_data(
    year = 2011,
    month = 9,
    dest = path_2
  )

  compare_metadata(path_1, path_2)

# }

Run the code above in your browser using DataLab