read_table_by_header_spec: Efficiently read a table based on some specification of...

View source: R/util_files.R

read_table_by_header_specR Documentation

Efficiently read a table based on some specification of expected headers

Description

Uses map_headers() to parse and map lists of expected column names and their designated names

Usage

read_table_by_header_spec(
  file,
  attributes_required,
  attributes_optional = NULL,
  regex_headers = NULL,
  as_tibble_type = TRUE
)

Arguments

file

full file path for a CSV/TSV data table

attributes_required

see map_headers()

attributes_optional

see map_headers()

regex_headers

regex to be applied to all columns; these will be included

as_tibble_type

return data.table::fread() results as a tibble (DEFAULT), instead of data.table format


ftwkoopmans/msdap documentation built on March 5, 2025, 12:15 a.m.