Learn R Programming

fcall (version 0.1.6)

process_metadata_file: Process metadata file to extract variable information

Description

process_metadata_file() reads a metadata file and extracts information about the column names, column types, decimal positions, and variable definitions.

Usage

process_metadata_file(file)

Value

A list containing the scenario (e.g., "single", "single_multiple", "single_multiple_single") and a tibble with variable information.

Arguments

file

(String) The path to the metadata file.

Details

process_metadata_file() processes metadata files following specific rules to handle encoding, remove unnecessary information, and extract variable details. It detects the scenario based on the occurrence of double asterisks in variable names.

Examples

Run this code
# \donttest{

  path <- tempfile("fcadata")
  dir.create(path)

  download_data(
    year = 2025,
    month = "September",
    dest = path
  )

  process_metadata_file(file.path(path, "D_RC1.TXT"))

# }

Run the code above in your browser using DataLab