Skip to contents

A robust and flexible table reader that supports automatic delimiter detection for .csv, .tsv, .txt, .gz, and similar tabular files (including compressed). Uses data.table::fread() for efficient parsing. Displays helpful CLI messages.

Usage

read_table_flex(
  file_path,
  sep = NULL,
  encoding = "UTF-8",
  header = TRUE,
  verbose = FALSE
)

Arguments

file_path

Character. Path to the file to be read.

sep

Optional. Field delimiter. If NULL, auto-detected by file extension.

encoding

Character. File encoding. Default: "UTF-8".

header

Logical. Whether the file contains a header row. Default: TRUE.

verbose

Logical. Show progress and details. Default: FALSE.

Value

A data.table::data.table object containing the parsed tabular data.