
Read One Section's Data Using a Column Mapping
Source:R/plug_and_play_schema.R
read_mapped_section_data.RdGeneric schema-enforced reader: reads whichever file corresponds to an INDEX
value in a mapping table, renames raw headers to standardized names, resolves duplicate
columns per duplicate_action, and tolerates missing or unmapped columns.
Usage
read_mapped_section_data(
mapping,
index,
file = NULL,
data_dir = NULL,
sheet = NULL,
header_rows = 1
)Arguments
- mapping
Validated column mapping table.
- index
Character string identifying the section/domain in
mapping$INDEX.- file
Optional explicit path to the data file.
- data_dir
Directory to search for the section's file if
fileis NULL.- sheet
Sheet name or number for Excel files.
- header_rows
Number of header rows to concatenate (default: 1).